小编Nit*_*pan的帖子

nunit中提供的参数数量错误

使用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中的值.但它将错误显示为"提供的参数数量错误".任何人都可以帮忙吗?

c# selenium nunit arguments testcasesource

3
推荐指数
1
解决办法
2058
查看次数

标签 统计

arguments ×1

c# ×1

nunit ×1

selenium ×1

testcasesource ×1