Defining a variable to run a test with a selected mobile device
To be able to launch subsequent tests in the same logical
flow (session) from the same devices, you must define a variable including
a reserved variable name and selection criteria related to one or
multiple devices.
About this task
Procedure
Results
The variable can then be initialized from some external source (a datapool, tests from an IBM® Rational® Quality Manager test suite, or tests from the same user in compound tests containing one or more mobile tests. It can also be set within a test’s execution with a variable assignment action from any data source, including a data correlation reference, custom code, built-in function, datapool, or string constant. As a result, successive tests in the same session will then be sure to run on the same actual devices.
Note: When
a test launches an application:
- The RTW_Mobile_Selected_Device variable content is checked to get the device ID
- The device is reused if it is still applicable to the app that
must be launched. Conditions:
- The device operating system must be the same as the operating system of the application to be launched.
- The tester app is installed or can be installed without user intervention.
- If the conditions are not matched, the content of the RTW_Mobile_Device_Properties variable is checked
- If this variable is set, the first device matching all the valid property expressions of the variable is selected
- If the variable is not set, the first applicable device ready
for test is used. Conditions:
- The device operating system must be the same as the operating system of the application to be launched.
- The tester app is installed or can be installed without user intervention.