Class TestConfiguration

java.lang.Object
org.opentestfactory.test.harness.TestConfiguration

public class TestConfiguration extends Object
This class exposes test configuration data from the configuration property file.
Author:
ericdegenetais
  • Field Details

    • CFG_FILE_SYSTEM_PROPERTY_NAME

      public static final String CFG_FILE_SYSTEM_PROPERTY_NAME
      See Also:
    • VALUES

      @Deprecated public static final TestConfiguration VALUES
      Deprecated.
      this GoF like static instance is OK at test runtime but rather painfull when testing the test harness. For this reason we'll switch to a static method.
  • Method Details

    • values

      public static TestConfiguration values()
    • getServiceBaseURL

      public URL getServiceBaseURL(String hostURLKey)
      Get the base URL for a given SUT orchestrator service.
      Parameters:
      hostURLKey - configuration key for that URL.
      Returns:
    • getDurationFactorPercent

      public int getDurationFactorPercent()
      Returns:
      the SUT specific duration factor for timeout adjustment. It is an integer percentage. If no duration factor is set, it is assumed to be 100% ('normal' duration).
    • getServiceAuthToken

      public AuthToken getServiceAuthToken(String hostTokenKey)
      Token to authenticate the test harness againts the front services of the orchestrator under test.
      Parameters:
      hostTokenKey - the configuration key (as tokens might de used and defined indépendently for several services and the event bus).
      Returns:
      a host token instance. The return is never null, as no token is represented by a special no token AuthToken object.
    • getMockHost

      public String getMockHost()
      Returns:
      adress used by all mocks (might be an IP adress or hostname).