nunit3-console TestData.dll /include:SmokeTests
but with nunit v3 I get back:
Invalid argument: /include:SmokeTests
I try to check command line parameters here http://nunit.org/index.php?p=consoleCommandLine&r=3.0
but page does not exist. Anyone know what has changed?
Open a powershell window and run nunit3-console.exe with "--test" option set to reference the specific test you want to run (including namespace and class). and finally, provide the location of the assembly where the test can be found.
The Category attribute provides an alternative to suites for dealing with groups of tests. Either individual test cases or fixtures may be identified as belonging to a particular category. Some runners, including the Console Runner, allow specifying categories to be included in or excluded from the run.
So if anyone searching how to do this in NUNIT3:
--where "cat == SmokeTests" --noresult
helped by @omer727 link!
Link provided by @omer727 is broken, here is another one: https://github.com/nunit/docs/wiki/Console-Command-Line
The anwser still works:
--where "cat == SmokeTests"
The console command-line allows you to specify a filter, which will select which tests are executed. This is done using the --where option, followed by an expression in NUnit's Test Selection Language (TSL), a simple domain-specific language designed for this purpose.
Example:
nunit3-console mytest.dll --where "cat == Urgent || Priority == High"
For more details visit this link: https://github.com/nunit/docs/wiki/Test-Selection-Language
EDIT:
The detailed example can be found in the related SO question here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With