In Microsoft Visual Studio 2010 there is a Generic Test type that allows you to integrate with automation tools like QTP. I have created a pretty simple solution that allows you to use your existing QTP automation scripts within the Microsoft Visual Studio
testing framework and here's a sample below. The key part of this solution is transforming HP's QTP format to Microsoft’s Generic Test format so that you can publish the results to TFS. The added benefit of this integration is that you can also use TFS
for bug tracking and more.
You can download the solution here QTP_TFSGenericTest.zip
- Download/Unzip QTP_TFSGenericTest folder to the C drive
- The contents of the C:\QTP_TFSGenericTest folder look like below
- QTPResults folder - This will store the QTP result files
- QTPTFSGenericSolution folder - This is the VS Solution with the Generic Test
- TFSGenericTestResults folder - This will store the transformed TFS Generic Test results file
- QTP.vbs - This is the main script that will execute QTP and transform the results file.
- Right-mouse click on the QTP.vbs file > select Edit
- Replace the highlighted value below with the path of your QTP test
- Save the QTP.vbs
- Navigate to C:\QTP_TFSGenericTest\QTPTFSGenericSolution
- Open the QTPTFSGenericSolution.sln(You will need Visual Studio 2010 to open this file)
- Double-click the QTPTFS.GenericTest
- The Generic Test will open and you will see the following below
- Navigate to the Test menu > Windows > Test View
- Click on the Run button as highlighted below
- You will then see the results of your Generic Test running a QTP script, in my case it Passed!
You can download the solution here http://qtptfs.codeplex.com/releases/view/75680
Each version of QTP will require a different transform file so if you would like more info, contact me directly.