Class TestOptions


public class TestOptions extends ReportingOptions
Test execution options:
  • the timeout in milliseconds, the default value is 2 minutes
  • the useEventLoop
  • configures the event loop usage
    • true always runs with an event loop
    • false never runs with an event loop
    • null uses an event loop if there is one (provided by Vertx.currentContext()) otherwise run without
  • the reporters is an array of reporter configurations
Author:
Julien Viet
  • Field Details

    • DEFAULT_TIMEOUT

      public static final long DEFAULT_TIMEOUT
      The default time out value in milliseconds: 2 minutes.
      See Also:
    • DEFAULT_USE_EVENT_LOOP

      public static final Boolean DEFAULT_USE_EVENT_LOOP
      The default value for using or not the event loop: null.
  • Constructor Details

    • TestOptions

      public TestOptions()
      Create a new empty options, with the default time out and no reporters.
    • TestOptions

      public TestOptions(TestOptions other)
      Copy constructor.
      Parameters:
      other - the options to copy
    • TestOptions

      public TestOptions(JsonObject json)
      Create a new options from the specified json.
      Parameters:
      json - the json to create from
  • Method Details

    • getTimeout

      public long getTimeout()
      Returns:
      the current timeout in milliseconds.
    • setTimeout

      public TestOptions setTimeout(long timeout)
      Set the test timeout.
      Parameters:
      timeout - the timeout value in milliseconds.
      Returns:
      a reference to this, so the API can be used fluently
    • isUseEventLoop

      public Boolean isUseEventLoop()
      Returns:
      true if the execution should use an event loop when there is no one existing
    • setUseEventLoop

      public TestOptions setUseEventLoop(Boolean useEventLoop)
      Configure the execution to use an event loop when there is no one existing.
      Parameters:
      useEventLoop - the even loop usage
      Returns:
      a reference to this, so the API can be used fluently
    • addReporter

      public TestOptions addReporter(ReportOptions reportOptions)
      Description copied from class: ReportingOptions
      Add a reporter to the current list.
      Overrides:
      addReporter in class ReportingOptions
      Parameters:
      reportOptions - the options of the reporter to use
      Returns:
      a reference to this, so the API can be used fluently
    • setReporters

      public TestOptions setReporters(List<ReportOptions> reporters)
      Description copied from class: ReportingOptions
      Replace the current list of reporters with a new one.
      Overrides:
      setReporters in class ReportingOptions
      Parameters:
      reporters - the new reporters
      Returns:
      a reference to this, so the API can be used fluently
    • toJson

      public JsonObject toJson()
      Overrides:
      toJson in class ReportingOptions
      Returns:
      the json modelling the current configuration