简体   繁体   English

JMeter NTLM / Windows身份验证负载测试

[英]JMeter NTLM/Windows Authentication Load Testing

What is to be done? 什么是要做?

We have an application deployed on the Sharepoint (corporate) Server which uses the windows credentials to log into the application. 我们在Sharepoint(公司)服务器上部署了一个应用程序,它使用Windows凭据登录应用程序。

The objective is to perform the load/performance testing on the application (especially the log in functionality) for such n number of users. 目标是对这样的n个用户执行应用程序的负载/性能测试(尤其是登录功能)。

Normally when I hit the app URL in the Firefox/IE, it pops up a window asking for credentials. 通常,当我点击Firefox / IE中的应用程序URL时,会弹出一个窗口询问凭据。 I enter the credentials, browse the app and then log out. 我输入凭据,浏览应用程序然后注销。 I intend to capture this in JMeter and simulate this for large number of users. 我打算在JMeter中捕获它并为大量用户模拟这个。

Where I'm stuck? 我被困在哪里?

Now I start the JMeter proxy server, and then try the same steps as above. 现在我启动JMeter代理服务器,然后尝试与上面相同的步骤。 But when the pop up window appears, JMeter simply doesn't record the it nor it does record anything else after the login. 但是当弹出窗口出现时,JMeter根本不会记录它,也不会在登录后记录任何其他内容。

What I've tried? 我试过了什么?

If I try the same steps after enabling “Automatically detect intranet network” in IE, then it simply auto detects my windows credentials (No credentials pop-up), logs me into the app (this is not recorded in JMeter either) and takes me to the home page. 如果我在IE中启用“自动检测Intranet网络”后尝试相同的步骤,那么它只是自动检测我的Windows凭据(没有凭据弹出),将我登录到应用程序(这也没有记录在JMeter中)并带我到主页。 And any page thereafter I hit gets recorded in JMeter. 之后我点击的任何页面都会记录在JMeter中。

I've also tried to use the HTTP Authorization Manager using following parameters: 我还尝试使用以下参数使用HTTP授权管理器

It didn't help. 它没有帮助。 I am quite confused about how-to-use the above element. 我对如何使用上述元素感到很困惑。 And not even sure whether its a right approach to get the solution to my problem. 甚至不确定它是否是一个正确的方法来解决我的问题。

Any help/suggestions? 任何帮助/建议?

PS I know about a tool called Badboy, but have to go for it as a last resource. PS我知道一个名为Badboy的工具,但必须将其作为最后一个资源。 Also not even sure if it records the pop windows. 甚至还不确定它是否记录了弹出窗口。 And sorry if the post is verbose. 对不起,如果帖子很冗长。


UPDATE: 更新:

I have also tried - 我也尝试过 -

Username: USER_ID and Domain: my_company_domain

But this is not the actual problem. 但这不是实际问题。 Problem is, when I try to hit the pages (automation) which I've recorded previously return success response even if I haven't used the HTTP Authorization Manager. 问题是,当我尝试点击我之前记录的页面(自动化)时,即使我没有使用HTTP授权管理器,也会返回成功响应。 I'm not sure what I'm missing. 我不确定我错过了什么。

OK. 好。 Finally I got what was missing. 最后我得到了遗漏的东西。

First, I had to change the implementation of every request to HttpClient3.1 首先,我必须将每个请求的实现更改为HttpClient3.1

Second, it was really frustrating to see that JMeter documentation was misleading. 其次,看到JMeter文档具有误导性是非常令人沮丧的。

It says that the config file httpclient.parameters , should be edited as following: 它说配置文件httpclient.parameters应编辑如下:

http.authentication.preemptive$Boolean=false

But it didn't work. 但它没有用。 Changing it to true worked like a charm. 把它改成真正就像一个魅力。

Hope this helps other people. 希望这有助于其他人。

JMeter works at the HTTP layer so the proxy will only capture requests made over this protocol layer. JMeter在HTTP层工作,因此代理只捕获通过此协议层发出的请求。 It sounds to me like you have already found the right approach to use for recording by using '“Automatically detect intranet network” in IE', you can use this method to capture most requests and you will have to figure out authentication manually. 听起来我已经找到了正确的方法来使用IE中的“自动检测Intranet网络”进行录制,您可以使用此方法捕获大多数请求,您必须手动确定身份验证。 How you do this depends on how your application communicates with your server to authenticate a user. 如何执行此操作取决于应用程序与服务器通信以验证用户身份。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM