1

我有一个项目,我正在读取测试用例的 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,但在 beta 版本中,在发现测试用例时不会读取 excel。我需要使用测试版的 TestFixtureSource 和 TestCaseSource。

4

0 回答 0