[Feature Suggestion] Ability to run a test from cli without overriding parameters with TestContext and without using TestCaseSource object #1527
arielnahom
started this conversation in
Ideas
Replies: 1 comment
-
As you suggest, that would be a new feature. I just wanted to mention that Currently, you can select individual tests (i.e. one of your 40 sets of parameters) only if you can figure out what name NUnit has given to that test. That's not difficult for simple type arguemts like int or string but becomes more complicated when complex types are involved. There is no way to run a particular method with a new set of arguments, not already specified in a test case source. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'd like to have the ability to run a specific test (already possible with the cli) with specific parameters seamlessly (and integrate it with other DevOps tools to run automatically).
currently if i want to do it - I need to override each param on each method with TestContext.Parameters.Get which is not ideal and error prone.
if nunit will just populate the parameters of the function which has same name it would be much more elegant.
Also - if I run it like so
nunit3-console .\bin\local\Debug\net48\TestProject1.dll --where "cat == A.C" -tp "ProductId=6"
and it will run 3 times - the same test. if I hade 40 cases in ProductDiscountsTestsCases as TestCaseSource it will run 40 times the same test.
I'd like to be able to override and ignore the TestCaseSource when I run from the nunit3-console cli and use params provided in cli and run it only once.
It enables much more integration with automatic tools and other CI/CD tools to automate things with greater flexibility.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions