
Show HN: Postman/Gherkin tests generator from swagger spec - gretar
https://gretard.github.io/resttestsgenerator/
======
bastijn
The sample on the github is a bit counter-intuitive. I understand why it
generates it, but the result does not make sense.

You post the same request to the /health endpoint. Normally this returns 200
but in case of an internal server error it can return 500. However, reporting
this in Gherkin as:

    
    
      Feature: Test service v1.0.0
    
    
      Scenario: /health returns: undefined
      Given I have "unauthorized" request
      When I submit to "/health" using "get"
      Then I should receive "200" status code
    
    
      Scenario: /health returns: undefined
      Given I have "unauthorized" request
      When I submit to "/health" using "get"
      Then I should receive "500" status code
    

Is not really expected. How does this work when you have a swagger that has
all the possible responses listed? E.g. 200, 400, 401, 404, 405, 406, 500.
Which all can occur based upon the input you give and the status of the
server.

~~~
gretar
Thank you for your comment and taking a look into this :) This makes sense and
will need to think how better to separate different request types for
different response codes..

