jeudi 28 septembre 2017

Smoke Testing Web API for invalid arguments / omission with Postman

I'm trying to automate tests for Swagger defined Web API project. Firstly, I'd like to test for 5xx errors caused by invalid requests/handling of arguments passed to controller.
I have this in my single non automated test for a single endpoint:

tests["status code not 500"] = responseCode.code != 500;

But I'm not sure if there's a way to automate/generate all the URL parameter combinations from Swagger definition, or must this be done for all the methods in the API.
I'm aware of variables/environments, but don't know if there's a way to make multiple test passes for single endpoint with different variable values, or at least null/undefine them for test pass > 1.
I can't use npm, so no Newman for me.

Aucun commentaire:

Enregistrer un commentaire