How to start mock service and use the response in test case using script
Hello,
Here is my problem:
I have test case where with test step I send request to the server. The server returns synchronus response.
Then the server returns an async response to mock wich is started by test step in the same test case.
Here is the sequence:
1. Send request test step.
2. Receive sync response.
3. Start mock test step.
4. Receive async response to the mock.
The problem is that SoapUI doesn't start the mock fast enough and then it fills the log file with ERROR: javax.xml.ws.WebServiceException: org.apache.axiom.soap.SOAPProcessingException: First Element must contain the local name, Envelope , but found html
So I need to start the mock service before the async response is send from the server. I have the following idea:
To start the Mock service manualy and then with groovy script to store the response in variable and then get the response to test step
in my test case. Where assertions will make sure the test case passed.
Can someone tell me what script should I use? Or give me better idea.
Thanks in advance!