How do postman Interface automated testing

Just get a reference for how to use the interface postman do automated testing, to record for future use.

The first step, as usual a written request and save, as shown below

 

 

The second step, click on the upper left corner oh "Runner", select just saved the request, and fill the number to be executed in "Iterations" place. We will show the results after the execution, as shown below.

 

result:

 

 This does not provide any automated process, but for us to perform more than a few times only, the following parameters of the process.

 

The third step, parameters contained in the parameterization process, this step is to create a data file as a parameter, and reference parameters in our script.

Specific approach is: to create a txt file, the contents of the first line of each column is the parameter name for reference, the following is the file I created, corresponding to the postman, click again Runner, select the file you just created in the "Data" one.

After the checkpoint to fill in interface script interface "Tests", such as the return status code of 200.

 

 

Click Preview to view the next effect is as follows:

 

 

 Corresponding "Iteration" to fill in the number of data, and here I did not start a number of changes, so you can only execute one.

 

The final step is parameterized checkpoint, in the same or fill in Tests, where the election is to "get a variable", and then fill in the corresponding keyword in the title own parameterization file checkpoint that column.

He is no longer on the map.

After a relatively good application to add blog content.

Guess you like

Origin www.cnblogs.com/april-aaa/p/11705958.html