Fiddler simulates for interface testing

table of Contents

 

1. Introduction to Composer

2. Simulate get request

Three. Simulate post request


https://www.cnblogs.com/yoyoketang/p/6754560.html

1. Introduction to Composer

Click on the Composer area on the right, you can see the following interface, which is the interface of the test interface

  1. Request method: Click on to check if the request protocol is get, post, etc.
  2. URL address bar: enter the requested URL address
  3. Request header: the third area can enter request header information
  4. Request body: post request to enter body information in this area
  5. Execution: After clicking the Execute button, the request can be executed
  6. http version: http version can be checked
  7. Request history: After the execution is completed, a history record will be generated in the History area on the right

2. Simulate get request

1. Enter the blog homepage in the Composer area address bar: http://www.cnblogs.com/yoyoketang/

2. Select get request, click Execute to execute, the request can be sent successfully

3. After the request is sent successfully, a session record will be generated in the dialog box on the left, and you can view the details of the packet capture

4. There will be one more history request record in the history area on the right

5. Check the record in the session box to view the test result

--Select the session, click on Inspectors

--response area click to open the Raw area

--Raw view the data of HTML source code

--You can also click WebView to view the returned web page data

 

 

Three. Simulate post request

1. Check post for request type

2. Enter the corresponding request address in the url address bar

3.Write login json parameters in the body area

4. Header request header area, you can copy the data of the previous captured packet

(Note that some requests will fail if the request header is empty)

5. View the test results after successful execution:

--The execution is successful, as shown in the third figure, showing success=True

--The execution failed as shown in the figure below, showing

message=Invalid length for a Base-64 char array or string.

success=False

 

Guess you like

Origin blog.csdn.net/weixin_37018468/article/details/108060679