0

I want to run 5 tests from a suite of 200 tests via commandline. The framework uses Selenium with nunit and is built on c#. After looking for solution online, /run was what I thought could fix my problem but it says invalid argument. Can someone please guide me with what is the parameter to run only few tests from suite via command line for nunit selenium?

enter image description here

enter image description here

Tanvi Vira
  • 13
  • 3
  • https://docs.nunit.org/2.6.4/consoleCommandLine.html `nunit-console assembly1.dll assembly2.dll assembly3.dll` – vitaliis Jul 28 '21 at 05:40

1 Answers1

2

You are using obsolete documentation or online answers relating to an older version of NUnit. For NUnit 3, you want the /test option.

BTW, the docs link posted by @vitalis is to legacy docs, as it says on the top of that page. Current docs for the nunit3-console command-line are at https://docs.nunit.org/articles/nunit/running-tests/Console-Command-Line.html

(You're dealing with a program that has been around in various versions for more than 20 years, so it's extra important to make sure you are looking at current information.)

Charlie
  • 12,928
  • 1
  • 27
  • 31
  • Thank you for that. With /test, it did not error but says test count 0 (Screenshot attached). Am I missing something? – Tanvi Vira Jul 28 '21 at 22:11
  • That means you don't have a test with the exact name you specified. For simple, non-generic, non-parameterized tests, use the fully qualified name of the method. (If you are doing anything more complicated than that, you should ask a separate question.)If you run nunit3-console with the /explore option, it will list the names it has given to all your tests. – Charlie Jul 29 '21 at 23:13