Forum Discussion
Philippe_Lebacq
16 years agoContributor
I'm afraid I did not save that info.
I found using the search.
Here's my script. I put it as teardown script of the calling test case. steplist 3 & 4 are the 2 steps calling my 'functional' testcases.
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 a4 = steplist[4];
def teststatus = testRunner.getStatus();
//
def step_a = "\n";
def i = 0;
for( r in testRunner.results )
{ i++;
step_a = step_a + i + " - '" + r.testStep.name + "' finished with status " + r.status + "\n" ;
}
// check the status property of the TestStepResult object created for the execution of the corresponding TestStep, available from testRunner.results array
// list possible status values : def step_a3 = com.eviware.soapui.model.testsuite.TestStepResult.TestStepStatus.values();
def P1 = testRunner.testCase.getTestStepByName( "Properties" );
com.eviware.soapui.support.UISupport.showInfoMessage(
"Run testcase = " + testcase.name + "\n"
+ "Functional steps = " + a3.name + " + " + a4.name + "\n"
+ " --> " + "Testcase run status = " + teststatus + "\n"
+ "Test steps run status : " + step_a + "\n" +
"Run parameters : Env= " + P1.getPropertyValue( "testenv" ) + "\n"
);
I found using the search.
Here's my script. I put it as teardown script of the calling test case. steplist 3 & 4 are the 2 steps calling my 'functional' testcases.
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 a4 = steplist[4];
def teststatus = testRunner.getStatus();
//
def step_a = "\n";
def i = 0;
for( r in testRunner.results )
{ i++;
step_a = step_a + i + " - '" + r.testStep.name + "' finished with status " + r.status + "\n" ;
}
// check the status property of the TestStepResult object created for the execution of the corresponding TestStep, available from testRunner.results array
// list possible status values : def step_a3 = com.eviware.soapui.model.testsuite.TestStepResult.TestStepStatus.values();
def P1 = testRunner.testCase.getTestStepByName( "Properties" );
com.eviware.soapui.support.UISupport.showInfoMessage(
"Run testcase = " + testcase.name + "\n"
+ "Functional steps = " + a3.name + " + " + a4.name + "\n"
+ " --> " + "Testcase run status = " + teststatus + "\n"
+ "Test steps run status : " + step_a + "\n" +
"Run parameters : Env= " + P1.getPropertyValue( "testenv" ) + "\n"
);
Related Content
Recent Discussions
- 3 hours agoemoya
- 6 hours agoMyBalanceNow
- 6 days agoKLWallace