Annotation Type NetworkAvailable


@Documented @Retention(RUNTIME) @Target({TYPE,METHOD}) public @interface NetworkAvailable
Test annotation to indicate that a test requires network access or access to a specific resource.
Author:
poirigui
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
    Timeout in milliseconds for the connection attempt if a resource URL is specified via url().
    Assume that one (or multiple) resources identified by URLs are available.
  • Element Details

    • url

      String[] url
      Assume that one (or multiple) resources identified by URLs are available.

      The assumption comprise the following tests:

      • that the hostname can be resolved (thus no UnknownHostException is raised
      • that the status code is in the 100, 200 or 300 family (for HTTP URLs)
      • that the connection can be established in 1 second or less, or a value specified by timeoutMillis()
      Only a connection is established; the resource itself is not consumed.
      Default:
      {}
    • timeoutMillis

      int timeoutMillis
      Timeout in milliseconds for the connection attempt if a resource URL is specified via url().

      The timeout applies to each URL individually.

      Default:
      1000