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.
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
hi, do you know the API to call the email notification of the test set and force the email notification is sent out?
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?