First, the use of postman
1. Install, postman is a chrome plugin that can be installed in the Chrome extension-------Baidu
Here's a tip: at work, we may often encounter some 404,500 or other errors that we can't parse, and we can send the interface copy to curl and send it to the developer to help us find the answer.
The developer tool found the wrong interface, Copy-curl
Postman:import to Postman. You can send it directly.
Second, set global variables
After setting the global variable, you can see the global variables you set in the right eye, and of course add environment
{{URL}} This format can refer to the URL global variable eg:{{URL}}/topics/
Third, after setting the global variables, we can make reference
as follows, referring to the URL of this global variable, and then found that the operation requires login, so we can add to them in authorization login; Of course we generally use token, cookie class control login
Iv. Validation and correlation
A test without validation is incomplete and meaningless: The following is the postman tests's verification instructions
Sometimes we need to use the correlation so that later requests can also invoke the content generated by the request, so we have to use the correlation, where we can decide for ourselves whether we need global variables or local environment variables
Five, run the interface test
Once a single interface has been saved, postman can be executed sequentially and, of course, import and export is supported.
You can also see the results here, 13 verification passes, and the results are also properly
These tools are updated very quickly ah ...
Python API Interface Test