Altova MobileTogether Designer

Playing Back a Test Case

Home Prev Top Next

After a test case has been recorded (see Recording a Test Case), you can play back that test case with different parameters (for example, with different page source data, or on different versions of a device-OS). If the playback returns differences, then the playback is automatically saved in the design when it is closed; otherwise it is not saved. A saved playback is displayed in the Manage Test Cases and Runs dialog as a test run that is based on its originating test case (notice the terminology; see Managing Test Cases and Runs for more information).

 

Playback in designer and client

You can play back a test case in MobileTogether Designer or on a client device. To do this, click the corresponding icon in the toolbar (see screenshot below). These are, respectively, Playback Test Case and Trial Run Test Cases on Client.  

MTDAutoTestToolBar
MTDAutoTestIconPlayback

Playback Test Case: Plays back the test case that is selected in the Available Test Cases for Playback combo box. If the playback returns differences from the test case, then the playback is saved.

MTDAutoTestIconClientRun

Trial Run Test Cases on Client: Plays back, on a connected client, the test case that is selected in the Available Test Cases for Playback combo box. The playback is saved (whether there are differences or not).

 

Playback options

Options for recording and playback are available at the bottom of the Manage Test Cases and Runs dialog. Since playbacks that show differences are automatically recorded and stored, the recording options you set here are used for playbacks as well.

 

Recording options

The following recording options are available:

 

Logging of design actions: Design actions are actions that are not explicitly triggered by the user. (An example would be the automatic saving of data to a page source.) If this option is checked (the default), then design actions are logged.

Automatically taking snapshots after each step: Check this option to enable automatic snapshots after each user action. Snapshots will be taken of the snapshot-items selected by you in the inclusion options (see next point).

What to include in snapshots: These options apply to the recording of test cases—not to the playback of test runs. Select what you want to include in snapshots. The options are: page sources, styles, and client views (the layout coordinates of design components on clients). If you select at least one of these snapshot options and de-select Make Snapshot Automatically, then the Record Snapshot button in the Simulator will be enabled during the recording of test cases, and you can take snapshots at any time that you want.

 

Playback options

The following playback options are available:

 

Test case speed: You can select at what speed to play back a test case. If you select Step-by-Step, then the Playback Next Step button in the Simulator will be enabled during playback, and you can run through the test at your own pace; click Playback Next Step to progress one step at a time.

Reset persistent data: Each test case has a Reset check box for resetting persistent data to original values. If checked, then, when a test case is played back, persistent data on the client is reset to their original values.

 

Playing back a test case in MobileTogether Designer

To play back a test case in MobileTogether Designer, do the following:

 

1.In the Available Test Cases for Playback combo box (see toolbar screenshot above), select the test case that you want to play back. Note that you can play back test cases only, not test runs.

2.Click Playback Test Case (see toolbar screenshot above).

 

Playback will run in the Simulator. If the playback returns differences, then the playback is automatically saved as a test run when it is closed.

 

Note:Message boxes are not displayed during playback in MobileTogether Designer.

 

Playing back a test case on a client device

Playing back a test case on a client enables you to preview and check whether a given test case functions correctly on specific client devices. In this scenario, the MobileTogether Designer machine takes on the role of a MobileTogether Server. This means that you must set a separate port via which the Designer machine (acting as a server) will connect with the client.

 

The setup consists of two parts:

 

In MobileTogether Designer, go to Tools | Options | Trial Run on Client, and set up a separate port for communication with the client device: for example, 8083.

On your client device, add the Designer machine as a new server. You will need: (i) the machine's IP address (which you can find out with the DOS command ipconfig), and (ii) the port number you configured in the previous step.

 

To play back a test case, do the following:

 

1.In the Available Test Cases for Playback combo box (see toolbar screenshot above), select the test case that you want to play back. Note that you can play back test cases only, not test runs.

2.Click Trial Run Test Cases on Client (see toolbar screenshot above). The Trial Run on Client dialog opens (screenshot below).

MTDAutoTestPlaybkClient01

3.On the client device, connect to the Designer machine and refresh the solutions. On the client, you should see all the solutions that are currently active in MobileTogether Designer.

4.On the client device, start the solution for which you wish to play back a test case on the client.

 

The test case will be played back on the client. In MobileTogether Designer, the Trial Run on Client dialog (screenshot above) will be updated with page source data as the playback progresses. You can search in the page source data by clicking the Find button and entering the search string. The playback is automatically saved (whether there are differences or not) as a test run when it is closed. To check whether there were differences, click Manage Test Cases and Runs in the Automated Testing toolbar.

 

© 2018-2024 Altova GmbH