Use fiddler and apipost to perform interface testing


1. Things to prepare for interface testing 1. Interface testing tools: apipost, jmeter, etc.
2. Interface documentation, use interface information acquisition tools without interface documentation
3. Interface information collection tools: fiddler packet capture tool, browser developer tool ( f12) Wait
Two. What needs to be obtained for
web interface testing Three conditions that need to be known for web interface testing
1. Request method: get, post, put, patch, delete, etc.
2. URL address: divided into http request and https is a request Such as: www.baidu.com and www.baidu.com
3. Parameters passed by body: Generally, parameters are passed in json format, such as: "name": "xiaoming", "pwd": "123". Generally, the post parameter request is more.
Use fiddler and apipost to perform interface testing

3. Fiddler packet capture tool
fiddler is one of the most powerful and easy-to-use free web debugging tools developed by C#. It can record http and https requests seen by all clients and services, monitor and set breakpoints, and even modify input and output data , It also contains a powerful event script-based subsystem, and can be extended using the .net language.
Fiddler is the capture of interface information through our operation and use of web pages. After crawling, find the required data according to the request method, url and body required above.
Use fiddler and apipost to perform interface testing

This is the information captured by fiddler in a simple login request. The ones we can use are:
1. Protocol request type: http or https. Here is
the interface access address formed by the addition of http 2.host+url. The request address here is: 127.0.0.1:8888/login 3.
Request methods in Request Haeders (request header information): get, post, etc. Here is the post request
Use fiddler and apipost to perform interface testing

Then click WebForms in the Inspectors to view the body parameters.
The parameters obtained are, parameter name: parameter value, name: xiaoming, pwd: 111
Use fiddler and apipost to perform interface testing

Fourth, after the interface test
has received the specific information of this interface through fiddler, we use the interface test tool apipost to perform the interface test.
Select the request method post, request address: http://127.0.0.1:8888/login, body parameters: name:xiaoming,pwd:111
Use fiddler and apipost to perform interface testing

View request result
Use fiddler and apipost to perform interface testing

This is the procedure for interface testing through fiddler and apipost.
fiddler download address: www.telerik.com/fiddler

apipost download link: https://www.apipost.cn/?dt=20201031

Guess you like

Origin blog.51cto.com/12246704/2545552