Automatically fail http steps for non 2xx responses


(Thomas Pytleski) #1


Most of the time scenarios are testing for success (2xx). If no status code assertion is defined for an http step, we can assume the user is looking for a successful outcome and fail if response is anything other than a 2xx.


  • A sane default for new scenario collections.
  • This is safer, since it will catch bad api responses, even if the user forgets to add an explicit status code assertion to their test.

Thoughts? @ntiss

(Nicolas Tisserand) #2

I think that most of the time, users create scenarios by using the Swagger OAS/Coverage table. It’s more convenient. In doing this, the steps are always created with a response code assertion. So your suggestion doesn’t concern this use-case.

Your idea is useful if somebody tries to add steps in an existing Scenario (and he has also to fill in all the blanks).
So my answer is : why not. :slightly_smiling_face: