我有一个项目,我正在为测试用例读取excel文件。读取excel并将案例映射到C#类的代码正在这样做
class AllTests{
public static IEnumerable DemoCases
{
get
{
//Read the excel map the cases here
yield return testcasedataObject;
}
}
}
测试方法看起来像这样
[Test, TestCaseSource(typeof(AllTests), "DemoCases")]
public void DemoTest( )
{
//Test execution code
}
现在所有这些都适用于Nunit 2.6.4,但是在发现测试用例时,不会读取excel。我需要使用beta的TestFixtureSource和TestCaseSource。