Test / Test & Resync

Table of Contents

Test #

The Test button enables a newly recorded Script to be checked for validity prior to being included in a Playlist or a modified Script to be checked to ensure that the changes made were the desired ones.  If the TestDrive Sidebar is not already open then it is automatically launched, the application under test is also launched if this is specified within the application definition, following that playback will begin immediately.  Messages in the taskbar at the bottom left of the Script Editor indicate which action is currently being played and if there are any errors.

If any issues are encountered at playback time which cause playback to end then a dialog appears at the bottom left of the TestDrive Sidebar indicating the nature of the issue.  

Please note that the results of a playback using the Test button cannot be viewed or saved, this can only be achieved when playing back a Playlist which contains the Script.

Test & Resync #

If you know that your Script needs updating, perhaps because the application under test has changed, you can do this by clicking the down arrow beneath the Test button and selecting the Test & Resync option.  This will playback the Script, however the expected screens will be automatically updated with the actual ones during the process.  In addition there may be occasions when user intervention is either required or desirable and there are two ways to achieve this.

Edit the Script to gain access to the following Resync Mode properties.

  • Screen Check Checking this option will pause playback if the new actual screen contains input controls that the old one did not, thus giving the user the opportunity to manually key the input. 
  • Checking Rule Specifying a Checking Rule means that playback will pause if a rule failure is encountered, also enabling user intervention if required.

It is also possible to use the Recovery Options which are available by right clicking anywhere in the Script tree view.  Please note that these options remain in place while the Editor is open but do not get saved once the Script Editor is closed.

  • Pause All – Pause playback on every screen and piece of input.
  • Pause Here – Pause playback on the currently selected screen or piece of input.
  • Start Here – Start playback from here.
  • End Here – End playback here.
  • Checking Options – Display the Script Properties so that the Screen Check and Checking Rule options described above can be changed.

Once any recovery options have been set and the Test & Resync option taken, the Script will play back until a pause reason is detected, in which case a message will be displayed by TestDrive indicating the reason for the pause and a screen similar to the following is shown.  The reason for the pause is also displayed at the top of this screen.

The left hand panel displays the entire script with those actions that have not yet been played greyed out.  The expected and actual screens are displayed side by side to assist the user with their next action. 

The following options are available from the toolbar.

Continue Playback – Resume playback from where it ended.

The following three options are available by clicking the arrow to the right of the Continue Playback option.

  • Continue Single Step – Resume playback but play only the next event.
  • Restart From Selected Event Highlight an event in the Script tree and select this option to restart the Script from there, thus enabling actions to be repeated or skipped.
  • Single Step From Selected Event Highlight an event in the Script tree and select this option to restart the Script from there and play the next event only, thus enabling actions to be repeated or skipped.
  • Record New – Switch to record mode and add any new events to the position in the Script that playback has reached.  Click the Stop button in TestDrive to end the recording phase and add the new events to the Script.
  • Record New & Insert Before Selected Event Switch to record mode and add any new events to the position in the Script that is currently highlighted.  Click the Stop button in TestDrive to end the recording phase and add the new events to the Script.
  • Stop Resync Playback – End the playback at which time you will have the option to save the changes made so far.

The following options are available by right clicking an event in the Script tree.  Once any additional options have been set, use the Continue options to restart playback.

  • Expand all Screens – Display screens and input.
  • Collapse to Screens – Display screens only.
  • Discard Selected Events – Delete those events which are currently highlighted from the Script.  Multiple selections are available.
  • Keep Expected Screen – Do not replace the currently selected screen with the new actual version, instead retain the original.
  • Pause Here – Add a new pause or remove an existing one.
  • Edit Properties – Change the screen or input properties.  If changing input, it is possible to drag the target element icon over the actual or expected screen picture to dynamically change the target for the input.
  • Restart Playback from Here Use this option to either skip or retry events by modifying from where playback will be restarted.
  • Single Step from Here – Restart the Script from here and play the next event only, thus enabling actions to be repeated or skipped.
  • Record New from Here – Switch to record mode and add any new events to this position in the Script.  Click the Stop button in TestDrive to end the recording phase and add the new events to the Script.
  • Stop Playback – End the playback at which time you will have the option to save the changes made so far.

Once playback has either been stopped or has come to a natural end, a screen similar to the following is displayed.  Click Replace to update the original script with the new version or Cancel to discard any changes made during Resync mode.  If the Script is replaced, the changes are not permanent until it is saved to the database.