Forum Discussion

jeanlouis's avatar
13 years ago

Mock : OnRequestScript how to move to testcase ?

Hello , I'm a soapUI newbie... when receiving the request , i need from the mock to continue test process with a testcase ... here is the script , and the error .... so I've no idea to resolve this ....

OnRequestScript
import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase;
import com.eviware.soapui.model.testsuite.TestCaseRunContext;
import com.eviware.soapui.model.testsuite.TestCaseRunner;
import com.eviware.soapui.model.testsuite.TestStep;
import com.eviware.soapui.model.testsuite.TestStepResult;

def testCase = testRunner.testCase.testSuite.project.testSuites{"ctrl req in mock"}.testCases{"TestCase 1"}
//def testCase = testRunner.testCase.testSuite.project.testSuites["ctrl req in mock"].testCases["TestCase 1"]
def properties = new com.eviware.soapui.support.types.StringToObjectMap ()
def async = false
testCase.run (properties, async)

Tue Apr 17 12:43:48 CEST 2012:ERROR:com.eviware.soapui.impl.wsdl.mock.DispatchException: groovy.lang.MissingPropertyException: No such property: testRunner for class: Script10


this scipt is ok to move from one testcase to other , but not to move from mock

If someone hace an idea ?

Thank's a lot

Best regards ,
Jean-Louis
No RepliesBe the first to reply