swagger-test-templates icon indicating copy to clipboard operation
swagger-test-templates copied to clipboard

Access to response for custom assertion

Open xke7 opened this issue 7 years ago • 1 comments

It could be good to define additional assertion while generating tests

xke7 avatar Nov 09 '17 05:11 xke7

+1

Similar to "requestData", ability to have "expectedResponse" or "expectedData" for each input (from requestData) will be very valuable. Basic assertion like assert.deepEqual() for json responses.

Can be as simple as:

{
   '/pet': {
       get: {
           '200': [
               { param: 'spot', description:'some description of the data', expected: expectedJSONresponeForSpot},
               { param: 'tops', description:'some description of the data', expected: expectedJSONresponeForTops}
            ]
       }
   }
 }

biancajiang avatar Nov 10 '17 18:11 biancajiang