Asynchronous Service
Hello everyone,
I am trying to create a test case for an asynchronous service, but the problem is that I have 2 different bindings where responses may come from.
And more important: only one response comes each time. So, as you may guess, the main problem is how to start both listeners simultaneously and stop execution as soon as the first response comes.
Confirmation response is received Fault response is received
I've already tried to set up the "Start Step" in MockResponses, as it is described here, so 2 test steps could start at the same time, but it seems that this option is designed to help only when all the responses supposed to come.
Do you have any ideas?
Sincerely,
Eugene
Hi Rupert,
thank you for a nice piece of advice! It helped me very much. I made it a little bit different, but the main approach is the same. Here is how I did it:
1. I created a TestSuite with 3 TestCases
2. TestSuite was set up to execute all TestCases in parallel
3. Then each of MockResponses contains a TearDown Script
For Callback TC:
testRunner.testCase.testSuite.getTestCaseByName("Fault").getTestStepByName("Fault").cancel()
For Fault TC:
testRunner.testCase.testSuite.getTestCaseByName("Callback").getTestStepByName("Callback").cancel()
4. And don't forget about timeouts for each.
Here is final result:
Kind Regards,
Eugene