在来自数据源的不同服务器上的负载测试中运行所有Web测试. [英] Run all web tests in a load test on different servers from a data source.

查看:80
本文介绍了在来自数据源的不同服务器上的负载测试中运行所有Web测试.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个负载测试,并为此添加了10个Web测试.现在,我想从数据源在不同的服务器上运行所有这些Webtest.可以说我有3种不同的服务器,即dev,demo,production,qa.现在我想将所有10个Web测试作为一个单一的运行 迭代和所有网络测试都使用"dev"第一次迭代的服务器(这里的迭代方法是-一次运行所有10个Web测试).当所有10个网络测试都执行完后,我想将数据光标从数据源移至下一条记录(例如,将"demo" 服务器"),并希望在该服务器上运行所有网络测试,并希望对服务器"服务器中的所有数据行执行此操作.数据源.

i have created a load test and addded 10 web tests to this. Now i want to run all these webtests on different server from a data source. Lets say i have 3 different servers, dev , demo, production, qa. Now i want to run all the 10 web tests as a single iteration and all web tests use "dev" server for first iteration(Here iteration means - run all 10 web tests one by one). When all 10 web tests got executed, I want to move the data cursor to next record from the data source(say "demo" server) and want to run all the web tests on this server and want to do like this for all the data row in the "Server" datasource.

我知道我们可以通过覆盖其PreWebTest()方法通过WebTestplugin实现此目的.但这仅在我的负载测试仅包含一个Web测试的情况下有效.但是由于我的要求是要针对多个Web测试运行它,而且我想更改数据游标 在负载测试中执行所有webtest(不是在每个PreWebTest上).您能否建议我如何将一组测试作为一次迭代处理,以及这些测试的下一次迭代何时开始(事件)?这样我就可以移动数据光标 在那里.

I know we can achieve this through a WebTestplugin by overriding its PreWebTest() method. But this only works if my load test consists on only one web tests. But since my requirement is to run it for multiple webtests and moreover i want to change data cursor on execution of all the webtests in a load test(not on every PreWebTest). Could you please suggest me how can we treat a group of tests as a single iteration and when next iteration of those tests start(Event)  so that i can move the data cursor there.

1>.数据源-服务器"包含所有服务器名称的CSV文件.

1>.Datasource - "Servers" a CSV file which contains all the server name.

ServerName

ServerName

dev

演示

生产

qa,

2.负载测试

-包含10个webTest.(WebTest1,WebTest2,WebTest3,WebTest4,WebTest5,WebTest6,WebTest7,WebTest8,WebTest9,WebTest10)

- which Contains 10 webTests.(WebTest1, WebTest2, WebTest3, WebTest4, WebTest5, WebTest6,WebTest7,WebTest8,WebTest9,WebTest10)

现在,我想在所有4台服务器上运行每个Webtest,例如WebTest1-4次(所有4台服务器每台一次)和WebTest2 -4次(所有4台服务器每台一次),等等. .

Now i want to run each webtest on all the 4 servers Like WebTest1 - 4 times(one time each ofr all the 4 servers) and WebTest2 -4 times(one time each ofr all the 4 servers) and so on...

推荐答案

嗨Vinay_VS,

您是否可以使用负载测试插件进行尝试,并在事件中执行逻辑操作(例如,LoadTestStarting,TestStarting)?

有些文章可能会让您受益:

#创建一个负载测试插件

# Create a Load Test Plug-In

https://msdn.microsoft.com/en -us/library/ms243153.aspx

#ILoadTestPlugin接口

# ILoadTestPlugin Interface

https://msdn.microsoft.com/zh-CN/library/microsoft.visualstudio.testtools.loadtesting.iloadtestplugin.aspx

#使用负载测试插件来限制在负载测试中运行的测试数量

# Using a load test plugin to limit the number of tests run in a load test

http://blogs .msdn.com/b/billbar/archive/2006/02/16/533216.aspx

注意

Starain


这篇关于在来自数据源的不同服务器上的负载测试中运行所有Web测试.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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