Different Number of Tests Run Reported (ReSharper vs TeamCity)

When I, Run All Tests from Solution using the test runner in Visual Studio, I get 231 Tests passed.

When the same set of tests are run in TeamCity, it reports only 127 tests passed.

I have confirmed that the tests are running (and passing) in the TeamCity environment from the individual logs produced.

What is required for TeamCity to see the tests?

Thanks - Jon

4 comments
Comment actions Permalink

What tests do you use? NUnit or something else?
Frankly speaking, ReSharper uses it's own runner.
Could you please try running running you tests from console test runner to compare the number of tests.

Thanks!

0
Comment actions Permalink

I use xUnit.NET, the xUnit.NET runner in VS 2008 and the xUnit.NET console runner via NAnt in TeamCity.

The problem isn't that there is a difference in the detail, the problem is that whatever TeamCity is picking up is only a subset of those tests.

What is TeamCity using to report the number of tests run on the summary screen?

Thanks - Jon

0
Comment actions Permalink

There is no code in TeamCity to support xUnit.NET. Actually, xUnit.NET provides support for TeamCity. Could you please contact xUnit team to report the issue.

xUnit support for TeamCity is based on TeamCity service messages.
http://www.jetbrains.net/confluence/display/TCD4/Build+Script+Interaction+with+TeamCity

Could you please attach console output of xUnit that is running under TeamCity.

Thanks!

0
Comment actions Permalink

Hi Jon, did you ever get to the bottom of this?

I seem to have the same issue. Resharper finds and runs 877 tests whereas Teamcity only finds 676 tests in the same assembly.  Looking at my logs, it seems the only tests being run are the original tests that were in the solution when the TC project was first set up less a couple of text classes. None of the tests that have subsequently been added to the VS project have been picked up by TC. I’m not sure why two of the original test classes are omitted, but coincidently they are the only two classes have categorised tests that should be run. I do use category filtering, but these tests are not in the category being filtered out.

I’m using teamcity 8, nUnit, and vs2012.

0

Please sign in to leave a comment.