Use the NUnit Console Runner to run all tests in a folder

I am trying to use NUnit Runners 2.6.4 to run all test builds in a test folder. My current command looks like this:

/nologo /noshadow /framework:net-4.0 /xml:.\test\TestResults.xml .\test\*.Test.dll

Unfortunately, Nunit just throws a System.ArgumentException: Illegal characters in the way.

Anyway, can I achieve this?

+4
source share
3 answers

You cannot use wildcards for input files, but you can specify several test libraries on the command line:

/nologo /noshadow /framework:net-4.0 /xml:.\test\TestResults.xml .\test\SomeLib1.Test.dll .\test\SomeLib2.Test.dll .\test\SomeLib3.Test.dll

From the official documentation :

(DLL .exe), , NUnit. , :

NUnit (.nunit)

Visual Studio (.sln)

Visual Studio (.csproj,.vbproj,.csproj)

UPDATE

:

for /f %%f in ('dir .\test\ /b /s *.Test.dll') do nunit-console /nologo /noshadow /framework:net-4.0 /xml:.\test\TestResults.xml "%%f"

dir .\test\, *.Test.dll. (nunit-console) .

+8

PowerShell ( NUnit3, NUnit2):

PS> nunit3-console (ls -r *\bin\Debug\*.Tests.dll | % FullName | sort-object -Unique)

nunit . nunit,

+7

Try:

PS> nunit3-console (ls -r *\bin\Debug\*.Tests.dll | % { $_.FullName } | sort-object -Unique)

one_mile_run , :

"FullName" "System.String", "System.Management.Automation.ScriptBlock"

0

Source: https://habr.com/ru/post/1621100/


All Articles