Skip to content

Instantly share code, notes, and snippets.

@adoprog
Created April 29, 2013 07:00
Show Gist options
  • Save adoprog/5480127 to your computer and use it in GitHub Desktop.
Save adoprog/5480127 to your computer and use it in GitHub Desktop.
Run nUnit tests from PowerShell
$checkoutFolder = "%teamcity.build.workingDir%"
$targetDll = "$checkoutFolder\Website\TestProject\bin\Release\TestProject.dll"
$fixture = "TestProject.MediaPlayerEditorTest"
$resultXml = "$checkoutFolder\TestResult.xml"
rm $resultXml -Force -Verbose -ErrorAction SilentlyContinue
$buildOptions = "/xml:$resultXml /fixture:$fixture"
$command = 'C:\Chocolatey\bin\nunit-console.bat "$targetDll" ' + $buildOptions
Invoke-Expression $command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment