
[英]How to fetch only some of the rows in .csv file while executing Coded UI parameterised Tests
[英]Coded UI: Not able to use CSV file in script in TFS solution explorer while it is working fine on the local machine
我已经完成了以下步骤,在我的本地计算机上工作正常,但是当我使用TFS解决方案时,请浏览以下错误显示(为清楚起见添加了换行符):
Error: The character encoding for the file D:\Testcase\data.csv has changed.
Your source control provider may have problems managing files with this type of encoding.
For example, if you save an ANSI-encoded file as UTF-8 you may not be able to merge or show differences.
脚步:
码:
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\data.csv", "data#csv", DataAccessMethod.Sequential), DeploymentItem("data.csv"), TestMethod]
public void CodedUITestMethod1()
{
Console.WriteLine(TestContext.DataRow["firstname"].ToString());
// To generate code for this test, select "Generate Code for Coded UI Test" from the shortcut menu and select one of the menu items.
}
在属性窗口中将该文件的“ Copy to Output Directory
设置为Copy Always
或Copy if Newer
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.