2

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?

Syed Waqas
  • 2,576
  • 4
  • 29
  • 36

3 Answers3

3

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.

Wilmer SH
  • 1,417
  • 12
  • 20
  • Wilmer, the test tab is not getting created. I am running the tests as a command line runner build step, which runs a .cmd file that uses NUnit 3 console runner to run the tests. I have updated my question with the log messages related to tests that I can see. – Syed Waqas Apr 03 '16 at 16:16
  • 1
    Everything looks good. TC recognized 3 tests, and all three fail. Now you need to enable the build feature [XML Report Processing](https://confluence.jetbrains.com/display/TCD9/XML+Report+Processing) – Wilmer SH Apr 04 '16 at 12:12
  • Wilmer, the problem was that the tests were failing during the NUnit Setup, and surprisingly because of that the Tests tab wasn't shown. You can see the screenshot of the Tests tab in the Edit # 2 of my question, is it what it's supposed to look like? Because it looks same even with or without the XML Build Feature. – Syed Waqas Apr 04 '16 at 12:48
  • Thanks a lot for your help Wilmer! – Syed Waqas Apr 04 '16 at 13:36
1

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

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.

Syed Waqas
  • 2,576
  • 4
  • 29
  • 36
  • 2
    Hey Waqas, what do you mean by "NUnit setup"? I am experiencing the same problem. My NUnit tests are running, are not failing, are writing results to specified file, and of course the build feature parses the file as expected. However, I don't see the Tests tab. – skorzinetzki Jul 15 '16 at 07:05