Forum Discussion
Thanks for the fast answer!
However this is not an option. Because when I want to run the whole test suite My test cases and test steps need to pass so the next one to trigger. If I run test cases with mock it will wait until response and then the next test case will start. But also I need to assert the async response.
Hi,
Ok, sorry if I'm missing something, but you could still assert the async response was successful in TestCase 1 (adding an assertion to the Mock Response TestStep), which may run before TestCase 2 but will pass after TestCase 2 is successful? Its just that the order of running the test cases is not what you ideally wanted.
In your your case it seems the service is very fast to respond. In the cases I have tested before, the async response actually took a few seconds allowing the Mock Response TestStep time to start up and listen.
Other than starting the Mock Response TestStep first (in another TestCase to avoid stopping the first one), I an struggling to see another easy OOTB alterntive. You could also consider calling another TestCase containing the Mock Responsse TestStep using the Run TestCase TestStep before you call your service, but I don't know if this is that different to the first option?
Hope this helps (at least a bit),
Cheers,
Rup
Related Content
Recent Discussions
- 2 days agoemoya
- 2 days agoMyBalanceNow