Test runner – According to the previous post, you already know how to create simple tests for each API, but a project has too many APIs and too many different tasks, each task is a collection of several APIs how must be solved. Along with that is the management method that you think is applicable to Postman or not? And how to run the test with the least effort.
Test Suites Management
The problem is, how will I arrange each small task ?
In the previous post, I have guided with a single API with 2 corresponding test types:
1. Syntax Testing (Validation)
2. Functional Testing
According to suggestions from Postman Bloggers, you should not only use 1 request for all your tests, but for each case you will create 1 request, only the Description and Test are different. So this is how I structure the API for each task.
On Postman, it will look like this:
The APIs in Figures 1 to 5 will have different Description and Test sections.
Similarly you will do the same with other cases.
Run Test Suites by Test runner
From the beginning of the series until now, you know how to test the API “manually”, press SEND to check each API. Postman provides the ability to run List API by Folder using the Runner feature.
The Runner screen will appear, here you will be interested in the following components.
1. Folder will run.
2. Environment by project
3. Number of repetitions
4. Option for you to review the Log of the requests you want.
After the run is complete, you will see the following report:
Note: The number of Pass or Fail is calculated on the number of Tests you write, not on the number of Requests you run.
You can see the short version of the report in Summary and save the Log in Export Result.
If you want to see details of each request’s parameters, click on the name of that Request.
So that’s done with the Runner part, a feature that Postman supports Automated Testing. If you have any questions, leave a comment below.
For more articles about API testing , please go to link : https://testerpath.com/category/api-testing/