Vinktank

Pragmatic software testing & development by Kristan Vingrys

Quick Test Pro and Continuous Integration - a better way.

After a couple of projects where QTP has been integrated with Continuous Integration (Cruise Control, Bamboo, Hudson) I have found that tdruntestset.exe (see Integrating Quick Test Pro with Cruise Control) is not the best way to do the integration. This executable takes up a large amount of CPU time, is very sensitive to parameters passed and Quality Center structure. So instead it has been easier to create a small script that uses the Quality Center API, logs in to Quality Center, locates the Test Set (or Test Sets) required to execute, runs them and waits for the tests to finish. Upon test set completion it checks the results to see if there were any failures, if any tests failed the script fails causing the build to fail. This script gives me more control over which tests sets to run, changing the run names to match build numbers etc. The script is then called via an ant exec tag (using cscript to execute the vbscript) and integrated with your continuous integration server of choice. (I have done it with Cruise, Bamboo and Hudson).

Run Test Suite From Quality Center is a copy of a “generic” vbscript, you will need to adjust it to your environment.


4 Comments | Ping Pong

  1. Pankaj Nakhat July 1st, 2009

    Hi,
    Another way of integrating QTP tests with cruise is to make it independent of QC or TD. However, you lose the QC tracklng of tests, but at the same time gives greater flexblity and speed execution for the tests. You can use VBS to launch QTP tests directly from commandline at the same time achieving better control over them.

    Pankaj.

  2. admin September 9th, 2008

    I don’t have access to the API documentation so I am not able to tell you the class or method to use. If you have access to an instance of Quality Center, under the help->documentation you can get the API documentation which should help you identify which class and/or method you need to use.

    Cheers, Kristan

  3. emma September 9th, 2008

    hi, do you know the API to call the email notification of the test set and force the email notification is sent out?

  4. Sam Chen June 17th, 2008

    That’s awesome. Last time when I was in TWU, Adrian and I created a similar vbscript file to run QTP tests. Instead of creating an object of (”TDApiOle80.TDConnection”), we created an object of (”QuickTest.Application”). Our script file was quite simple and ugly, however, yours is much detailed and well-formatted. Thanks a lot. By the way, could you put some comments, just for those people who are not pretty familiar with vbscript?

Leave a Reply

Freshest comments displayed topside. Comment accordingly. Name and email are required. Track comments via RSS.

Design by: Derek Punsalan
RSS