简体   繁体   English

VS Web测试负载,分布和迭代

[英]VS Web Test Load, Distribution and Iterations

In this case, I have created several webtest scripts, and added them to a load test (distributed by expected use). 在这种情况下,我创建了几个webtest脚本,并将它们添加到负载测试中(按预期用途分发)。

What I would like to do is send a user load (500 for example) where all users run at the same time, each user is given only a single script to run and complete, then the test is finished. 我想做的是发送一个用户负载(例如500),其中所有用户同时运行,每个用户仅获得一个脚本来运行和完成,然后测试完成。 One iteration for each user. 每个用户一次迭代。

I am finding that iterations are not user based but test based, so only one user and test is completed when selecting a Test Iterations value of 1 for 500 users. 我发现迭代不是基于用户的而是基于测试的,因此当为500个用户选择1的“测试迭代”值时,只有一个用户并且测试完成。 Is there a user based iteration setting or some other way to accomplish my intended test? 是否有基于用户的迭代设置或其他方式可以完成我的预期测试?

Thanks. 谢谢。

The test settings you have used are not at all clear from your question. 您所使用的测试设置根本无法从您的问题中清除。 However assuming you want to start 500 test cases at the same time and stop after they have completed then you can use the following. 但是,假设您要同时启动500个测试用例,并在它们完成后停止,则可以使用以下内容。

In the properties of the scenario: Set the user load to constant and to 500 users. 在方案的属性中:将用户负载设置为常量,并设置为500个用户。 Also set maximum test iteration to 0 (meaning no maximum). 还将最大测试迭代次数设置为0(表示无最大值)。 I would also set the think time between iteration to much longer than you expect the test run to take; 我还将迭代之间的思考时间设置为比您预期的测试运行时间长得多。 this setting may not be needed but it avoids unexpected behaviours. 可能不需要此设置,但可以避免意外的行为。

In the properties of the run settings there are two possibilities. 在运行设置的属性中,有两种可能性。 Either (1) set the test iterations to 500. Or (2) set the run duration to long enough for all 500 tests to complete, but shorter than the think time between iteration in the scenario. (1)将测试迭代次数设置为500。或者(2)将运行持续时间设置为足够长,足以完成所有500个测试,但比场景中两次迭代之间的思考时间短。

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

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