SeeTestAutomation- Client Configuration Object
Please note that this tool is classified as a Legacy tool. We recommend transitioning to our updated solutions to maintain optimal performance and security in your workflows. For more information on this matter, please reach out to technical support .
This feature allows the user to execute tests with variables that are configured outside of the test. By using it,the user can manage all test configurations in one place, and for all tests.
The test configuration properties can be loaded from:
- WindowsEnvironment Variables
- Java system properties
- Defined in the code environment with the configuration object
How to use the feature using Windows Environment Variables:
Step 1: Define Environment Variable
- In the machine running SeeTestAutomation open the Environment Variable window (Control Panel -> System -> Advance System Settings -> Advance -> Environment Variables -> New System Variable)
- Add the properties you wish to configure (It is highly recommended to configure the properties deviceName and projectBaseDirectory).
- The following table describes the configurations that can be modified when using the test configuration object.
Property | Description | Values | Default Value |
---|---|---|---|
host | The host of the agent. | Host name or IP address. | 127.0.0.1 |
port | The port to communicate with the agent. | Valid Port Number. | 8889 |
deviceName | Name of device to be tested. | Device Name. | null |
agentIdleTime | The time (in milliseconds) that the port was no in used. | Positive Integer. | 60000 |
testName | The name of test. | String. | null |
findAgentPort | Whether the agent look for the port. | true \ false | false |
reportsDirectory | Directory to save the reports. | Folder Name. | "reports" |
projectBaseDirectory | The path to project directory. | Full Path To The Project Directory. | null |
Step 2: Edit the test (After configuring the environment variables)
- Export the code from SeeTestAutomation and copy it into your preferred testing environment.
- Set the test so it will use the configured variables
Example: The following example describes the adjustments needed to be done in the code (in this example - Java JUnit 4 environment):
Notes:
- If 'deviceName' property has been defined in the environment variables, there is no need to use the command setDevice.
- At any point in the script the user can override the configuration directly from the client object.
How to use this feature using Java system properties:
Note: The following configurations refer to eclipse testing environment.
Step 1: Define Java properties
- In eclipse - open the 'run configuration' window in the following path: Run -> Run Configuration -> Select Test File -> Environment
- Add the properties you wish to configure (see example below).
Step 2: Edit the test (After configuring the variables)
Note: Editing the test in this method of configuration will be in the same way as described in previous example.
How to use the feature by editing configuration object manually:
When using this method of configuring the test settings, the user needs to set the configuration object property 'OverwriteConfSetting' to false.
By doing so, the user changes the configuration to be configured manually.
Example: The following example describes the manual adjustments needed to be done in the code (in this example - Java JUnit 4 environment):
Notes:
- Each property supports two commands in each code environment:
- Get Command - gives you the current value of the property
- Set Command - enables you to set a new value in real time.
- All the properties defined in the script will be implemented only when client = Client.configure(conf) is executed.