本文介绍了无法在jmeter中记录浏览器操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用apache-jmeter-2.6.我想使用HTTP代理服务器记录浏览器操作.但是这些动作没有记录.

I am using apache-jmeter-2.6. I want to record browser action using HTTP Proxy Server. But The actions are not recording.

我已在线程组"下定义了HTTP请求默认值,并为服务器名称指定了值,如下所示:

I have defined HTTP Request Defaults under Thread Group,I have given value for the server name that looks like this:

http://www.xxxxx.com:81/

然后我将端口号"字段保留为空(与服务器名称相同).

And I left the Port Number field empty as it is given with the Server Name.

在工作台下的HTTP Proxy Server中,我给了Port值:81,并在URL模式中添加了.*.html"以包含在内.

In HTTP Proxy Server under workbench, I have given the Port value:81 and added ".*.html" in URL Patterns to include.

我已经在Firefox浏览器中使用端口:81和Http代理服务器:www.xxxxx.com设置了代理服务器设置

I have set the proxy server setting in firefox browser with Port:81 and Http Proxy: www.xxxxx.com

现在,当我在jmeter中启动代理服务器并在浏览器中执行不同的操作时,我的监听器中没有任何内容,即查看结果树".

Now when I start the proxy server in jmeter and do different actions in my browser, i get nothing in my listener which is 'View Result Tree'.

我在PC的不同目录中搜索了ApacheJMeterTemporaryRootCA.crt文件,以便可以将其安装在浏览器中,但找不到任何地方,似乎没有创建.

I have searched for the ApacheJMeterTemporaryRootCA.crt file in different directories of my pc so that I can install it in my browser but did not find it anywhere, seems it is not created.

我还删除了proxyserver.jks,然后再次尝试了所有操作,但没有成功.

I have also deleted proxyserver.jks and then tried everything again, but no success.

我在这里做错了什么?我该如何解决?

What am i doing wrong here? How do i fix this?

我的Java版本是1.8.0_77.

My java version is 1.8.0_77.

谢谢.

推荐答案

首先,我建议您升级JMeter版本.JMeter2.13版本可用.JMeter的性能正在不断提高,因此强烈建议用户使用使用最新版本.确保始终阅读更改列表,以了解新的改进和组件.您绝对应该避免使用比最后一个版本早3个版本的版本.

First of all I recommend you to upgrade your JMeter version.JMeter 2.13 version is available.The performance of JMeter is being constantly improved, so users are highly encouraged to use the most up to date version. Ensure you always read changes list to be aware of new improvements and components. You should absolutely avoid using versions that are older than 3 versions before the last one.

第一步:打开您的 Firefox浏览器,然后在网络连接设置中将代理服务器配置为 HTTP代理:127.0.0.1,端口:8888

Step1: Open your Firefox browser and from Network Connection settings configure the proxy server as HTTP Proxy: 127.0.0.1, Port: 8888

第2步:运行Jmeter.bat文件并打开文件下拉列表下的模板,然后点击创建" .

Step2: Run your Jmeter.bat file and open Templates under File dropdown list and click "Create".

第3步:展开工作台,然后选择"HTTP测试脚本记录器" .然后单击页面底部的开始" .您将弹出两个窗口,允许防火墙和临时根CA认证安装.允许所有这些,现在转到您的浏览器并执行浏览器活动.完成后,停止" HTTP测试脚本记录器.

Step3: Expand Work Bench and select "HTTP(s) Test Script Recorder". And click "Start" at the bottom of the page.You will have two pop up to Allow Firewall and Temporary Root CA Certification Installation.Allow all those and now go to your browser and do your browser activity.When its done "Stop" theHTTP(s) Test Script Recorder.

第4步:此后,您将在JMeter中获得记录器脚本以及您在浏览器中的所有活动.它将在线程组下自动更新.该脚本将包含所有浏览活动期间您的页面请求.录制后的示例脚本如下所示.

Step4: After this you will get the recorder script in JMeter with all your activity in the browser.It will automatically update under Thread Group.This script will contain all your page requests during browsing activity. Sample script after recording is shown below.

希望这对您有用.

这篇关于无法在jmeter中记录浏览器操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 14:27