I have a small powershell task that runs all my unittests using Gallio and teamcity imports the report, but does not fail the build step and does not show the number of tests that failed or passed.
So how do I get teamcity to fail the build based on the tests in the report and how do I get it to show the number of tests passed, ignored and failed in the status.
Add-PSSnapIn Gallio
$fileList = Get-ChildItem ./source/ -filter *.Unittests.dll -Recurse | where { $_.FullName -like "*\bin\*" } | %{$_.FullName}
Run-Gallio -Files $fileList -ReportTypes XML -ReportNameFormat unittests
Write-Output "##teamcity[importData type='nunit' path='./Reports/unittests.xml']"
The log shows that the file is passed
[Step 2/2] NUnit report watcher
[12:39:11][NUnit report watcher] 1 report found for paths:
[12:39:11][NUnit report watcher] C:\TeamCity\buildAgent\work\416967dfd65045\Reports\unittests.xml
[12:39:11][NUnit report watcher] Successfully parsed
Im using teamcity 7.1.1