Skip to main content

SeeTestAutomation- Client Configuration Object

info

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

  1. In the machine running SeeTestAutomation open the Environment Variable window (Control Panel -> System -> Advance System Settings -> Advance -> Environment Variables -> New System Variable)

  1. Add the properties you wish to configure (It is highly recommended to configure the properties deviceName and projectBaseDirectory).
  2. The following table describes the configurations that can be modified when using the test configuration object.
PropertyDescriptionValuesDefault Value
hostThe host of the agent.Host name or IP address.127.0.0.1
portThe port to communicate with the agent.Valid Port Number.8889
deviceNameName of device to be tested.Device Name.null
agentIdleTimeThe time (in milliseconds) that the port was no in used.Positive Integer.60000
testNameThe name of test.String.null
findAgentPortWhether the agent look for the port.true \ falsefalse
reportsDirectoryDirectory to save the reports.Folder Name."reports"
projectBaseDirectoryThe path to project directory.Full Path To The Project Directory.null

Step 2: Edit the test (After configuring the environment variables)

  1. Export the code from SeeTestAutomation and copy it into your preferred testing environment.
  2. 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):

info

Notes:

  1. If 'deviceName' property has been defined in the environment variables, there is no need to use the command setDevice.
  2. 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:

info

Note:    The following configurations refer to eclipse testing environment.

Step 1: Define Java properties

  1. In eclipse - open the 'run configuration' window in the following path: Run -> Run Configuration -> Select Test File -> Environment
  2. Add the properties you wish to configure (see example below).

Step 2: Edit the test (After configuring the variables)

info

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):

info

Notes:

  1. 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.
  2. All the properties defined in the script will be implemented only when client = Client.configure(conf) is executed.