Modify QC Test run status
I need to set an execution Status as "Not Completed" but it's being a bit embarrassing...
I'm trying the code below, but Status always remains as "PASSED". I'm able to get the step status to "Not Completed" but, always, the test status remains as "PASSED".
The following is the code I have tried. I've also tried to modify the test status by executing a query and modifying the Status from TESTCYCL table... but still not possible.
Set objOrun = QCutil.CurrentRun
Set objSfact = objOrun.StepFactory
Set att = objSfact.AddItem(null)
aStepname = "*Last Step*"
att.name = aStepname
Set steplist = objSfact.NewList("SELECT * FROM Step WHERE ST_STEP_NAME='" & aStepname & "'")
For each mystep in steplist
mystep.Status = "Not Completed"
myStep.Field("ST_DESCRIPTION") = "-"
myStep.Field("ST_EXPECTED") = "-"
mystep.Field("ST_ACTUAL") = "-"
objOrun.Status = "Not Completed"
Re: Modify QC Test run status
Are you running this in the test that you are trying to set the status for?
If so, the reporter will always come by and mark it pass once the run completes with no failures.
Such manipulation should be done from outside the test with a .vbs script or some such.
You can use below code as the last step of execution to set script status as "Not Completed"
Set App = CreateObject("QuickTest.Application")