Continuing the test automation integration series that we started in the beginning of this year, we chose QTP as the automation tool of this month. This post assumes that you have basic understanding of ZBot and QTP. If you are not well versed with ZBot, it is highly recommended that you go through previous posts around basics of ZBot.
QTP is one of the most widely used automation tools. We received a bunch of requests to showcase Zephyr’s integration with QTP which also corroborated the fact. While most of the mechanism remains same when it comes to integrating any automation tool with ZBot, two areas that potentially differ are how we kick off actual testcases and how we parse results.
First, how to kick off: QTP comes packaged with a command line utility called cmdrv.exe. This is available inside bin of QTP installation (e.g. C:\Progam Files\HP\QTP\bin\cmdrv.exe). We use this executable and supply actual test and output folder to it. This can be done directly in Zephyr testcase where we provide the entire path with parameters. Alternatively, this can also be done in a batch file which could be specific to a given test machine and contain specific path. In the approach shown in video, we took second approach and created a batch file called qtrunner.bat which take same arguments (test path and output folder path).
Next, how to read results: In its very rudimentary form, ZIP parses the generated log file and looks for any errors. This could easily be changed to looking for specific message or even to use xml output. If there is no error is found, testcase is considered pass else failed. Result is then uploaded back into Zephyr with some comments.
Further in this series, we will show how we can run QTP scripts outside of ZBot and possibly make them part of CI and nightly builds. We will also cover some change in new version of QTP (known as UFT – Unified Functional Test). Stay Tuned.
QTP is one of the most popular testing tool and it’s been a pleasure to work with it and to develop a integrated solution that would enhance the meaning of both the tools for our users. Thanks for reading this post and please feel free to contact us with your issues / comments or chime in on our documentation page (Git Pages)