TeamCity and NUnit 3: on the Same Wavelength

For the last couple of months we, the TeamCity team, have been working really hard together with the NUnit team, and today we are happy to announce NUnit 3 has been released and is fully integrated with TeamCity out of the box.

Imagine any way to run NUnit tests, and all your wildest solutions will most likely work perfectly in TeamCity: you could run NUnit tests just from the command line, or using the MSBuild task, or via the NAnt project, or you may prefer to run tests using the NUnit step and would like to take advantage of the the full power of TeamCity – everything is possible now. TeamCity helps you to do it on all operating systems and at any time of day or night.

You will see real-time progress during the tests’ session. After completing the build, the Tests view allows you to analyse the build results via the user friendly UI, where you are able not only to see the test results, but also to manage them: mark an investigation as fixed, give up the investigation, re-assign it, or mute a test failure.

For a long time it was necessary to use different tricks to achieve a similar result and while most of the tricks worked fine for simple cases, it was difficult to understand how to make it work when something goes wrong. For example, you had to use the special NUnit JetBrains task, that is very similar to the NUnit task from MSBuild Community Tasks project, to run NUnit tests under the MSBuild project in TeamCity. Now you are free to use NUnit in TeamCity without any additional tweaks: just use the TeamCity command line runner to achieve your goals:

NUnit 3 in the TeamCity sample

Don’t hesitate to take advantage of this integration: download NUnit 3 and to run tests under TeamCity!

We are working on the the Getting Started guide to enable you to begin using NUnit 3 in TeamCity instantly: we hope it will  save your valuable time, because it is our mission to make your work fun and easy.

Happy building and testing!

This entry was posted in Case study, Features, FYI, Tips&Tricks, Uncategorized. Bookmark the permalink.

7 Responses to TeamCity and NUnit 3: on the Same Wavelength

  1. Am i doing something wrong?
    using NUnit 3 is painful with TeamCity.

    every time i update i have to redefine the path?

  2. Nikolay says:

    Yes, now it is so.
    Try using these samples (https://github.com/JetBrains/teamcity-nunit-samples)
    See https://github.com/JetBrains/teamcity-nunit-samples/blob/master/nunit-utils.targets the task “GetNUnitConsolePath” to find the nunit console

  3. Jos Krause says:

    I agree with Chris, this current method of using NUnit is horrible and painstakingly frustrating, should it not at least have built-in package support or simply setup a feed for Nuget to retrieve it like it does for xUnit?

    Using 2.6.4 requires almost zero effort, why is NUnit 3 so different?

    • Pavel Sher says:

      On the other hand previous approach with NUnit 2.x was a big pain for us. Whenever new feature was added to new NUnit version we instantly got a feature request to bundle this new version. As a result TeamCity bundles dozens of NUnit 2.x versions, because we can’t remove them anyhow without breaking existing builds. Basically previous approach did not scale at all.

      You’re saying that we need to setup a feed to retrieve NUnit. But there is an official feed for NUnit 3.x packages. Seems you can just use it.

  4. Nikolay says:

    Yes, we should make easier the usage of nunit. I’ve created the issue https://youtrack.jetbrains.com/issue/TW-48468
    Feel free to vote and to add your comments

  5. Anthony says:

    To use NUnit 3.6+ do we require a specific version of TeamCity ?

Comments are closed.