Advanced usage of Postman - use of Runner

1. First, create a new interface folder to be run in batches in postman , create a new interface, and set the global variables.

2. Then set the method to assert in Test

like:

tests["Status code is 200"] = responseCode.code === 200;

tests["Response time is less than 10000ms"] = responseTime < 10000;

console.log(responseTime);

3. After saving, click Runner, select the newly created folder, and set up the iteration and test environment

4. The interface global variable set in step 1 is flightdate. We assign a value to this variable in each iteration, and we need to use csv or json files, such as the json file I use.

Note: the key of json must be consistent with the variable name, and the format of json is an array

5. Select the json file in Runner and click to preview the effect:

6. After configuration, click start test to see the running results.

Finally, I would like to thank everyone who has read my article carefully. Reciprocity is always necessary. Although it is not a very valuable thing, you can take it away if you need it:

insert image description here

Software testing interview applet

The software test question bank maxed out by millions of people! ! ! Who is who knows! ! ! The most comprehensive quiz mini program on the whole network, you can use your mobile phone to do the quizzes, on the subway or on the bus, roll it up!

The following interview question sections are covered:

1. Basic theory of software testing, 2. web, app, interface function testing, 3. network, 4. database, 5. linux

6. web, app, interface automation, 7. performance testing, 8. programming basics, 9. hr interview questions, 10. open test questions, 11. security testing, 12. computer basics

These materials should be the most comprehensive and complete preparation warehouse for [software testing] friends. This warehouse has also accompanied tens of thousands of test engineers through the most difficult journey. I hope it can help you too!  

Guess you like

Origin blog.csdn.net/2301_78276982/article/details/132341384