使用Visual Studio进行数据驱动的负载测试-在哪里生成Web测试? [英] Data driven load testing with Visual Studio - where are web tests generated?

查看:97
本文介绍了使用Visual Studio进行数据驱动的负载测试-在哪里生成Web测试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Visual Studio 2013中设置了一个Web性能测试和负载测试项目,该项目使用基于本地SQL Server数据源的数据驱动的Web测试.最终,我想设置一个测试控制器和测试代理,以分配来自多个客户端的负载.

我的问题是关于控制器和代理的体系结构.每个测试代理是否还需要访问为Web测试生成内容的数据源,还是在控制器上生成Web测试(及其动态参数)然后分发给测试代理?

下面是我发现的架构图:

解决方案

代理程序不需要访问数据源.负载测试控制器安排将所需的数据部署到正确的代理程序,以便它们可以运行测试.

大大简化::指示控制器运行负载测试.它收集测试套件和数据源值.它将虚拟用户划分为可用的代理,并将测试套件和数据源值部署到这些代理.然后,代理运行单独的测试,每个测试用例的动态数据方面都在代理内进行处理.当各个Web测试完成时,其结果将传递回控制器,并将数据写入SQL结果数据库,同时还将数据提供给Visual Studio,以显示在负载测试运行时显示的图形等.有关更多详细信息,请参见此Microsoft页面. /p>

一个复杂的问题是根据所选择的访问方法来处理数据源.对于顺序随机,所有数据的完整副本发送到每个代理.对于 Unique ,数据被分为几部分,每个代理得到一个,因此保持了所需的仅使用每个数据值一次".参见此Microsoft页面以获取更多详细信息.

I have set up a Web Performance Test and Load Test project in Visual Studio 2013 that uses data driven web tests based on a local SQL Server data source. Eventually I would like to set up a test controller and test agents in order to distribute the load from multiple clients.

My question is about the architecture of the controller and agents. Does each test agent also need access to the data source that generates content for the web tests or is the web test (and its dynamic parameters) generated at the controller and then distributed to the test agents?

Below is a diagram I found of the architecture:

解决方案

Agents do not need access to the data source. The load test controller arranges that the required data is deployed to the correct agents so they can run the test.

Vastly simplified: The controller is instructed to run a load test. It collects the test suite and the data source values. It splits the virtual users across the available agents and deploys the test suite and the data source values to those agents. The agents then run the individual tests, the dynamic data aspects of each test case are handled within the agent. As individual web tests finish their results are passed back to the controller and it write the data to the SQL results database, it also provides data to Visual Studio for the graphs etc displayed as the load test runs. See this Microsoft page for more details.

One complication is the handling of the data source depending on the access method selected. For Sequential and Random a full copy of all of the data is sent to each agent. For Unique the data is split into pieces and each agent gets one piece, thus maintaining the desired "use each data value only once". See this Microsoft page for more details.

这篇关于使用Visual Studio进行数据驱动的负载测试-在哪里生成Web测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆