VSTS 2008 负载测试中的虚拟用户并发
我正在对一台服务器进行负载测试,该服务器要求用户一次不能连接多次。
如果我将 VUser 绑定到真实用户,这种情况是否会发生,或者我能否确定在上一次迭代完成之前该 VUser 不会被重用?
I am load testing a server that requires that a user not be connected more than once at a time.
If I bind the VUsers to real users will this ever occur, or can I be sure that that VUser will not be reused until the previous iteration is complete?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我创建了一个负载测试来测试这一点。
粗略地说:
将这两者混合起来,您会发现,一旦 UserId 被锁定在 Method2 中,您将在 5 分钟内不会看到它再次命中任一方法。 当所有用户都被锁定时,测试就会一直持续到有一个用户被释放为止。
I've created a load test to test this.
Roughly:
Mix these two up and you'll see that as soon as a UserId is locked up in Method2 you won't see it hit either method again for 5 min. And when all users are locked up the test just sits until one is released.
您可以在创建编码 Web 测试时设置负载测试连接的用户。 添加一些代码来从池中获取用户可能会起作用,但这将具有挑战性,因为获取新用户的代码很容易成为瓶颈,并且会导致并发/多线程错误。
You can set the user that the load test connects as when you create a coded web test. Adding some code to get the user from a pool could work, but it would be challenging as the code to get a new user could easily become a bottle neck and will open to concurrency/multi threading bugs.