使用Visual Studio工具进行Web性能测试中的数据源 [英] Data Source in Web Performance Testing Using Visual Studio Tool

查看:85
本文介绍了使用Visual Studio工具进行Web性能测试中的数据源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Visual Studio工具2017创建了一个Web性能测试和负载测试,并为其添加了一个CSV文件的数据源。测试正在执行。在数据文件中,我有以下列。我必须参数化所有以下列 -  

I have created a web performance test and Load Test using Visual Studio tool 2017 and have added a data source a CSV file with it. The test is executing properly. In data file I have below columns . I have to parameterize all below columns - 

1)网址

2)用户名

3 )密码

4)别名

5)CustomerNumber

5) CustomerNumber

现在,我必须执行测试100个不同的数据集,因此在csv数据文件中添加了100行。 

Now, I have to execute the test for 100 different data set, so have added 100 rows in the csv data file. 

问题:

在上述字段值中 - 所有100个数据行的URL,CustomerNumber和Alias都相同。现在,在csv文件中,我必须为每行中的这些字段添加重复的条目,以便为每个数据条目执行测试。

In the above values of the fields - URL, CustomerNumber and Alias is same for all 100 data rows. Now, in the csv file I have to add repeated entry for these fields in each row in order to execute the test for each data entry.

有没有办法,我可以通过它添加这些字段的数据在一个地方,并在数据文件中的其他99行中调用它?

Is there a way, through which I can add the data for these fields at one place and call it in other 99 rows in data file ?

我不想为所有100行添加相同的URL链接。 

I don't want to add the same URL link for all the 100 rows . 

请建议我该如何处理。

提前致谢..

问候,

Vaibhav

推荐答案

Web性能测试可以有多个数据源文件。您可以将当前文件的列拆分为两个文件。第一个只有网址,第二个包含所有其他字段。由于所有测试都应该使用相同的url,因此
在url文件中只有一个数据行。

Web Performance tests can have more than one datasource file. You could split the columns of the current file into two files. The first having just the url, the second having all the other fields. As all the tests should use the same url, just have one data line in the url file.

鉴于在所有测试中都使用相同的url,你应该问问自己为什么数据源中的url根本就是?作为测试的一部分会更好吗?也许url可能会保存在测试的上下文参数中。

Given that the same url is to be used in all tests, you should ask yourself why is the url in the datasource at all? Would it be better as part of the test? Perhaps the url might be held in a context parameter of the test.

问候

Adrian


这篇关于使用Visual Studio工具进行Web性能测试中的数据源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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