Run NUnit tests from powershell
$ProjectDir = "."
$PackagesDir = "$ProjectDir\packages"
$OutDir = "$ProjectDir\bin\Debug"
# Install NUnit Test Runner
$nuget = "$ProjectDir\.nuget\nuget.exe"
& $nuget install NUnit.Runners -Version 2.6.2 -o $PackagesDir
# Set nunit path test runner
$nunit = "$ProjectDir\packages\NUnit.Runners.2.6.2\tools\nunit-console.exe"
#Find tests in OutDir
$tests = (Get-ChildItem $OutDir -Recurse -Include *Tests.dll)
# Run tests
& $nunit /noshadow /framework:"net-4.0" /xml:"$OutDir\Tests.nunit.xml" $tests
Written by Abdrashitov Vadim
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Powershell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#