Default any new testcase will have option "Abort test if an error occurs?" checked. This means that if a teststep fails any next teststep in that case will not be executed.
This makes a lot of sense in some cases, for example if one step does a post to add something and the next step does a get to check it, and the third step does a delete. Or when you're testing a non-REST API where first step would log in and second step would do something that needs sessions data.
But many tests would have independent requests. After all, REST API's are stateless, and most methods are idempotent. Test cases then, just like scenarios, are just a way to logically group related requests (e.g. by operation, by quality aspect, by feature).
Is there a way to set the default value for "Abort test if an error occurs?" to off/unchecked rather than on/checked for new testcases?
Solved! Go to Solution.
the answer you link to explains how to change this setting for every testcase. What I would like, is to set the default testcase configuration, so I don't have to manually change this setting for every testcase I make. Is there a way to do that?
I would expect something like that because:
1. the out of the box default makes no sense in testing RESTful API's
2. when adding a new testcase in several ways (like from a operation-request or duplicating an existing request (F9) into a new testcase) only the testcase name is asked, and the testcase is created with these default settings.
I didn't find such setting in Preferences, but perhaps there is a way using some Global Properties or other way to change that?
Thanks for your support. What I do is mostly test GET requests from an already filled database. So there are no setup steps or something like that.
The same would apply to any test of other operations that would not require a second step to validate (like check validation on POST requests).
That means that one request is one testcase, and one testcase is one request (using testcase in ISTQB or TMap terms, not necessarily in ReadyApi terms). What I thus do is use the testcases (in ReadyApi) to bundle related teststeps/testcases.Otherwise there is no use for having testcases, and checking teststep failure would add another step every time (open the case first and then open the request to see what failed).
For example one ReadyApi project would have a test scenario for each operation (like "GET /pet", "GET /store" and "GET /user") and one test case for each feature (testcases like "parameter validation", "authenticate", "filter with fields", "eager loading with expand"). And then each test case would contain several teststeps.
So before submitting a feature request I first wanted to make sure I've not missed a setting somewhere.
@fsamwel Yay! Happy to hear you've found what you were looking for. Thank you for sharing.