2012-04-30 99 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服務器旁邊運行其他線程組沒有問題,因爲據我所知,這是新測試和舊測試之間的唯一區別。 –