More configuration options

For every app configuration you can additionally specify several global options.


Open app override test

Often you will want to override the default Open App action with your own. For example when instrumenting a generic HTML app you could add a "click-through" sequence that would visit the device portal and open the application.

Open app override field in the app configuration allows you to specify a dedicated Suitest test that will be executed when the open app operation is about to be executed in your other tests.

Example overriding the Open app action in order to achieve fully automated app opening

Configuration variables

Suppose that you have an app deployed on staging (server) and preprod (pre-production). On staging, it has an address staging.example.com and on preprod, preprod.example.com. If you encapsulate this difference in a variable, you will be able to use the same test cases for both preprod and staging environments.

Configuration variables can be used anywhere within the Test editor and JavaScript API, including timeouts, counters, element properties etc.

Continuing with the above-mentioned example in both staging and preprod configuration, create a variable called url and use <%url%> to call the variable from within the test:

Example using variable to refer to a URL. The test scenario does no longer depend on the app URL, because it is a parameter of configuration. So we can apply this test without modification to different app versions and environments

Variables can be used anywhere in the test.

You can define as many variables as needed, you just cannot use SUITEST_ prefix. Suitest will warn you when you try to run a test that references an unknown variable.

Predefined constants

Suitest provides with constants in order to provide you with more options:

Name Description
SUITEST_DEVICE_ID Device ID of the connected device
SUITEST_DEVICE_IP Local IP address of the connected device

In order to use these constants you need to apply the same formulation as for the configuration variables.

Example of usage inside operations Execute command and Assert JavaScript expression:

console.log("<%SUITEST_DEVICE_ID%>");