Our SCM guy wants to run some of our QTP scripts with MSBuild during the deployment process. That sounds great to me, but he then says the run has to return a DOS error code to indicate the status. He uses this error code to send e-mails to QA, Dev, etc.
Well, this is a problem: QTP can easily be run from a command-line, but it doesn't return a DOS error code. Several tools exist out there to run QTP tests also, but have the same issue. You can even write VBScript or batch files, but no error codes.
Until now...
I've written a small VB6 app (avoiding the interop problems with .Net) that wraps up calls to the QTP API to run tests. It takes parameters that are:
- The path to the test
- whether or not QTP should visible
- whether or not the results viewer should fire at the end
- where the results should be written
Nice thing is that is independent of the test, so you can run it for all kinds of uses...batch tests on your machine, etc. Pretty handy.
posted @ Wednesday, July 23, 2008 1:48 PM