使用c#在selenium中使用Testcasesource开发了测试用例.在NUnit中运行测试用例后,它将错误显示为"提供的参数数量错误".这是我的测试用例代码
[TestFixture]
class testcases
{
static String[] exceldata= readdata("Inputdata.xls", "DATA", "TestCase1");
[SetUp]
public void Setup()
{
//setupcode here
}
[Test, TestCaseSource("exceldata")]
public void Sample (String level,String Username,String password,String FirstName)
{
//testcase code here
}
[TearDown]
public void TearDown()
{
tstlogic.driverquit();
}
Run Code Online (Sandbox Code Playgroud)
检索4个值,我可以看到NUnit中的值.但它将错误显示为"提供的参数数量错误".任何人都可以帮忙吗?