Micro Focus QTP (UFT) Forums
Code to run all QTP scripts and see all results - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Code to run all QTP scripts and see all results (/Thread-Code-to-run-all-QTP-scripts-and-see-all-results)

Pages: 1 2


Code to run all QTP scripts and see all results - Pkapoor - 07-02-2013

hello ,

I am trying to see how to run to run all my QTP scripts together and came up with
Code:
[set QtpApp=createobject("Quicktest.application")
QtpApp.launch
QtpApp.visible=true
QtpApp.open ("D:\Storage Secure\QTP sample practice\Tests\SSMC Modules\TestAddLoginVerifyLogout-Menu")
set QtpTest=QtpApp.test
QtpTest.run
QtpApp.open ("D:\Storage Secure\QTP sample practice\Tests\SSMC Modules\TestAddLoginVerifyLogout-Tree")
set QtpTest=QtpApp.test
QtpTest.run
'QtpTest.close
'QtpApp.quit]


Now when i want to see the result only last test result is shown in result viewer. how can i see results to all test cases?

Is this the best way to perform this operation to run all test cases collectively?


RE: Code to run all QTP scripts and see all results - supputuri - 07-02-2013

There are many ways we can do it.

1) Simple way is using MTM (Multi Test Manager) where you will build a test suit and then simple hit on Run, which will execute the scripts and give you the status report. But, we have to make sure that the results path is not pointing to Temp.
2) Develop a custome reporting where all the steps will be stored in your desired location.
If you don't want to change your current code, then you can change the results folder to you desired folder where you want to see the Results, once you are done with scripts execution you can access all the execution reports.

Let me know if you need any more help.


RE: Code to run all QTP scripts and see all results - Pkapoor - 07-02-2013

Thanks supputuri ...and Yes I need more help Smile

1 .Where can i get MTM to download and install ? I can not find it online!

2. How can i create a custom report? Please elaborate and share any links if you can.

3. How can i change the path of test results folder so that i can see result?


RE: Code to run all QTP scripts and see all results - Sathiya - 07-03-2013

Automate like this:
1.Open results viewer from qc after each execution
2.capture desktop
3. save it with the testcase name with time stamp
4. view or share anyfile @ anytime
or
After each execution export the execution results from qc as html report


RE: Code to run all QTP scripts and see all results - Pkapoor - 07-03-2013

My test cases are not related to QC.
I just have qtp as independent tool used to automate test scripts.

Please suggest how can I see test results for all test cases collectively.
PS I need a collective report showing what all test cases pass and which of them fails


RE: Code to run all QTP scripts and see all results - Ankur - 07-04-2013

Have you checked with Test Batch Runner available at Start > All Programs > ....> Tools > test Batch Runner.


RE: Code to run all QTP scripts and see all results - Pkapoor - 07-04-2013

yes , test batch runner do not show test result report.
I need to see a report of all test cases executed


RE: Code to run all QTP scripts and see all results - supputuri - 07-04-2013

Hi PKapoor,

Sorry for the delay...
1)Where I can get the MTM?
check this link : Download MTM
2) Custom Reporting: you have to write your own custom report using the Reporter class in QTP.
3) How to change the results path?
User the QTP object (AOM to change the automation test results path).
Snippet:

Code:
'Create the Run Results object
set oQTPResultsLoc = CreateObject("QuickTest.RunResultsOptions")
'Make sure that you have the required folders for results storing.
'In this example C:\Test Results is the folder where I want to store my results with Test Case name.

'Now change the results location
oQTPResultsLoc .ResultsLocation "C:\Test Results\" & Environment("TestName")

Once your script execution is completed you can see each script report in this location.
Ping me if you are looking for any more help in this regard.


RE: Code to run all QTP scripts and see all results - Pkapoor - 07-05-2013

Thanks Supputuri,

1. I went to this MTM link before but could not download MTM from here Sad
2. In custom code .. can i see all results in 1 page instead of browsing each test result report file seperately?


RE: Code to run all QTP scripts and see all results - Staff - 07-05-2013

Please ensure to include your code between [code] tags while asking or replying to questions. I have done this for you for this time.