I'm busy testing some web API, and am trying to use Postman to automate that.
As far as I can see, test scripts in Postman are always tied to a single request, so if I want to test different scenarios for the same request, I would have to make a copy of that request for each scenario, where each copy has a different test script. This is something I'd like to avoid.
Example: I have a request that gets a certain resource, and I want to test with or without an access token:
- Request without access token: expect status 401
- Request with a valid access token: expect status 200
Other example: I create some resource on the server, and then try to create the same thing again:
- First time: expect status 200
- Second time: expect status 409
I found some related questions, but they all seem to involve a lot of scripting, where you are basically writing your own test runner environment. As a developer, I don't mind writing scripts, but in this case I'd like to focus on writing actual tests.
So my question is: can Postman do this, or is it maybe not the best tool for this job?