Forum Discussion
4 Replies
Sort By
- M_McDonaldSuper ContributorIf you ever want to know what is available for a particular test step type, put this into a Groovy script step (this is for the Mock Response step):
log.info testRunner.testCase.getTestStepByName('Mock Response').class
which gets you the class nameMon Apr 02 14:27:37 EDT 2012:INFO:class com.eviware.soapui.impl.wsdl.teststeps.WsdlMockResponseTestStep
Then you can search for the class name on the web, which in turn gets you:
http://www.soapui.org/apidocs/com/eviware/soapui/impl/wsdl/teststeps/WsdlMockResponseTestStep.html
From there you can see a method setResponseHttpStatus() so the answer would be:testRunner.testCase.getTestStepByName('Mock Response').setResponseHttpStatus('200')
for status 200.- omrzljakOccasional Contributor
This should be accesisble from test step editor.
- omrzljakOccasional Contributor
There is no method setResponseHttpStatus() in http://www.soapui.org/apidocs/com/eviware/soapui/impl/wsdl/teststeps/WsdlMockResponseTestStep.html .
At least not in 5.0 version .
My sollution for this is groovy script
def testStep = testRunner.testCase.getTestStepByName('ResponseMessage') testStep.config.objectValue().config.response.httpResponseStatus = 200;
- jazzyekimOccasional ContributorThank you M McDonald !!!
Related Content
- 8 months agoRichardPla
Recent Discussions
- 14 days agosmilnik