Interface automation testing, Fiddler uses packet capture to assist actual combat, a thorough understanding...


foreword

1. Quick settings, customize the dialog box, view get and post requests
① put the mouse behind # and right click;
② select Customize columns;
③ select Miscellaneous;

B1

④Select RequestMethod;
⑤Click Add;

Complete as shown below, you can directly see whether it is a get or a post request

B2

2. To grab https requests,
you need to set it up in fiddler

B3

PS: If it is a Firefox browser, https requests need to import certificates, other browsers do not

B4

3. Set up filtering
① Filter the http address you want to grab

B5

②Filter mobile phone and browser requests
Open fiddler>Tools>Options>HTTPS> check the corresponding options as required

B6

4. Mobile phone wifi setting agent
①Mobile phone setting wifi-find the current network (it must be the same LAN as the computer)
②fiddler setting allows remote device connection

B7

③ cmd input ipconfig, view ipv4 address

B8

Mobile WiFi settings

PS: If you grab the https request on your phone, you need to install a certificate

Enter in the mobile browser: ipv4+8888, the following content will appear (if you cannot open this address, enter this address on the computer browser first) Make sure fiddler is open

B9

Note: After installing the certificate, if fiddler is closed, you will not be able to access the Internet normally (need to cancel the wifi proxy settings)

5. Session saving
① You can save the session in txt format, and you can easily see the request content

B10

The saved txt file includes the required request information and return information

B11

②Save the session in saz format

B12
insert image description here

Files saved locally in saz format can be directly dragged into fiddler for execution

B13

Function: When the interface test detects a bug, it can be directly shown to the development

6. Request breakpoint
To break the point before sending the request, you can modify the request parameters before sending the request (T means the breakpoint before the request)

If the parameter passed in the request is x-www-form-urlencoded format, modify it in WebForms, as shown in the figure below

B14

If the request passes a parameter in json format, it needs to be modified in the row (both the row request and the returned data can be modified)

B15

7. Return to breakpoint
You can modify the returned data, modify it to any content you want, and simulate any return result, as shown in the figure below (I means return to breakpoint)

After modifying the data, click Run to completion to execute the request

B16

The result after execution is the modified data

B17

8. AutoResponse
customizes the returned result:
first add a rule (requested address) -> then set the result returned by accessing the changed address (it can be another address, or a local file, etc.) -> then save it Can.

B18

The following is the most complete software test engineer learning knowledge architecture system diagram in 2023 that I compiled

1. From entry to mastery of Python programming

Please add a picture description

2. Interface automation project actual combat

Please add a picture description

3. Actual Combat of Web Automation Project

Please add a picture description

4. Actual Combat of App Automation Project

Please add a picture description

5. Resume of first-tier manufacturers

Please add a picture description

6. Test and develop DevOps system

Please add a picture description

7. Commonly used automated testing tools

Please add a picture description

Eight, JMeter performance test

Please add a picture description

9. Summary (little surprise at the end)

On the road of chasing your dreams, don't be afraid of difficulties and setbacks, go forward bravely. Treat every effort as a gift of growth, and water the flowers of success with sweat. Be persistent and believe in yourself.

Facing the storms of life, we must always have hope and courage. No matter how many twists and turns and obstacles there are, we must move forward firmly and strive to chase our dreams. Believe in your own strength and work hard to create your own brilliant life.

With faith and courage, struggle is the melody of burning life. Not to be constrained by difficulties, not to be dragged down by failure, and to persist in pursuing the goal of excellence. Every contribution will shine brightly, and every effort will achieve brilliance.

Guess you like

Origin blog.csdn.net/m0_70102063/article/details/132275853