用围攻强调登录区域


11

我需要测试网站保留区域的性能。我想用攻城来达到这个目标。

要访问保留区,您必须登录到我的网站。

如何使用Siege将登录cookie发送到我的Web应用程序?

Answers:


18

仅在默认的.siegerc文件中(而不是在线手册或手册页中)提到过,但是:

# Login URL. This is the first URL to be hit by every siege
# client. This feature was designed to allow you to login to 
# a server and establish a session. It will only be hit once
# so if you need to hit this URL more then once, make sure it
# also appears in your urls.txt file.
#
# ex: login-url = http://eos.haha.com/login.jsp POST name=jeff&pass=foo
#
# login-url = 

因此,您并不是完全预先设置登录cookie。取而代之的是,您指示每个围困工作人员必须在其他任何请求之前登录一次您的站点,并且他们将保留其身份验证状态,直到围困终止。

或者,您可以将用户代理设置为特殊字符串,然后在身份验证代码中监视该特殊用户代理,然后自动将该访问者登录。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.