TeamCity
Powerful CI/CD for DevOps-centric teams
NUnit Tests Runner in TeamCity: Immediate Tests Results, NUnit Addins Support, and More
With this overview post we start a blogging mini-series about .NET and NUnit support in TeamCity.
For .NET platform builds TeamCity supports several build runners, in particular:
- NAnt
- MSBuild
- sln2003, sln2005, and sln2008
bundles NUnit testing framework (versions 2.2.10, 2.4.1, 2.4.6, 2.4.7, 2.4.8, 2.5.0 and later), and provides NUnit runner for your tests.
No matter which NUnit version you choose, TeamCity can track the tests and report all the information on-the-fly (both in the web UI and your IDE). You do not have to wait for your build to finish to discover that something went wrong. TeamCity informs you about tests failure immediately and provides details on occurred errors, so you save your time. By the way, in TeamCity web UI for each failed or ignored test you’ll find a direct link to open it in your IDE. With tests tracking feature you get on-the-fly all important information about every test you’ve run within a build: its status, name, package, duration, and statistics.
Besides, we eased a headache with running your tests under x86 process on the x64 machine by introducing an explicit specification of the platform and runtime environment versions. You can define whether you use .NET 1.1 and MSIL, x64 or x86 platform to use for .NET 2.0 version.
We also have good news for those who use NUnit addins. In TeamCity 4.0 EAP we have implemented support of NUnit addins for TeamCity NUnit Runner. Please note that this feature is supported for NUnit 2.4.6 and 2.4.7.
To run tests with NUnit, TeamCity:
- uses its own NUnit launcher
- automatically replaces NUnit calls from NAnt with
<nunit2>
task - automatically replaces NUnit calls from MSBuild with
<NUnit>
task from the MSBuild Community tasks - provides TeamCity addin for NUnit to enable on-the-fly tests reporting from the existing NUnit (2.4.6 or 2.4.7 versions) instead of using bundled TeamCity NUnit runner.
And last but not least feature we’d like to mention here is the Risk group tests reordering. Recently we’ve published a tip on this feature for the Ant and Ipr build runners, and voila! — since the latest EAP you can instruct TeamCity to run recently failed tests before any others. Using this feature, please remember that tests are reordered within every NUnit tests run instance in your build.
Well, lets have a break for now and dive into details in our future posts.
Technorati tags: TeamCity, JetBrains, IntelliJ IDEA, Eclipse, EAP, continuous integration, build management, NUnit, NAnt, Testing framework, MSBuild, agile development, MS Visual Studio 2005, MS Visual Studio 2008