1.0 Interface test tool – Postman

1.1 Interface and Procedure

1.2 Data transfer format commonly used in requests

1.2.1 Request string in URL

Data type: string

Example data:

<https://tieba.baidu.com/f?kw=%E7%BE%8E%E9%A3%9F&ie=utf-8&tab=good>
Copy the code

Request mode: get

Request header: /

1.2.2 form form

Data type: form

Example data:

Request mode: POST

Request header:

Content-Type:application/x-www-form-urlencoded
Copy the code

1.2.3 json

Data type: JSON

Example data:

{
    "username":"xx",
    "password":"asd123"
}
Copy the code

Request mode: POST

Request header:

Content-Type:application/json
Copy the code

1.2.4 Differences between forms and JSON

type instructions
The form The most common way to submit data is by POST. The default way to submit data is by browser
post The most popular way to transfer data

1.3 case

1.3.1 Querying Parameters

1.3.2 form form

1.4 Use case Management

1.4.1 Creating a Test Set

Mark: Order can be adjusted

1.4.2 Creating a submodule folder

1.4.3 Create requests in corresponding folders

1.5 assertions

1.5.1 definition

Let the program, on behalf of a human, determine whether the results of test case execution conform to the expected process

1.5.2 postman asserts

Xiao Wang goes to dinner. Xiao Wang goes to bed. Xiao Zhang goes to dinnerCopy the code

2.5.3 Common Assertions

1.6 environment

The production environment

The development environment

The test environment

1.6.1 Mapping in Python

LEGB

Global variables in 1.6.2 Postman

1.6.2.1 set
1.6.2.2 access

Environment variables in 1.6.3 Postman

1.6.3.1 set
1.6.3.2 access