Any thoughts on using QCUtil to set Run Status of all tests in a Test Set to some status like "Failed".
This is the problem:
There is a testset in QC called "TS - A"
This has around 5 tests. Based on certain external status flag, i would want to set the current run Statuses of all these 5 tests to the flag.
Say i put this code in a 6th Test and include it last in the Testset "TS - A".
So this should ideally parse all the Tests in "TS - A" and set the Status to flag.
Iam using the code:
Set rn = QCUtil.CurrentRun
Set ts = QCUtil.CurrentTestSet
tst.Field("TS_EXEC_STATUS") = "Failed"
rn.Field("RN_STATUS") = "Failed"
Get a reference ot the test set that the test lives in. Get it's TSTestFactory. Get a list of all tstests using newlist(). Loop through all tstests setting .status and .post. Might be 10 lines of code.
Maybe less if you cheat.
<font class="small">Code:</font><hr /><pre>
For Each objTSTest in QCUtil.CurrentTestSet.TSTestFactory.Newlist
objTSTest.Status = "Failed"
Set objTSTest = Nothing</pre><hr />