Forum Discussion

alankoshyjohn's avatar
alankoshyjohn
New Contributor
15 years ago

how to execute a testcase in the AfterRequest script.

hi all,

I want to execute a testcase after the request is dispatched.
This is what i did..

def project = mockResponse.mockOperation.mockService.project
def testCase = project.testSuites["UpdateStatus TestSuite"].testCases["updateStatus TestCase"]
testCase.setPropertyValue( "jobRequestId",context.jobRequestId )
testCase.setPropertyValue( "jobId",context.jobId )
def runner = testCase.run(new com.eviware.soapui.support.types.StringToObjectMap(), false)


but upon execution i am getting the following error. Could you all help me out.


ERROR:com.eviware.soapui.impl.wsdl.mock.DispatchException: groovy.lang.MissingPropertyException: No such property: mockResponse for class: Script11
com.eviware.soapui.impl.wsdl.mock.DispatchException: groovy.lang.MissingPropertyException: No such property: mockResponse for class: Script11