Hi Ritesh,
The above statement will return the current run status of the test.
You have to use this statement only at the end of your script i.e end of last action in your test. If there are any other actions that need still needs to run then the run status will be Running.
Please try this and let me know..
Hi Ritesh,
The above code that Vinod pasted can not be used in QTP instead use the same code in a vbs file and then run the vbs file. It works perfectly
Paste the above code in a vbs file(*.vbs) and run the vbs file.
Let me know if it works
Code:
Run_Status = qtTest.LastRunResults.Status
The above statement will return the current run status of the test.
You have to use this statement only at the end of your script i.e end of last action in your test. If there are any other actions that need still needs to run then the run status will be Running.
Please try this and let me know..
Hi Ritesh,
The above code that Vinod pasted can not be used in QTP instead use the same code in a vbs file and then run the vbs file. It works perfectly
Code:
Set QtpApp = CreateObject("QuickTest.Application")
QtpApp.Launch
QtpApp.Visible = True
QtpApp.Open "C:\TestScript"
Set qtResultsOpt = CreateObject("QuickTest.RunResultsOptions") ' Create
the Run Results Options object
qtResultsOpt.ResultsLocation = "C:\TestScrip" ' Set the results
QtpApp.Test.Run ' Run the test
MsgBox QtpApp.Test.LastRunResults.Status ' Check the results of the test run
QtpApp.Close
Paste the above code in a vbs file(*.vbs) and run the vbs file.
Let me know if it works