QTP: Running with MSBuild (DOS error codes)

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

Print

Comments on this entry:

# re: QTP: Running with MSBuild (DOS error codes)

Left by Zecty at 7/23/2008 5:11 PM
Gravatar
Nice.

Do we get to play with it?
Comments have been closed on this topic.
«December»
SunMonTueWedThuFriSat
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910