2
votes

I created a build feature using XML Report Processing, NUnit is specified as the Report Type. My tests are running(although they fail) using NUnit Console Runner, The xml file is generated on the build agent, is found by TC and I can see in the following log messages that it is successfully parsed:

[11:01:04][NUnit report watcher] 1 report found for paths:
[11:01:04][NUnit report watcher] D:\TCRepos\a8efeea5358cd7e0\Quality\Specflow.TestingSuite\TestResult.xml

[11:01:04][NUnit report watcher] Successfully parsed

[11:01:04][Successfully parsed] 1 report

[11:01:04][Successfully parsed] Quality\Specflow.TestingSuite\TestResult.xml

But, I cannot see the results. Where are the results generated? I don't see a separate tab created for the test results in the build detail, it is not in the dynamic drop downs from where we can see build logs and parameters and artifacts. Where can I find it?

EDIT

I am running the tests as a command line runner build step that runs a .cmd file, which in turn uses the NUnit 3 console runner to run tests. The log messages for this build step are as follows:

NUnit Console Runner 3.2.0

[15:24:40][Step 7/7] Copyright (C) 2016 Charlie Poole

[15:24:40][Step 7/7]

[15:24:40][Step 7/7] Runtime Environment

[15:24:40][Step 7/7] OS Version: Microsoft Windows NT 6.2.9200.0

[15:24:40][Step 7/7] CLR Version: 4.0.30319.42000

[15:24:40][Step 7/7] Test Files

[15:24:40][Step 7/7] AureaAes.TestingSuite.Test\bin\Debug\AureaAes.TestingSuite.Test.dll

Then there are a bunch of errors related to these tests. And then:

Test Run Summary

[15:25:00][Step 7/7] Overall result: Failed

[15:25:00][Step 7/7] Test Count: 3, Passed: 0, Failed: 3, Inconclusive: 0, Skipped: 0

[15:25:00][Step 7/7] Failed Tests - Failures: 0, Errors: 3, Invalid: 0

[15:25:00][Step 7/7] Start time: 2016-04-03 15:24:41Z

[15:25:00][Step 7/7] End time: 2016-04-03 15:24:59Z

[15:25:00][Step 7/7] Duration: 18.367 seconds

[15:25:00][Step 7/7] Results (nunit3) saved as TestResult.xml

EDIT # 2 The reason why the Tests tab wasn't showing up was because the tests were failing during NUnit setup. I was assuming it shouldn't make a difference but it does. I have added the build feature for XML processing already. Now my Tests tab looks like this:

enter image description here Is this how it should appear? Or are there some fireworks that seem missing from here?

3
That looks legit. CheersWilmer SH

3 Answers

3
votes

Wagas, check your build log for messages along the lines of [Testing yourtests.dll] Discovering: your unit tests ...

The test should be displayed on a test tab. There is the Overview tab, the Changes tab, and then the Tests tab. Make sure that TestResult.xml actually has something in it.

1
votes

I have had the same problem after upgrading to NUnit 3.

My problem was that I did not have the TeamCityEventListener extension available when running the test runner. After fixing that I got the Test tab back.

0
votes

The reason why the Tests tab was not being shown was because the NUnit tests were failing during the NUnit setup, and surprisingly, the Tests tab was not being shown.

Having the setup run successfully and then running the tests showed the Tests tab.