1

There was a console command for listing all tests in a Visual Studio project with NUnit console runner. Do somebody know it?

I use version 3.6.1.

kame
  • 20,848
  • 33
  • 104
  • 159
  • 2
    Did you think of [looking at the documentation](https://github.com/nunit/docs/wiki/Console-Command-Line)? It's `--explore` – stuartd Jun 09 '17 at 10:46
  • Yes it was explore. But it didn't show my test because of a wrong folder. ;) Could you write a solution please? – kame Jun 09 '17 at 10:49

1 Answers1

8

Just use the --explore switch.
If you're using the nunitlite executable, it will list out tests in the current project. Make sure that your namespaces are visible to the "Program.cs" file that nunitlite creates

eg:

MyTests.exe --explore

If you are using the full console, you'll need to specify the assembly,

eg:

nunit3-console.exe --explore mytests.dll
paul1923
  • 431
  • 3
  • 17