[英]How do I get Visual Studio Load Test to show one test per user?
I am tasked with creating load tests for a web application. 我的任务是为Web应用程序创建负载测试。 I'm using Visual Studio 2017's Web Performance and Load Testing tool.
我正在使用Visual Studio 2017的Web性能和负载测试工具。 I created the project, created a Web Test script, then created the Load Test scenario.
我创建了项目,创建了Web测试脚本,然后创建了负载测试方案。 What we want is to test running the same script with various concurrent user counts (10, 20, 30, etc.).
我们要测试的是运行具有多个并发用户数(10、20、30等)的相同脚本。
Everything runs fine, but there is one small issue. 一切运行正常,但是有一个小问题。 No matter how many concurrent users I set up to run the test, the result page shows only one test was run.
无论我设置了多少个并发用户来运行测试,结果页面都只会显示运行了一个测试。 While it is true that I only ran one test, it was run N times, where N is the number of concurrent users (I have it set up so that each user runs it once and then stops).
确实,我只运行了一个测试,但它运行了N次,其中N是并发用户数(我已对其进行设置,以便每个用户运行一次然后停止)。 I'd like for the final report to reflect this.
我希望最终报告能反映这一点。
The only reason I expect this is possible is that we have a report from an old test that someone ran, which shows 40 Total tests for 40 users, and another result showed 30 Total tests for 30 users. 我希望这是可能的唯一原因是,我们收到了某人运行的旧测试的报告,其中显示40个用户的40个测试总数,另一个结果显示30个用户的30个测试总数。 They somehow got it to show one test per user.
他们以某种方式让它显示了每个用户一个测试。 Unfortunately, all I have is screenshots of the result page;
不幸的是,我只有结果页面的屏幕截图; I don't have access to the actual tests or settings (it's a long story, but they are gone, and so is the person who made them).
我无权访问实际的测试或设置(这是一个很长的故事,但是它们已经消失了,制造它们的人也是如此)。 So now I'm basically stuck trying to reverse engineer how they did it.
所以现在我基本上停留在尝试反向工程他们的工作方式。
Here are my settings for the load test: 这是我的负载测试设置:
Does anyone have any idea how to make it do what I am trying to do? 有谁知道如何使它做我想做的事?
The "Test iterations" field in the "Run settings" gives the total number of tests to be executed, provided the "Use test iterations" is set true, otherwise the test runs for the time given by the "Run duration". 如果“使用测试迭代次数”设置为true,则在“运行设置”中的“测试迭代次数”字段给出了要执行的测试总数,否则测试将在“运行持续时间”指定的时间内运行。 Setting "Test iterations" to 1 (ie one) means that the test will be executed once.
将“测试迭代次数”设置为1(即一次)意味着测试将执行一次。
The "Test iterations" gives the total number of tests to be executed. “测试迭代”给出了要执行的测试总数。 If you want 30 virtual users and want each to execute 4 tests then you would need to set 30*4 = 120 iterations.
如果您需要30个虚拟用户并希望每个用户执行4个测试,则需要设置30 * 4 = 120次迭代。
The "Scenario" properties include a "Maximum test iterations", this should be left at zero so it does not conflict with the values in the "run settings". “方案”属性包括“最大测试迭代次数”,应将其保留为零,以免与“运行设置”中的值冲突。
To ensure that each simulated user only executes one test, set the "Percentage of new users" property in the "Scenario" to 100. See "The Effect of Percentage of New Users" section of this page . 为确保每个模拟用户仅执行一个测试,请将“方案”中的“新用户百分比”属性设置为100。请参见本页的 “新用户百分比的影响”部分。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.