本文介绍了为什么在使用JMeter记录Web浏览器操作时执行代理配置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在JMeter的Workbench下运行HTTP(S)测试脚本记录器时,为什么我们必须将HTTP代理设置为"localhost"并将端口设置为"8080"?为什么不触摸代理设置就无法执行录制?

While running HTTP(S) Test Script Recorder under Workbench in JMeter, why we have to set the HTTP Proxy to "localhost" and Port to "8080"? Why can't we perform recording without touching the proxy settings?

推荐答案

因为JMeter需要捕获传出的请求才能将其转换为 HTTP请求采样器,而JMeter做到这一点的唯一方法-是在两者之间注入自身.此外,在记录 HTTPS 流量时,您需要安装JMeter自签名证书(ApacheJMeterTemporaryRootCA.crt),因此JMeter可以解密请求.

Because JMeter needs to capture outgoing requests in order to be able to convert them to HTTP Request samplers and the only way JMeter can do it - is by injecting itself in between. Moreover, when it comes to recording HTTPS traffic - you need to install JMeter self-signed certificate (ApacheJMeterTemporaryRootCA.crt) so JMeter could decrypt the requests.

  • 常规"配置:

  • "Normal" configuration:

Browser < - > Application Under Test

  • 代理"配置:

  • "Proxy" configuration:

    Browser <-> JMeter Proxy <-> Application Under Test
    

  • 更多详细信息:

    • HTTP(S) Test Script Recorder (was: HTTP Proxy Server )
    • Apache JMeter Proxy Step by Step

    如果由于某些原因您无法更改浏览器代理设置,则可以考虑使用 JMeter Chrome扩展程序作为替代.

    If for some reason you are unable to change browser proxy settings you can consider using JMeter Chrome Extension as an alternative.

    这篇关于为什么在使用JMeter记录Web浏览器操作时执行代理配置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

    09-22 14:27