You can run mobile tests from a schedule if you have a shell-shared environment with
IBM® Rational® Performance Tester
and IBM Rational Test Workbench Web UI Tester. . One scenario is that you run the same mobile tests from a schedule. Other options
are that you run the same mobile tests on one mobile device or on multiple mobile devices and
emulators in parallel with different user groups. You can set a variable to specify unique mobile
devices for each virtual user in a group running the mobile tests. The variable can be initialized
from a datapool so that multiple mobile devices are used for each virtual user in a group that is
running the mobile tests .
Before you begin
- Install IBM Rational Performance Tester and
IBM Rational Test Workbench Web UI Tester
in the same package to work in a shell-shared environment in the same
workspace.
- Install the IBM Rational Test Workbench Mobile Client on
the devices and emulators.
- Record tests on the mobile devices and emulators.
- Run the tests on the devices and emulators before you run the
schedule to ensure that the Android playback-ready AUT and test packages
or the iOS instrumented AUT are correctly installed on those devices
and emulators. See Android
testing overview and iOS testing
overview.
About this task
All steps can be done in the test workbench perspective.
The
following scenarios are possible when you run mobile tests from a
schedule:
- No variable is created and no datapool used. When the schedule
is run, the product automatically assigns one device per virtual user.
- Each user group runs a test on a single device that is selected
from a schedule, where a variable is defined with a single selected
device.
- The schedule runs the same mobile tests on multiple mobile devices
and emulators in parallel with different user groups. Here a datapool
contains the devices IDs as variable values, and each virtual user
in a group is assigned a variable value from the datapool).
Note: Loops and compound tests can be used in schedules.
Procedure
- Optional: Add the RTW_Mobile_Selected_Device variable
in each mobile test so that you can choose which mobile devices and
simulators are used to run the test. For details, see Defining
a variable to run a test with a selected mobile device
- Open a mobile test, select the test resources node,
and create a variable container.
- In the wizard that opens, enter the following variable
name RTW_Mobile_Selected_Device. Click OK
- Optional: To enable resource monitoring, create
a variable named rm.collect and set it to true.
To collect data at specified intervals, create rm.collect.interval and
set it to an integer value of 1000 milliseconds or higher. To use
resource monitoring in a schedule, you must also set RTW_Mobile_Selected_Device variable
as mentioned in step 1. If you are running a mobile test
or schedule from IBM Rational Quality Manager,
set these variables in the Execution Variables section
in a test case.
- Optional: This step is needed only if variables
are not initialized from a datapool. Set the devices identifiers for
each mobile test in the test variable. In the Initial value area,
select Text and enter the device ID. To do
so, from the Mobile Devices editor, select
the device in the list, and copy the device ID that is available under Device in
the Detailed properties area as it is shown
in the following figures.
Steps 1, 2, and
3 are optional. If you do not use the RTW_Mobile_Selected_Device variable,
the product automatically assigns one device for each virtual user.
The number of virtual users or a percentage of users in the groups
can be defined while editing the schedule, as described in step 5.
- Optional: Set the device IDs for each mobile test in a
datapool:
- Create a datapool and associate the datapool with a
test:
- In the Test Details area, check Datapool
value in the Variable Details area.
- In the Select Data Source wizard, click
the Datapool push button, select a datapool
in the list, and click Select. If the datapool
must be created, select Use wizard to create new Datapool,
follow the instructions to create the datapool and click Finish.
For details on the data you can add in the datapool, see Creating a datapool associated with a test.
Then, select the datapool in the Select Data Source wizard,
and click Select
.
- After you create a datapool and add data to it, enter
the devices IDs in the first column of the datapool.
- Open the Mobile Devices editor, select
the device in the list, and copy the device ID that is available under Device in
the Detailed properties area.
- Open the datapool and paste the device ID in column 1 as shown
in the following figure. Do it for all devices that are used to run
the test.
- In the Test Navigator, create a
schedule with user groups:
- Click . In Select a
wizard, expand Test and click Performance
schedule.
- Enter or select the name of a project or folder to contain
the schedule, and enter a name for the schedule. Click Next.
- You can modify the default number of users, user groups,
ramp stages. If you use loops in the schedule, click Add
loops to each user group and select the type of loop for
each user group. Click Finish
- In the edited schedule, define the user groups: group
size, behavior. You can set a maximum number of virtual user in the
schedule for each user group: Select Absolute and
enter the maximum number of virtual users to run. For details on the
options, see Adding a user group to a schedule.
- Set the locations for the user groups. If the RTW_Mobile_Selected_Device variable is
not explicitly set, make sure that all of the user groups that contain
a mobile test are run on the same location. The concept of location
is specific to schedules and is explained in Creating a schedule and in Running a user group at a remote location.
- Add the mobile tests to the schedule:
- Open the schedule, click a user group and click
- Select a test and click OK.
- Save the schedule. To run the schedule from the test workbench:
- Set the devices and emulators to passive mode. See
the procedure and recommendations in Running tests from
the test workbench.
- Click Run Schedule. Run
the schedule from the command line, see Running a test or
schedule from the command line.
Results
You can see the test results in the web and statistical reports.