问题描述
我使用的是 Apache JMeter 2.3,它现在支持代理服务器元素下的尝试 HTTPS 欺骗".
我在几个不同的服务器上尝试过这个,但没有成功.有没有人能够使用此设置从 HTTPS 源成功记录?
或者除非成功录制,任何人都可以分享解决方法吗?如果可用,我只是在服务器级别关闭 HTTPS,但这并不总是可行的.想法?
从
别忘了启动录音机:
- 在 JMeter <4.0,展开Workbench",如果>=4.0,忽略这一步
- 选择HTTP(S) 测试脚本记录器"
- 点击开始"按钮
- 您将看到一条关于
根 CA 证书
的消息.点击确定:
没关系,它会通知您 JMeter 已经创建了一个根证书颁发机构,您需要在浏览器中导入它才能正确记录 HTTPS 流量.
- 在 Firefox 中导入此根 CA 证书(位于 jmeter/bin 文件夹中),例如:
- 将浏览器配置为使用 JMeter 作为代理:
现在好了.
- 您可以导航到您的应用程序,采样器将在Recording Controller" 位于线程组"元素下
I'm using Apache JMeter 2.3, which now supports "attempt HTTPS spoofing" under the Proxy Server element.
I've tried this on several different servers, and have had no success.Has anyone been able to successfully record from an HTTPS source with this setting?
Or barring successfully recording, can anyone share a work-around? When available, I simply have HTTPS turned off at the server level, but this is not always feasible. Thoughts?
解决方案Starting from JMeter 3.0 default port for the HTTP(S) Test Script Recorder is
8888
The easiest way to configure recording is using JMeter Templates feature. From JMeter's main menu select:
File -> Templates -> Recording -> Create
Don't forget to start the recorder :
- In JMeter < 4.0, Expand "Workbench", if >= 4.0, ignore this step
- Select "HTTP(S) Test Script Recorder"
- Click "Start" button
- You will see a message regarding
Root CA Certificate
. Click OK:
it is OK, it informs you JMeter has created a Root Certificate Authority that you need to import in your browser to be able to record correctly HTTPS traffic.
- To Import this Root CA certificate in Firefox (it is located in jmeter/bin folder) for example:
- Configure browser to use JMeter as proxy:
It is now Ok.
- You can navigate to your application, samplers will be created under "Recording Controller" which is under "Thread Group" element
这篇关于JMeter:如何记录 HTTPS 流量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!