Sequencing Test Scripts

Overview
 

Sequencing of test scripts determines the order in which the test scripts are executed when you are running two or more test scripts in a test suite. Sequence can be generated for all the test scripts of a Suite or a filter can be defined to filter out some test scripts matching a specified criteria and then sequence only the filtered test scripts for execution.

 

How to Sequence Test Scripts
 

You can execute the test in two modes Filter based Sequencing or Manual Sequencing
 

Filter based Sequencing
 

In this mode, QEngine sequences the test scripts in a test suite based on a predefined logic (i.e Filters). If scripts of a Suite are mutually independent of each other then you can choose this mode to automatically sequence the test scripts. If you have created a suite filter then during playback, the scripts that match the filter will be selected and only the selected ones will be sequenced.
 

To Execute suite in this mode, select the "Suite Name" in the web functional tree, and choose the link "Start Play with Filter / Sequence" . In the screen disaplyed, select the "Filter" option and select appropriate filter name in the combo and then click on "Start Play" button to execute the suite. This will automatically sequence the scripts available in the suite by applying the selected filter to sequence the script for execution. The script that are matching the filter criteria only will be sequenced for test execution.

Steps to create new Filter

  1. Choose the "Settings" node from the suite tree.
  2. In the "Settings" screen shown, select the "Script Execution Order" tab.
  3. In the resulting screen, click the "Filter Configuration" link.
  4. This will open "Filter Configurator" screen. Click on "Add New Filter" to create new filter.

Manual Sequencing
 

In this mode, you have to define the order in which the test scripts should be executed using the Sequence Editor screen.
 

If your test scripts are dependent on one another then you can choose to manually sequence the test scripts. Dependence may be due to variables or data of one being used in another or due to application state. If any given script depends on the data or application state changes of the script executed before them then they have to be run in the order in which they were intended. If you do not run the scripts in order, it will most likely fail due to missing or incorrect data, or invalid application states. Sequence Editor allows you to manually select the order in which the test scripts should be executed.
 

To Execute suite in this mode, select the "Suite Name" in the web functional tree, and choose the link "Start Play with Filter / Sequence" . In the screen disaplyed, select the  "Sequence" option and select the appropriate sequence name in the combo and then click "Start Play" button to execute the suite. The scripts will be executed based on the order specified in the order specified in the sequence.


Steps to create new Sequence

  1. Choose the "Settings" link in the tree and click on the "Script Execution Order" tab.

  2. From the left pane, choose the Script Execution Order tab and choose the Manual radio option.

  3. Click on the Sequence Editor link. This will display the Sequence Editor screen.

  4. This screen will display the Show All Scripts button, Show Existing Sequence button and Open Templates button. The Show All Scripts button allows you to create a new sequence for the scripts in the test suite. The Show Existing Sequence button allows you to view the existing sequence for the test suite (if already created) or change the order of scripts or add/remove scripts from the sequenced list. The Open Templates button allows you to open the saved Sequence Template files (if any). You can also manually sequence for filtered scripts.

Creating New Sequence

  1. To create a new sequence click on the Show All Scripts button. This will display the Available Scripts list and the Scripts Execution Order list.

  2. To move all the scripts from Available Scripts list to Scripts Execution Order list, click the All right arrow .

  3. To move selected scripts from Available Scripts list to Scripts Execution Order list, select the script from Available Scripts list and click the right arrow .

  4. To move all the scripts from Scripts Execution Order list to Available Scripts list, click the All left arrow .

  5. To move selected scripts from Scripts Execution Order list to Available Scripts list, select the script from Scripts Execution Order list and click the left arrow .

  6. To change the order of scripts to be executed, select the script from the Scripts Execution Order list and use the up arrow or down arrow .

  7. To activate the new sequence, click the Activate this sequence button which will active the sequence.

  8. To save this sequence in a file, click the Save As Template button. This will prompt for a file name.

  9. Specify a file name to save the current sequence in a file.

  10. To close the UI, click the Close button.

Viewing/Changing Existing Sequence

  1. To view the currently active sequence (if any) click on the Show Existing Sequence button. This will display the existing scripts to be sequenced in the Scripts Execution Order list.

  2. Now, you can move scripts from Available Scripts list to Scripts Execution Order list or change the order of scripts in Scripts Execution Order list to execute the scripts in the selected order. Refer to Steps 2 to 6 in the above sub-topic "Creating New Sequence"..

  3. To activate the current sequence, click the Activate this sequence button which will active the current sequence.

  4. To save this sequence in a file, click the Save As Template button. This will prompt for a file name.

  5. Specify a file name to save the current sequence in a file.

  6. To close the UI, click the Close button.

Editing Sequence for Filtered Scripts

  1. From the Sequence Editor, you can also manually change the sequencing for filtered scripts. This can be done either while creating a new sequence using the Show All Scripts button or while editing the existing sequence using the Show Existing Sequence button .

  2. Click on the Filter icon placed inbetween the Available Scripts list and the Scripts Execution Order list. This will display the Filter Configuration screen.

  3. In this screen, you can either Activate or Deactivate the existing filter or add/edit filters for the selected test suite. For details of setting filters for test suites, please refer to Help->Suite Manager->Setting Filters for Suite.

  4. As soon as you click on the radio option in the Activate/Deactivate column, the scripts will be filtered based on the specified match criteria and will be automatically sequenced. The sequenced scripts will be displayed in the Scripts Execution Order list.

  5. Here again, you can move scripts from Available Scripts list to Scripts Execution Order list or change the order of scripts in Scripts Execution Order list to execute the scripts in the selected order. Refer to Steps 2 to 6 in the above sub-topic "Creating New Sequence".
  6. To activate the current sequence, click the Activate this sequence button which will active the current sequence.

  7. To save this sequence in a file, click the Save As Template button. This will prompt for a file name.

  8. Specify a file name to save the current sequence in a file.

  9. To close the UI, click the Close button.

Open Saved Sequence Files

  1. Click on Open Templates button to open saved sequence files (if any). This will display a combo that lists the saved sequence files.

  2. Select one of the file from the combo and click on the Open button.

  3. The scripts to be sequenced from this file will be displayed in the Scripts Execution Order list.

  4. Here again, you can move scripts from Available Scripts list to Scripts Execution Order list or change the order of scripts in Scripts Execution Order list to execute the scripts in the selected order. Refer to Steps 2 to 6 in the above sub-topic "Creating New Sequence".

  5. To activate the current sequence, click the Activate this sequence button which will active the current sequence.

  6. To save this sequence in a file, click the Save As Template button. This will prompt for a file name.

  7. Specify a file name to save the current sequence in a file.

  8. To close the UI, click the Close button.



Copyright © 1999, AdventNet Inc. All Rights Reserved.