cancel
Showing results for 
Search instead for 
Did you mean: 

How to control MockResponse added as a TestStep

Apoorva6
Frequent Contributor

Re: How to control MockResponse added as a TestStep

Well, I am not sure if I can achieve . my scenario is like this. I trigger requestA, then to requestB to get mockResponseB which I use, and then to requestC to get mockResponseC which I use. So how can I achive all this in one test case? I don't want to run mockResponseB and C separately as we are trying a regression suite. Trying to run mock service separately will increase complexity of test case. Please let me know if u are aware of alternative solution.
HeikoStudt
Occasional Contributor

Re: How to control MockResponse added as a TestStep

You can set "Start Step" in MockResponse Properties. This should be RequestA.

This will start the mock before RequestA ist sent.

 

If you want to go sure, add a delay-teststep of 10 ms and set this as "Start Step". 🙂

 

BTW: You should setup a Timeout for a MockResponse as well, especially for Continuous Integration as your service may have a bug...

 

 

MFG
Heiko Studt

Apoorva6
Frequent Contributor

Re: How to control MockResponse added as a TestStep

Hi Heiko Studt,

 

Thnx for Response. I tried within test case adding RequestA, mockResponseB test step followed by mockResponseC. For both mockResponseB and C test step, I added start step as RequestA. I was expecting when I start RequestA, that would start both mockResponseB and C , which did not happen. Once RequestA was submitted, only mockResponseB started listening like a normal flow. Adding Start Step did not make any difference here. Can you please let me know where I was wrong ?

New Here?
Join us and watch the welcome video:
Top Kudoed Authors