I develop tests using Nunit and a data validation method . I have a test method with two parameters: the path to the xlsx file and the name of the worksheet. It works fine in Visual Studio when I pass parameters in the TestCase attribute, for example, when I want to run 3 test cases, I need to write something like this:
[TestCase(@"pathToFile.xlsx", "TestCase1")] [TestCase(@"pathToFile.xlsx", "TestCase2")] [TestCase(@"pathToFile.xlsx", "TestCase3")] public void performActionsByWorksheet(string excelFilePath, string worksheetName) {
I would like to run my test cases and pass parameters using the Nunit Console (so as not to write the parameters in the code).
Can this be achieved?
c # nunit data-driven-tests nunit-console
kotoj
source share