table of Contents
More Management Interface
Creating Collections
Creating Folder
Create a sub-Folder
Add Request
Test POST request interface
Football League Application Interface
Football League Interface Analysis
Football League interface test
POSTMAN test
Export
Importing
First, the more management interfaces
Creating Collections
Creating Folder (Folder)
Create a folder for each interface
Create a sub-Folder (subfolder)
Each test interface requires HTTP / HTTPS, may correspond to two sub-folders, respectively management request
Add Request
Second, the test POST request interface
POST submission of data
1)form-data
http request multipart / form-data, the data can speak a message is processed form, may be uploaded key-value pairs, a plurality of files can upload
2) x-www-form-urlencoded
http request application / x-www-from-urlencoded, data in the form are converted to the key-value pairs
3) raw
Interface can send data in any format, such as text, json, xml, html, javascript
4) binary
You can only transmit binary data, typically in a single file for uploading
Authorization Description
Authorization is required to verify that you have permission to access data from the server. When a request, generally must contain parameters, to ensure the required permissions to access data and having a return request. Postman provides authorization
Type, can easily handle authentication protocol in the local application Postman
Inherit auth from parent
Authentication inherited from the parent class, "from the Father" set "Inherit auth" under the direction of default, each request that folder are authorized to use the type of parent class
No Auth
When no authorization parameter transmission request, using the "No Auth"
Bearer Token
Bearer Token is a security token, any user with the Bearer Token can use it to access data resources, without the use of an encryption key
Basic Auth
Basic Auth is an authentication type, we need to verify a user name and password to access data resources
Digest Auth
Check the results
checking point
1, body checks whether the response contains the string
tests[“check point name”] = responseBody.has("find string");
2, check the response time
tests["Response time less than 200ms"] = response time < 200;
tests [ "response time"] = _.inRange (responseTime, 100,800);
3. Check the status code
tests["Status code is 200"] = responseCode.code ===200;
tests [ "successful test"] = responseCode === 200 || responseCode.code === 201
4. Use the template
Code Templates
body 1. Check whether the response contains the string
2. Check the response time
3. Check the status code
Batch operation
Export
Importing