Postman use interface test tools do (a) - Basic Features

introduction

Common interface test tools are the following:

1.Postman: simple and convenient interface to debugging tools for easy sharing and collaboration. Has an interface debug interface set management, environment configuration, parameterization, assertions, batch execution, recording interfaces, Mock Server, interface documentation, interfaces, monitoring and other functions;
2.JMeter: open-source interface testing and pressure measurement tools, support for Linux and no interface run;
3.LR: Business Edition interface performance testing tool, easy to use, powerful;
4.SoupUI: open source, WebService interfaces commonly used test tools, you can also test Rest interfaces and port security.

In a previous note we introduce the basics of interface testing, this chapter describes how to use the basic functions postman.

postman Interface Features
Here Insert Picture Description

1, Toolbar

New: New you can create a new Request request, Collection request set, environment, etc.
Import: Import, Export can import someone else's request set
Runner: run a set of requests (batch execution)
Invite: invite (requires registration, invitations to collaborate)
sync icon : (need to register, synchronize your project to the cloud)
Ethereal icon: capture / capture request for opening Postman proxy, manually set the proxy (or phone agent) can capture after / recording requests
settings icon: Postman setting function
messages icon: official assistance and information
collection icon: my favorites (requires registration)
cloud icon: the cloud user data (requires registration)

2, interface management area

History: request history, previous requests can check the record
Collections: set of interfaces, or the equivalent of an interface project test plan, focused on the interface can create unlimited sub-folders, the interface for group management

3, environmental management area

1, the environment is a set of configuration, includes a number of environmental variables. In the interface test, according to the deployment on a different server, the server address may be different, but the same interface, the interface address is unchanged. To test the deployment in different clothes
on the service's the same set of interfaces, we can create a different environment, different environments host variables to use a different address
2, for example, an interface full address = service address +
interface address, such as: url = http: //127.0.0.1:8090+/api/login context switch: for switching environment
environmental preview: environmental management for all variables in the environment quickly preview: add and modify environment variables environment, and global variables

4, Interface Design District

Interface design area by the upper edge of the tab + number, a plurality of new requests. Interface design area from top to bottom and is divided into areas in response to the request area
  ① request area

Request address line: the option of requesting method (GET / POST / ...), fill in the request address, and sends a request to the storage request set test
request data area: divided authorization request header, request data, before sending a request script execution (by to prepare the data), the script is executed after the end of the request (for assertion)
  ② response area:

Response content (body): Pretty can view (landscaping format), Raw (raw format), Preview (HTML format preview)
in response Cookie
response headers (headers)
Test Results (Test Results): assert a corresponding request provided in Tests
Here Insert Picture Description

③ Toolbar:

settings set
postman tool set
Notifications Announcements
Announcements
About Us button
  on our
  tweet about us
Here Insert Picture Description
Here Insert Picture Description

5, Collection request set (Test Set):

Postman is a request to set the interface management "overall" unit, run, export, share and so on are set based on the request

① New Demand Set: New button -> Collection or click on the request set above the list of new button sets request

Authorization: Set interface request and subfolders under the unified use of the authorization, no longer have separate settings for each interface again
request before the script: an interface common to every request before the request script sets
the request asserted: request set each interface after a public request script
requests set variables: request centralized public variables
  variable properties sub-folder also has described the authorization request before the script, and requests the assertion (not a variable, a request set: ② new subfolders unified management), to achieve a different range (scope) of Fixture function.

③ test set export: test set can export and send to someone else (do not carry environmental information), someone else to use your interface by importing

④ test set Share: test set to share directly to others (both sides need to register)

⑤ add request: request Add request by the test set add, the request contained in the test suite.
Here Insert Picture Description

Functional test suite operations:
Here Insert Picture Description

These are the basic functions of introduction and understanding postman, the latter continue to introduce some real use cases.
Interested developers can add test exchange group: 696 400 122

Published 82 original articles · won praise 43 · views 180 000 +

Guess you like

Origin blog.csdn.net/liudinglong1989/article/details/104725984