Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP test run status
#1
Hi,

After each test case run I want to set flags correspondingly.Is there any method by which I can know the last test run status.I used Lastrunsttaus and it always shows the status as Running.

Thanks,
Ramya
Reply
#2
Hi,
Is ur requirement is something like a single script driving n number of scripts and u want to store the result of each n number of test cases?
Please elaborate. If yes then I can surely help u and if not, then u must create a .txt file which will include the run status(say this run is nth)in it, when u go for antother run i.e. n+1 then u can refer the .txt file for the run status of previous execution and one more solution u can go for settings.add(key,value) to store the result. Please try this and let me know in case of any query.

Regards,
Sankalp
Reply
#3
Assuming that you are running multiple scripts say script1, script2, script3 you may try the following code by launching it from a .vbs file.
Code:
testSet = Array( "script1", "script2", "script3" ) Set app = CreateObject("QuickTest.Application") If Not app .Launched Then ' If QuickTest is not yet open app.Launch ' Start QuickTest (with the correct add-ins loaded) End If app.Visible = True ' Make the QuickTest application visible For i = LBound( testSet ) To UBound( testSet ) testPath = PathFinder.Locate( testSet( i ) ) if testPath = "" Then Reporter.ReportEvent micFail, "Executing Set", "Test " & testSet( i ) & " not found" Exit For End If app.Open testSet( i ) ' Open the test app.Test.Settings.Run.IterationMode = "oneIteration" ' Run only one iteration app.Test.Settings.Run.OnError = "Stop" Set qtResultsOpt = CreateObject("QuickTest.RunResultsOptions") ' Create the Run Results Options object qtResultsOpt.ResultsLocation = "C:\Tests\Results" ' Set the results location app.Test.Run qtResultsOpt, True ' Run the test and wait for return if StrComp( app.Test.LastRunResults.Status, "Passed" ) <> 0 Then Reporter.ReportEvent micFail, testSet( i ), app.Test.LastRunResults.LastError End If Next Set qtApp = Nothing ' Release the Application object
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Send automatic email notification when test run started helmzshelmz 0 1,606 04-03-2020, 07:54 AM
Last Post: helmzshelmz
  Error while opening test run results vkalyankar 3 4,974 11-12-2014, 09:49 AM
Last Post: vinod123
  Hyperlink click is not automated in UFT 11.5 test run prinju 1 3,312 11-03-2014, 12:04 PM
Last Post: vinod123
  Test run cannot continue oak 1 5,396 11-03-2014, 10:54 AM
Last Post: vinod123
  How to send QTP status results to mobile Naresh 0 3,322 09-02-2014, 03:50 PM
Last Post: Naresh

Forum Jump:


Users browsing this thread: 1 Guest(s)