Last active
January 29, 2018 17:47
-
-
Save jincod/4f183172e46a64179a12 to your computer and use it in GitHub Desktop.
Run NUnit3 tests from powershell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ProjectDir = "." | |
$PackagesDir = "$ProjectDir\packages" | |
$OutDir = "$ProjectDir\bin\Debug" | |
# Install NUnit Test Runner | |
$nuget = "$ProjectDir\.nuget\nuget.exe" | |
& $nuget install NUnit.Runners -ExcludeVersion -o $PackagesDir | |
# Set nunit path test runner | |
$nunit = "$ProjectDir\packages\NUnit.ConsoleRunner\tools\nunit3-console.exe" | |
#Find tests in OutDir | |
$tests = (Get-ChildItem $OutDir -Recurse -Include *Tests.dll) | |
# Run NUnit3 tests | |
& $nunit $tests --noheader --framework=net-4.5 --work=$OutDir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To answer my question above, this is the line of code:
& $NUnitConsoleExecutablePath $automationdll --where="cat==smoke"