Contributions
Re: Get the status of a teststep that already has been executed
Try this: import com.eviware.soapui.impl.wsdl.teststeps.WsdlTestStep; def step = context.testCase.testStepList[context.currentStepIndex - 1]; assert step instanceof WsdlTestStep; testRunner.results[context.currentStepIndex - 1].getStatus()9 years agoPlace ReadyAPI QuestionsReadyAPI Questions9.3KViews0likes2CommentsRe: Get the status of a teststep that already has been executed
"When I run this script it always logs an UNKNOWN" That's because the instanceresult it's empty. You only know the status of a certain step after yourun the step. That's what the TestRunner class does. It loop's all the test steps and invoques the method:runTestStep() Basically I think that you can get the result by two ways: (a) Run the step again from the groovy script (b) Try to get the testStep result that testRunner got when it ran the testStep The problem for each option is that: (a) If you run that step for a second time will you get the same result? (b) If you run the testCase and you reach your groovy Step in order to pick up the testRunner variable it's because allthe previous testSteps were succeeded. For option (a) try thefollowing scritpt: import com.eviware.soapui.impl.wsdl.teststeps.WsdlTestStep; import com.eviware.soapui.impl.wsdl.teststeps.WsdlTestStepResult; import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner; def step = context.testCase.testStepList[context.currentStepIndex - 1]; assert step instanceof WsdlTestStep; def testCase = context.getTestCase(); def testRunner = new WsdlTestCaseRunner(testCase, null); def result = testRunner.runTestStep(step) log.info result.getStatus();9 years agoPlace ReadyAPI QuestionsReadyAPI Questions9.3KViews0likes4CommentsRe: Get the status of a teststep that already has been executed
Hello, What do you mean by "status of a testStep"? I think that wsdlTestStep doesn't have a status attribute. Regards, http://www.soapui.org/apidocs/com/eviware/soapui/impl/wsdl/teststeps/WsdlTestStep.html def testCase; def testStep; def myStepName ='someName'; testCase = testRunner.getTestCase(); testStep = testCase.getTestStepByName(myStepName);9 years agoPlace ReadyAPI QuestionsReadyAPI Questions9.3KViews0likes8CommentsRe: SoapUI overwrites and closes log4j settings
Hi guy's. This solution didn't work for me. I can'tunderstandwhy. SoapUi v 5.2.1. One thing that i noticed is that when i run the following groovy before running my own plugin the"soapui.log4j.config" property isn't there. x = System.getProperties(); log.info(x.toString());9 years agoPlace ReadyAPI QuestionsReadyAPI Questions6KViews0likes0Comments