Thanks for the quick response. After going back to review, I realized it was my own fault. I was using only two rows for a quick test, however, on incrementing the rows I was starting the count of rows at 1 instead of zero (a stupid mistake because I wanted my count to start at 1 for other reasons). Because the count was starting at 1, it was omitting to run the test case for row 0.
Executing Tests using dotnet runner cli doesn't interpret DynamicData
I have a test case (MS UnitTest Framework, VS 2019) that uses the [DataTestMethod] [DynamicData(nameof(GetTestData), DynamicDataSourceType.Method)] attributes to iterate thru several objects. Running the test in VS TestExplorer works great, it iterates thru all the rows being passed (works like a champ). However, when I run the same test case from the command console using dotnet or vstest.console runners, it executes the test only once.
Am I missing something?
Hello Neftali, thank you for posting here. May I ask how do you know that the test only executed once but didn’t iterate through all the rows being passed like running in Test Explorer? For vetest.console.exe, it runs tests and displays the test results of each test method. You can try to add
/logger:trxto log and analyze more detailed information of test results.
Sign in to comment
Sort by: Oldest
Besides, could you please share more information such as some code snippets and reproduced steps with me for further check?