Liver finishing, interface testing - Fiddler requests packet capture for Jmeter (detailed actual combat)


foreword

Use Fiddler combined with Jmeter to capture and analyze packets to better assist testing.

problems encountered

Take an interface for obtaining student information as an example.

When the request is correctly set in Jmeter according to the interface document, after opening Fiddler, it is found that the request of Jmeter cannot be caught.

D1

D2

As you can see from the picture, Fiddler did not catch the request sent by Jmeter.

problem analysis

A brief analysis shows that Fiddler operates as a proxy web server during use. The proxy address is 127.0.0.1 and the port is 8888. It will listen to the HTTP proxy on port 8888 when it is running.

D3

Therefore, when we set the proxy address and port to be consistent with Fiddler in Jmeter's current request, Fiddler should be able to grab the request data sent by Jmeter.

Set proxy in Jmeter request

Currently we have 2 HTTP requests, let's set up only 1 first.

D4

After the setup is complete, execute the test plan again.

D5

It can be seen that Fiddler captured the first request, but the second request did not capture the data because no proxy was set.

Set HTTP request defaults

If we have a lot of requests, it is impossible for us to set a proxy in every request, so we'd better set a default value for HTTP requests.

We only need to set the proxy server in the HTTP request default value, then subsequent requests will use the value set by the HTTP request default value by default, so that our requests can be captured by Fiddler.

D6

D7

Note: When Fiddler is closed, we need to disable the HTTP request default value in Jmeter to cancel the currently set proxy, otherwise Jmeter may not be able to request normally.

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)

Go forward bravely, struggle without regret. Difficulties are the sharpening stone of life, and challenges are the ladder of growth. Embrace every opportunity, chase your dreams, stick to your beliefs, and never give up. Believe in your own strength and bravely cross, you will write a magnificent and brilliant epic of life!

With passion and perseverance, the pace of struggle will never stop. In the face of challenges, stay persistent and brave, and surpass yourself. Every effort will lead to a stronger self, and the future glory will belong to those who are not afraid of difficulties and go forward bravely.

Struggle is the growth of the soul and the baptism of sweat. No matter what the starting point is, those who persist in their efforts are destined to surpass others. There is no need to be afraid of suffering, and no need to be timid about setbacks. Only by constantly striving can we create our own brilliance.

Guess you like

Origin blog.csdn.net/csdnchengxi/article/details/132210549