Excel automation and VBScript can be used to create a test suite that can control the run sequence of QTP scripts and present a Summary report of the automation run cycle.
Its simple enough to double-click an icon and the VBScript program will create an excel sheet, populated with all the scripts from a Test folder. Here’s the folder structure:
Click here to get the files.
The CreateSuite.vbs program creates an excel sheet ..
.. and populates it with all the QTP scripts from the Tests folder (folder hierarchy within the Tests folder does not matter, a valid script folder will be fetched).
Here’s how the excel sheet looks after running the CreateSuite program:
This Test Suite has been created in the TestSuite folder, as the Suite.xls file:
Once the list of tests is available, one can choose to configure a subset of the listed tests to be run, like in the case below, we turn off the fourth test:
Now that the list of tests to be run is ready, we can double-click the SuiteRunner.vbs program to get the automation run started:
Some features of the Runner:
- The Suite Runner will read and run the scripts row-by-row.
- All scripts that are marked as Y in the Run ? column and that have a Not Run or a Failed result will be run.
- The full Suite can be iterated to run multiple times, for failed tests to get a chance to run in case some unexpected network state had prevented the earlier run. The last attempted iteration number is noted in the column Suite Cycle Itr.
- The Start and End times of each test are noted in the relevant columns.
- The Test Run Result is noted and highlighted with appropriate color in the Result column.
This excel sheet can now be used for further analysis of failures and reporting the same to the Stakeholders!
Comments
Post a Comment