postman --- postman postman --- postman parametric parameters associated postman --- postman increase assertion postman --- postman presentation folder and batch execution cases

  We do interface testing process, will encounter the same interface to different data, every time I go one by one to fill in the data too much trouble, and the next day we learn together how to be parameterized by the postman

to parameterize

Parameterization is different from one interface to request data, we can put into the requested data to a file, by circulating the request data in the file, to achieve the results we want

Request Interface

Before the start of practice, we first asked us to use interface to find, here I use the aggregate data query interface weather, the specific contents have been introduced earlier, it is not explained in detail here

# Interface address 
http://apis.juhe.cn/simpleWeather/ Query

# Request parameter 
city name to query /: City the above mentioned id, such as the name of the city: Wenzhou, Shanghai, Beijing, require utf8 urlencode
key:331eab8f3481f37868378fcdc76cb7cd

Prepare data

Here we do parameterized by changing the name of the city, first of all want to test the data stored in TXT file (csv file format can also), here ready data include abnormal and normal, you can add assertion by the postman determining whether through use cases.

Note: This changes the encoding format to prevent garbled

Parameter name if the first line of this request, the contents of the following parameters is

 Parametric request

Open the postman, fill in the URL, select the request mode, fill in the parameters of time, you need to fill out the form associated, convenient batch execution time to read the contents. For details, see the associated parameters --- postman postman

Note: This will be used to perform batch use case, you want to create a folder to store interface information.

 

Because the parameters of the need to increase assertion, or else may not know which of the data request is successful, someday data request fails. This uses the presence or absence XX string query returns content. Details are on the assertion postman --- postman increase assertion

After filling parameters are done, click batch execution cases entrance. For details, see postman --- postman presentation folder and batch execution cases

1, the content selection request interfaces

2. Select the test environment

3, the number (and the parameters corresponding to the content) to fill the request

4, parametric data upload content

5, view the data content is correct

6. Click on the results

 

Wait 1 ~ 2S will find the interface results have all run out. You can see whether or not it directly through the interface request

Found that the normal parameters have been successfully asserted, abnormal parameters do not meet with the assertion, indicating that the request does not pass

 

 

 

By just a small example of a complete introduction to the parameters of the postman, of course, little friends need their own hands in order to deepen under their own memory oh

 

 

If you feel quiet to write to you to help, you can lower right corner followers, continually updated ~ ~ ~ do not know where to write or wrong place, you can leave a message below, the first time after seeing the reply.

Guess you like

Origin www.cnblogs.com/qican/p/11655930.html