Philippe_Lebacq
17 years agoContributor
teststep status
I made a calling testcase that I'm using to prompt some values and to run the other testcases in my testsuite; at the end of the calling testcase, I'm prompting the run status with this teardown script.
How can I retrieve the status of the called testcases (I need OK/Failed, not the details) ? I can get the calling testcase status but not the ones from the 'run testcase' steps (these are step3 & 4 in my calling testcase).
My prompt shows correctly:
testcase = the calling test case name, steps = the 2 run testcases names, the calling testcase status
and what I cannot get: step3 = class com.eviware.soapui.model.testsuite.teststepresult$teststepstatus
Thanks for help,
Philippe.
import com.eviware.soapui.SoapUI;
import com.eviware.soapui.model.testsuite.TestRunContext;
import com.eviware.soapui.model.testsuite.TestRunner;
import com.eviware.soapui.model.testsuite.TestRunner.Status
import com.eviware.soapui.model.testsuite.TestStepResult;
def testcase = testRunner.getTestCase();
def steplist = testcase.getTestStepList() ;
def a3 = steplist[3];
def step_a3 = com.eviware.soapui.model.testsuite.TestStepResult.TestStepStatus;
def a4 = steplist[4];
// possible values = def step_a3 = com.eviware.soapui.model.testsuite.TestStepResult.TestStepStatus.values();
def teststatus = testRunner.getStatus();
com.eviware.soapui.support.UISupport.showInfoMessage(
"testcase = " + testcase.name + "\n"
+ "steps = " + a3.name + " + " + a4.name + "\n"
+ " --> " + "testcase status = " + teststatus + "\n"
+ "step3 = " + step_a3 + "\n"
);
How can I retrieve the status of the called testcases (I need OK/Failed, not the details) ? I can get the calling testcase status but not the ones from the 'run testcase' steps (these are step3 & 4 in my calling testcase).
My prompt shows correctly:
testcase = the calling test case name, steps = the 2 run testcases names, the calling testcase status
and what I cannot get: step3 = class com.eviware.soapui.model.testsuite.teststepresult$teststepstatus
Thanks for help,
Philippe.
import com.eviware.soapui.SoapUI;
import com.eviware.soapui.model.testsuite.TestRunContext;
import com.eviware.soapui.model.testsuite.TestRunner;
import com.eviware.soapui.model.testsuite.TestRunner.Status
import com.eviware.soapui.model.testsuite.TestStepResult;
def testcase = testRunner.getTestCase();
def steplist = testcase.getTestStepList() ;
def a3 = steplist[3];
def step_a3 = com.eviware.soapui.model.testsuite.TestStepResult.TestStepStatus;
def a4 = steplist[4];
// possible values = def step_a3 = com.eviware.soapui.model.testsuite.TestStepResult.TestStepStatus.values();
def teststatus = testRunner.getStatus();
com.eviware.soapui.support.UISupport.showInfoMessage(
"testcase = " + testcase.name + "\n"
+ "steps = " + a3.name + " + " + a4.name + "\n"
+ " --> " + "testcase status = " + teststatus + "\n"
+ "step3 = " + step_a3 + "\n"
);