使用 NTLM 身份验证进行压力测试

发布于 2024-08-07 15:17:19 字数 315 浏览 5 评论 0原文

正在寻找一个可以进行 Windows 身份验证的开源 Web 测试工具。

我曾经少量使用过 openSTA 和 Pylot,但发现它们都不适用于 Windows。 openSTA 表示您可以在此处执行 NTLM:http://www.opensta。 org/docs/sclref/build-auth-blob.htm

我无法让它工作 - 可能是由于网络上的某些配置或者可能是我自己的错误。

Looking for an open source web testing tool that can do Windows Authentication.

I've used openSTA and Pylot in very small amounts but found neither to do windows. openSTA says you can do NTLM here: http://www.opensta.org/docs/sclref/build-auth-blob.htm

I could not get it working - probably due to some config on the network or maybe my own mistake.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

梦里南柯 2024-08-14 15:17:19

由于身份验证问题而限制您的测试工具将是一种耻辱。压力测试时关闭 NTLM/Windows Auth 更为实用。我们通过添加一个配置参数来实现此目的,该参数仅在压力/负载测试环境中配置时才允许通过 URL 传递用户名。这会导致我们加载和缓存当前用户的一处行为发生变化。它几乎适用于任何测试工具。

如果您正在测试 ASP.NET 应用程序,则需要创建自己的用户主体并将其分配给 HttpContext.Current.User。执行此操作的一个好地方是在仅在压力测试环境中配置的 HttpModule 或 Membership Provider 的 AuthenticateRequest 事件中。

这种技术没有太大的缺点。这是在假设 Windows 身份验证相对便宜并且与整个应用程序的性能相比相对较小的情况下进行的。没有它,我们对压力测试结果充满信心。这里需要注意的是 IE 将使用 NTLM 进行质询/响应,因此虽然这不是一个完美的测试,但它是一个非常好的测试。完美是美好的敌人。

It would be a shame to limit your testing tool due to a matter of authentication. It is more practical to turn off NTLM / Windows Auth during stress testing. We have done this by adding a configuration parameter that allows the user name to be passed via URL only when configured in a stress / load testing environment. This causes a behavior change in exactly one place where we load and cache the current user. And it works with virtually any testing tool.

If you are testing an ASP.NET app, it is a matter of creating your own user principal and assigning it to the HttpContext.Current.User. A good place to do this is in the AuthenticateRequest event of an HttpModule or Membership Provider that you configure in only in the stress testing environment.

There is not much downside to this technique. This operates under the assumption that Windows authentication is relatively cheap and relatively small compared to the performance of the overall application. We have enjoyed a high confidence in our stress test results without it. The one caveat here is that IE will do a challenge/response with NTLM, so while it is not a perfect test, it is a very good test. And the perfect is the enemy of the good.

云淡风轻 2024-08-14 15:17:19

也许我遗漏了有关 Windows 身份验证的一些内容,但我认为 Selenium 应该能够做到这一点。你尝试过吗?

Maybe I am missing something about Windows Authentication, but I think that Selenium should be able to do that. Have you tried?

傲娇萝莉攻 2024-08-14 15:17:19

您可以尝试 Grinder 项目:NTLM 支持有点棘手,但这里有一些详细信息:

http ://grinder.sourceforge.net/faq.html#spnego(嵌入链接现已失效 - 请参阅 CruiZen 的评论)

http://bb10.com/java-grinder-user/2007-08/

You could try out the Grinder project: NTLM support is a bit tricky but there are some details here:

http://grinder.sourceforge.net/faq.html#spnego (embedd link now dead - see comment from CruiZen)

or

http://bb10.com/java-grinder-user/2007-08/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文