Package org.opentestfactory.test.harness
Class TestConfiguration
java.lang.Object
org.opentestfactory.test.harness.TestConfiguration
This class exposes test configuration data from the configuration property file.
- Author:
- ericdegenetais
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final TestConfigurationDeprecated.this GoF like static instance is OK at test runtime but rather painfull when testing the test harness. -
Method Summary
Modifier and TypeMethodDescriptionintgetServiceAuthToken(String hostTokenKey) Token to authenticate the test harness againts the front services of the orchestrator under test.getServiceBaseURL(String hostURLKey) Get the base URL for a given SUT orchestrator service.static TestConfigurationvalues()
-
Field Details
-
CFG_FILE_SYSTEM_PROPERTY_NAME
- See Also:
-
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
-
getServiceBaseURL
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
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
AuthTokenobject.
-
getMockHost
- Returns:
- adress used by all mocks (might be an IP adress or hostname).
-