Skip to content

Instantly share code, notes, and snippets.

@adoprog
Created April 11, 2013 08:26
Show Gist options
  • Save adoprog/5361702 to your computer and use it in GitHub Desktop.
Save adoprog/5361702 to your computer and use it in GitHub Desktop.
Run Watin tests from PowerShell
$checkoutFolder = "%teamcity.build.workingDir%"
$targetDll = "$checkoutFolder\bin\Debug\%DLL containing tests here%"
$fixture = "%your namespace here%"
$resultXml = "$checkoutFolder\TestResult.xml"
$resultHtml = "$checkoutFolder\TestResults"
rm $resultXml -Force -Verbose
rm $resultHtml -Force -Verbose -Recurse
$buildOptions = "/xml:$resultXml /fixture:$fixture"
$command = 'nunit-console "$targetDll" ' + $buildOptions
Invoke-Expression $command
& nunit-results $resultXml $resultHtml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment