質問

I have created a simple web test in Visual Studio to be used in a load test. This web test logs in to a site using forms authentication, then takes some other actions after logging in.

The issue I am having is that when this web test repeats, the log-in step is performed again. I tried adding a conditional to only log-in if the .ASPAUTH cookie does not exist, however it seems that cookies are cleared/a new session is started each time the web test is repeated.

Is there a way to configure a web test so that the log-in step only happens once, but all subsequent steps are repeated until the conclusion of the load test?

役に立ちましたか?

解決

This may not be the best way, but the way I eventually solved this problem was to add a loop that included all requests after the initial Log-In requests. The loop condition checks for the existence of the '.ASPAUTH' cookie, which is set once a user successfully logs in. Therefore the user will log in, hit the loop, and continue repeating the loop (unless a request within the loop causes the user to log-out).

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top