Forum Discussion

yassir's avatar
Occasional Contributor
8 years ago

java code to print testStep of executed soapUI TestCase

i am executing a soapUI project using java code below, but i am unable to print out the responses of each of the testSteps in the executed testCases


public void testcaseexeuted() throws XmlException, IOException, SoapUIException {

WsdlTestCase tc = ts.getTestCaseByName("testcaseexeuted");
String tc_name = tc.getName();
new LogConsoleHandler(tc_name);
// run a specific testCase
TestRunner tcRunner = PropertiesMap(), false);

String output = tcRunner.getRunContext().expand("${testStepname#Response}").toString();

Assert.assertEquals(tcRunner.getStatus(), TestRunner.Status.FINISHED);



i am receiving this error with the code above

ERROR [SoapUI] An error occurred [Cannot get property 'testRequest' on null object], see error log for details