Postman do various types of HTTP interface tests
First, there must be a clear interface document (e.g. http://test.nnzhp.cn/wiki/index.php?doc-view-59) before doing the interface test, assuming that the postman has been installed on the PC.
1. Common get requests with Key-value
e.g. getting user information
Get requests, write URLs to spell parameters, send requests, view results.
2. Post requests with JSON string parameters
e.g. getting user balances
Post request, write URL, click Body->raw, write json string parameter, send request
Back to Authorization View results
3. HTTP permission validation is required for the request
e.g. modifying user balances
Post request, write URL and parameters, type Select Basic Auth, fill in User name and password (if required interface document will be given), send request
4. Request headers need to be added when requesting
e.g. obtaining user Information 2
Get request, write URL and parameters, click Headers and add header (if required in the interface document will be given), send request, view results
5. Need to add a cookie when requesting
e.g. modifying user balances 2
Post requests, write URLs and parameters, open plug-in interceptor (if prompted to install in an external environment, install once and for all), write a cookie in headers, the value is filled in by the interface documentation, send the request, view the results.
6. Request to upload a file via an interface
e.g. uploading files
Post request, write URL, modify text in body to file, fill in Parameter name, select Local file, send request, view results
Postman Management Requests
We can create collection in postman (according to the project, according to the function module, etc.) and then save multiple requests in the collection, so that simple management can be achieved. In addition we can do some simple operation of collection, such as collection export to local backup, batch run collection in the request, and so on, the speed of the batch run seems very slow ah, this may be no one with Postman do batch interface test reason, Try to look at it boldly, and there will be more gains.
Learning summary--using postman to do HTTP interface testing