Running NUnit Tests from Team city

10,229

Solution 1

NUnit test assemblies path is resolved relative to solution file folder. Try adding %teamcity.build.checkoutDir% at the beginning.

Solution 2

Have you checked out the TeamCity Addin for NUnit?

http://confluence.jetbrains.net/display/TCD4/TeamCity+Addin+for+NUnit

Share:
10,229
CraftyFella
Author by

CraftyFella

c# Programmer who dreams of being a professional snowboarder.

Updated on June 17, 2022

Comments

  • CraftyFella
    CraftyFella almost 2 years

    I've successfully managed to get MSTests running for each of the builds on our TeamCity Server.

    I've got a couple of projects that use NUnit, so was hoping that getting TeamCity to run NUnit tests would be as simple as running MSTests:

    MS Test Settings in Team City

    So when I try to do the same for my NUnit Tests the Testing Tab doesn't show up when the Build finishes, so I'm guessing it hasn't run my tests.

    Nunit Test Settings in Team City

    Does anyone know what I'm doing wrong?

    Not sure if this will help, but this is from the build log:

    [Project "AssemblyName.proj.teamcity.patch.tcprojx" (Build;TeamCity_Generated_NUnitTests target(s)):] C:\Program Files\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe "@@" "C:\Program Files\TeamCity\buildAgent\temp\buildTmp\tmp2867.tmp"
    [13:22:57]: Start TeamCity NUnit Test Runner
    [13:22:59]: Build finished
    

    It's like it starts the nunit build runner, then just stops?

    Thanks

    Dave

  • CraftyFella
    CraftyFella over 13 years
    Hi, thanks for your reply. However I've checked all the documentation and I'm still stuck. I'm actually using team city 5.1 which has this addin built in. Thanks anyway. Dave
  • CraftyFella
    CraftyFella over 13 years
    Hi, Perfect.. thanks adding that gave me a much cleared error message and I was able to get the "Tests" tab back again.