Forum Discussion

MarinaK's avatar
MarinaK
New Contributor
14 years ago

Data loop with Mock response step failing on the second iter

Hi,
I have a problem with the mock response in soapUi Pro 3.6
I have an asynchronous request which I call with a data source step. In the 2nd iteration the mock response step fails. Looks like during first iteration Mock service was started by step Mock Response and it is running, but for the second iteration it is not starting any more....
I would cancel the run, it looks like it has been stopped, but if I try to delete step or anything like this it would tell me that Soap ui can not do it because the test case is still running.
I try to access WSDL of mock - it is not accessible.
I saw couple of posting with this issue, but didn't see any answers.

So I tried to use groovy script to stop Mock - to let next step in the loop start it again, (def runner = testCase.testSuite.project.mockServices["BasicHttpBinding_ITridionCMSService MockService"].start()
context.mockRunner = runner
)
but I am getting this error in the script window :groovy.lang.MissingPropertyException: No such property: testCase for class: Script2

What am I doing wrong - how to fix this....
Thank you

1 Reply

  • MarinaK's avatar
    MarinaK
    New Contributor
    Using this groovy step (testRunner.testCase.testSuite.project.getMockServiceByName("BasicHttpBindingITridionCMSServiceMock").getMockRunner().start()) I was trying to stop Mock service, but it is not running... so there is nothing to stop.

    If I create several test cases and repeat test steps - they all running fine, from the same data file, but not if I ran them all in the loop in the same test case

    So why is my Data loop on Mock service is not running?