Getting nunit test name with teamcity nunit runner

Hi all,

I try to get nunit test name using TestContext.CurrentContext.Test.Name, but always obtain NullReferenceException. I made an investigation and figured out the problem is in team city unit runner that does not initialize TestContext. By the way, if I run test using R# than everything works fine. Can I use another ways to get nunit test name with teamcity nunit runner?

Environment: NUnit 2.6.0, JetBrains.BuildServer.NUnitLauncher2.0.exe, JetBrains.BuildServer.NUnitLauncher2.0.VSTS.exe

Please sign in to leave a comment.