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

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

问题描述

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

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.

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

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.

大大简化:指示控制器运行负载测试.它收集测试套件和数据源值.它在可用代理之间拆分虚拟用户,并将测试套件和数据源值部署到这些代理.然后代理运行单独的测试,每个测试用例的动态数据方面在代理内处理.当单个 Web 测试完成后,它们的结果会被传递回控制器,并将数据写入 SQL 结果数据库,它还向 Visual Studio 提供数据,用于在负载测试运行时显示的图形等.有关详细信息,请参阅此 Microsoft 页面.

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.

一个复杂的问题是根据选择的访问方法处理数据源.对于顺序随机,所有数据的完整副本将发送给每个代理.对于Unique,数据被分成几部分,每个代理得到一份,从而保持每个数据值只使用一次"的期望.请参阅 此 Microsoft 页面了解更多详情.

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天全站免登陆