Skip to main content

Excel Automation and a palatable QTP Suite

 

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:

image

Click here to get the files.

 

The CreateSuite.vbs program creates an excel sheet ..

image

.. 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).

image

Here’s how the excel sheet looks after running the CreateSuite program:

image

This Test Suite has been created in the TestSuite folder, as the Suite.xls file:

image

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:

image

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:

image

Some features of the Runner:

  1. The Suite Runner will read and run the scripts row-by-row.
  2. All scripts that are marked as Y in the Run ? column and that have a Not Run or a Failed result will be run.
  3. 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.
  4. The Start and End times of each test are noted in the relevant columns.
  5. The Test Run Result is noted and highlighted with appropriate color in the Result column.

image

This excel sheet can now be used for further analysis of failures and reporting the same to the Stakeholders!

Comments

Popular posts from this blog

Multi XSD XML Validation

  This program validates XMLs against referenced XSDs. The XSDs are assumed to be external to (not embedded in) the XML. List the XSDs and XMLs details in separate sheets in the program’s excel book and run the program. The program will generate errors/ warnings in console window.

Study of an AngularJS application: Feeding Excel based data into an SVG Flowchart with AngularJS and NodeJS

Reference article Implementing a Flowchart with SVG and AngularJS Source code from original article is here .   Customization goals a) Feed the SVG flowchart nodes from excel datasheet b) Understand a bit of the AngularJS and NodeJS client-server communication c) Learn javascript debugging on server side as well as client side using VS Code editor As a beginner to AngularJS-NodeJS, the customization is based on a partial study of the original article .   Most challenging challenge as a dummy There was a space of time when I thought I was publishing the server side JSON data to the same URL as the front-end html page. And then trying to debug it and not knowing why: in one case the data was coming from the server side only, while in the other case it was coming from mocked data on client side. Kept on looking for whether data was getting lost, or did I need routing. There were debug sessions where both server side and client side individually appear...

Two-way XML Diffgram (XML structure sensitive)

     With pretty printed source XMLs: Same source XMLs, but in single line – diffgram output remains the same: Download the program files from here .