使用excel文件进行数据驱动测试 [英] Data Driven Testing with excel files
问题描述
我想在我的单元测试中使用来自excel文件的数据。
如同,用列中的数据初始化列表。
如何在代码中完成此操作?
<登记/> X&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; y
410.00000 5.77136
516.15942 5.90580
649.80621 6.04336
818.05755 6.18413
当我在电子表格的两列中有上述数据时,我会喜欢用这些列数据初始化双打列表。
任何帮助将不胜感激。
谢谢,
Saritha。
你好Saritha
你用单元测试开发什么样的程序?
程序和excel表之间有什么关系?
>谢谢。
Figo Fei
MSDN订阅者支持 msdnmg@microsoft.com &NBSP; 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> 跨度> < /跨度>
I would like to use data from excel files in my unit tests.
As in, initialise lists with data from a column.
How can this be done in the code?
x y
410.00000 5.77136
516.15942 5.90580
649.80621 6.04336
818.05755 6.18413
When I have the above data in 2 columns of a spreadsheet, I would like to initialise Lists of doubles with each of these column data.
Any help will be appreciated.
Thanks,
Saritha.
Hi Saritha
What kind of program do you develop with unit tests?
What is the relation between the program and the excel sheet?
Thanks.
Figo Fei
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com
这篇关于使用excel文件进行数据驱动测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!