How to set different QTP test result folder locations?
Question ID: 104996
2
0

We run QTP tests from command line. I want to be able to send the test results to different folders depending on if they pass or not.

Anybody got any ideas?

Marked as spam
Posted by (Questions: 387, Answers: 66)
Asked on April 30, 2013 9:25 pm
78 views
Answers (1)
1
Private answer

You can do that pretty easily.

Start by checking the return value of your checkpoints. Look at this posting to see how to do that: http://eyeontesting.com/questions/3058/qtp-checkpoints.html

Next, you need to add this code to set the folder location:

Set qtResultsOpt = CreateObject(''QuickTest.RunResultsOptions'') ' Create the Run Results Options Object
If blPassed Then
qtResultsOpt.ResultsLocation = ''C:MyTempLocationPassed'' ' Set the result location for passed tests
Else
qtResultsOpt.ResultsLocation = ''C:MyTempLocationFailed'' ' Set the result location for Failed tests
End If

After the end of the test, be sure to clear qtResultsOpt:

Set qtResultsOpt = Nothing ' Release the Run Results Options object

Marked as spam
Posted by (Questions: 17, Answers: 807)
Answered on April 30, 2013 9:25 pm
0
Great, thanks for that solution!
( at April 30, 2013 9:37 pm)
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top