Altova MobileTogether Designer

Managing Test Cases and Runs

Home Prev Top Next

You can open the Manage Test Cases and Runs dialog by clicking the Manage Test Cases and Runs icon MTDAutoTestIconManageTestRuns in the Automated Testing toolbar (see screenshot below).

MTDAutoTestToolBar

In the Manage Test Cases and Runs dialog (screenshot below) you can do the following:

 

Set up recording options for test cases.

Set up recording and playback options for subsequent test runs.

Specify that the test runs of individual test cases start with their persistent data reset to original values.

Reload and save MobileTogether Recording files (.mtrecord files). At any given time, there is at most one .mtrecord file per design file, and it has the same name as the design file (but a different file extension).

Delete and compare test runs.

Substitute a test case with one of its test runs. The test run takes on the role of the test case. Other test runs are deleted, and the selected test run becomes the new test case of that (now empty) group.

Deploy a test case to MobileTogether Server, retrieve test runs from the server, and delete a test case or test run from the server.

Click to expand/collapse

The dialog displays each recorded test case and its associated test runs (playbacks), together with relevant data. The date and time is taken from the client device as are other relevant client settings, such as the language.

 

Recording and 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.

 

Test cases and their associated test runs

The names of test cases are defined at the end of the recording process. In the Manage Test Cases and Runs dialog (screenshot above), you can change these names by double-clicking the name and editing it. Each test case and test run is identified by an internal ID. So if the test case/run has been saved to file (see below), a name change is recognized (on the basis of the internal IDs).

 

Playbacks that return a difference from the test case are stored as test runs that are associated with their base test case (the test case that was played back). Test runs are each automatically given a default name of Test Run when they are stored (see screenshot above). These names can be changed subsequently, by double-clicking the name and editing it.

 

In the Manage Test Cases and Runs dialog (screenshot above), test runs are considered to depend on their originating test case. So you can collapse and expand a test case to hide and show its associated test runs. If you delete a test case, then all its associated test runs are also deleted.

 

Merge typing steps

This button is enabled when a test case—not a test run—is selected, and it applies to edit fields only. If an action exists for the OnTyping event of an edit field, then every keystroke in the edit field will have been recorded as a separate step. If you wish to merge all the keystrokes into a single step for the whole edit field, click Merge Typing Steps. Note that this merge cannot be undone.

 

Resetting persistent data

Select the Reset check box of a test case (see the Manage Test Cases and Runs dialog screenshot above) to reset the design's persistent data to original values when this test case is played back.

 

Saving and reloading test cases and runs

All test cases and their test runs can be saved in a file called <mtdesignfilename>.mtrecord. Each MobileTogether design has one .mtrecord file associated with it. For example, the design file QS01.mtd will have a MobileTogether Recording file named QS01.mtrecord associated with it. The MT Recording file is saved in the same folder as the design file by clicking the Save button of the Manage Test Cases and Runs dialog (screenshot above). When you save the MT Recording file subsequently, it overwrites the MT Recording file that already exists.

 

If you wish to reload test cases and their associated test runs from the MT Recording file of the active design, click Reload. In this event, the test cases and test runs in the dialog will be replaced by those in the MT Recording file.

 

Deleting and comparing test runs

To delete one or more test cases/runs, select the test cases/runs and click Delete Selected. If you select a test case, then all its test runs will also be implicitly selected and deleted; however, you will be warned about this and prompted for a go-ahead. You can also delete all test runs across all test cases by clicking Delete All PLaybacks.

 

If a test run is different than its test case, then the part that is different is indicated in the Compared pane by a pink button (see screenshot above). For example, if an action of a test run is different, then the test run's Actions cell will contain a pink button (see screenshot above). If you click a pink button, the Compare Test Cases and Runs dialog will be displayed, in which the details of that test run and its test case are shown. To open this dialog, you can also select the test run and its test case, and click Compare Selected.

 

Properties of a test run

To see the properties of a test run, select it and click Compare Selected. The properties of the test run will be displayed in the Compare Test Cases and Runs dialog.

 

Converting an associated test run to a test case

To convert a test run to a test case, select it and click Replace Reference. The selected test run will replace its originating test case, and will take the name of the test case. All other test runs that were associated with the replaced test case will be deleted. A warning message will be displayed before the action is carried out, so you can cancel if you wish.

 

Server deployment

You can deploy one or more test cases of the active design to the server. You can do this in one of the following ways:

 

Deploy the design and its test cases via the File | Deploy to MobileTogether Server command.

Deploy test cases only (without the design) if the design has been deployed already. Do this by clicking Deploy in the Manage Test Cases and Runs dialog (screenshot above). If you click Browse in this dialog, the deployed solutions are displayed together with the number of already deployed test cases in round brackets. (The number on angular brackets is the MobileTogether Designer version that was used to generate the test case.)

 

After a test case has been deployed to the server and been made active, it can be played back each time the solution is started on the client. If multiple test cases have been made active on the server, then all these test cases will be played back on the client. Playback results are stored on the server. You can retrieve these playbacks to MobileTogether Designer by clicking Retrieve in the Manage Test Cases and Runs dialog (screenshot above). The retrieved playbacks are stored as test runs of the test case that was deployed, and can be handled in exactly the same way as other test runs.

 

You can delete deployed test cases from the server. Do this as follows: In the Manage Test Cases and Runs dialog (screenshot above), select the test case to delete, then click Delete Deployed.

 

For more details about these procedures, see Deploying to Server.

 

© 2017-2023 Altova GmbH