5
votes

I have a CakeBuild build script which compiles a Visual Studio 2015 solution then uses the Cake add in for NUnit 3 to run the unit tests and generate the TestResult.xml file. The tests pass successfully when run locally and the report is generated.

This same build script is being run by TeamCity (version 10.0.2), with the build agent also successfully running the tests (all passing) and the TestReport.xml file being generated.

The TeamCity build configuration has been configured via the XML Report Processing Build Feature to import the NUnit report. The build log suggests this has also occurred successfully. Example of the log:

[10:06:41]NUnit report watcher
[10:06:41][NUnit report watcher] 1 report found for paths:
[10:06:41][NUnit report watcher] **/TestResult.xml
[10:06:41][NUnit report watcher] Successfully parsed
[10:06:41][Successfully parsed] 1 report
[10:06:41][Successfully parsed] build\TestResult.xml

However, there is no reference to any of the tests in the build run - the Test tab is missing completely and no other references to the tests at all.

Is there anything else that needs to be configured to get the test results to show up?

1
Hi - did you find a resolution for this? I'm having the same challengeNagoh

1 Answers

-1
votes

We've had the same issue and found the solution in https://github.com/nunit/teamcity-event-listener/issues/39

Main point is to make sure to include the package NUnit.Extension.TeamCityEventListener which reports the results to TeamCity.

In addition the Nunit Runner Settings should include

NUnit3(path, new NUnit3Settings {
 TeamCity = true
});