2012-04-30 101 views
0

我正试图在JMeter的帮助下监控我的Web服务器的性能。我遵循给出的规则来配置JMeter,以测试网络服务器为here使用JMeter监控Web服务器

即使下面我得到一个401错误未经授权的步骤后: You are not authorized to view this page. If you have not changed any configuration files, please examine the file conf/tomcat-users.xml in your installation. That file must contain the credentials to let you use this webapp

我编辑的tomcat-users.xml中添加以下行:

<role rolename="manager-status"/> 
<user username="tomcat" password="s3cret" roles="manager-status"/> 

请指点。

+0

JMeter正在使用正常的HTTPRequest。如果您正在执行JMeter,您可以使用机器上的普通浏览器访问您的Web服务器吗? –

+0

是的,我可以从我的网络浏览器 –

回答

4

您需要在您的JMeter脚本中包含“HTTP Authorization Manager”。您在那里指定您的凭据以访问该站点

+1

访问'http:// localhost:8054/manager/status'感谢回复的人。我用相同的参数做了一个新的测试,运行良好。也许在之前的测试中肯定有一些错误。我希望在监视Web服务器旁边运行其他线程组没有问题,因为据我所知,这是新测试和旧测试之间的唯一区别。 –