Hello,
I'm looking for a way to create a mock (in standalone setup) that will run specific number of times, and then delete itself, but I can't really find any examples or documentation - I'm not even sure if it is possible.
For example, I would like to have "default" response that is always returned (easy part), and from time to time, I would like to add mock that will run once or twice, and then again server should return default response.
Unfortunately deleting mock manually isn't an option, because I will not be able to delete it right in time (when process is running). I thought about using scenarios, but I'm not sure if it will work well with such cases...
I mean, I need to have a way to run similar or even the same test case simultaneously with different data (requests matched by xpath/json path)... And the best idea I got to do so, was to use mix of priority and deleting mocks after x times.
Does anybody know of a way to achieve it?