简体   繁体   English

Visual Studio负载测试可与一个用户模拟多个用户

[英]Visual studio load test simulate multiple users with one user

I have a webtest in visual studio, which login to a website and does few clicks. 我在Visual Studio中进行了一次网络测试,该测试可以登录到一个网站并且点击几下。 I wanted to simulate this for 2000 users without having those many logins in a csv file or a database. 我想针对2000个用户进行模拟,而无需在csv文件或数据库中进行大量登录。 Configured my webtest to run the test for 30 minutes by stepping 10 users every 10 seconds, its running fine for like 2 minutes and then failing after that with multiple errors. 将我的webtest配置为运行测试30分钟,方法是每10秒步进10个用户,运行正常2分钟,然后失败,并出现多个错误。 Is this possible at all ? 这有可能吗? If so how can i do this ? 如果可以,我该怎么做?

A load test is intended to do what is stated in your question but there is too little detail in the question to give a good answer. 负载测试旨在执行您的问题中所述的操作,但是问题中的细节太少,无法给出良好的答案。 Adding 10 users every 10 seconds means that after 2 minutes there have been 2*60/10 = 12 increments, so 10(users) * 2(minutes) * 60(seconds per minute) / 10(step duration) = 120 users. 每10秒增加10个用户意味着2分钟后2 * 60/10 = 12个增量,所以10(用户)* 2(分钟)* 60(秒/分钟)/ 10(步长)= 120个用户。 If it ran for the full 30 minutes then there would be 10*30*60/10 = 1800 users. 如果运行了整整30分钟,则将有10 * 30 * 60/10 = 1800个用户。 Microsoft provide recommendations for how many users can be run by one computer and when to use additional agent computers. 微软提供的建议有多少用户可以通过一台计算机,何时使用额外的代理计算机上运行。 These are just starting points and do not take the details of the individual tests into account. 这些只是起点,没有考虑单个测试的详细信息。

Rather than jumping in with a 2000 user test it may be better to start more slowly and establish, for a modest number of users that, the test suite works and also that the web site works. 与其开始进行2000用户测试,不如更慢地启动并建立测试套件(对于一定数量的用户),该测试套件可以正常工作,并且网站可以正常工作,则更好。 I suggest rerunning the test incrementing by 10 users every minute. 我建议每分钟重新运行增加10个用户的测试。 Then after 2 minutes there will be 10*2*60/10 = 120 users. 然后2分钟后,将有10 * 2 * 60/10 = 120个用户。 If that test works then decrease the step interval to (perhaps) 20 seconds. 如果该测试有效,则将步长间隔减少到(也许)20秒。

The question does not state what errors are being generated. 该问题没有说明正在生成什么错误。 The actual errors need to be analyzed to determine the nature and location of the problem. 需要分析实际错误以确定问题的性质和位置。 It may be that a limit is being reached in some part of the server, the network or the computer running the test. 服务器,网络或运行测试的计算机的某些部分可能已达到极限。 When the limiting component is found then you know what needs changing. 找到限制组件后,您就知道需要更改什么。

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

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