Forum Discussion

fsamwel's avatar
fsamwel
Occasional Contributor
4 years ago
Solved

Default Off for "Abort test if an error occurs?"

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?

  • I found the way to do this. In Preferences I found "Default Test Case Options" with "Abort test if an error occurs". This is what I was looking for.

     

    Thanks nmrao for your help.

9 Replies

    • fsamwel's avatar
      fsamwel
      Occasional Contributor

      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?

      • nmrao's avatar
        nmrao
        Champion Level 3
        Hearing this for the first time in the forum someone saying "the out of the box default makes no sense in testing RESTful API's"
        Can you please explain what are the steps in your test case (including method names and http methods). Also it helps to understand why those test steps in the test case?