Why are the tests that run longer in TeamCity more than when running directly in NUnit?

I have performance tests in C # that mostly use two different methods and verify that they work much faster than others.

When I run them locally in NUnit, one of the tests runs ten times faster than the other, so I have a NUnit test that uses Stopwatch to check that it is at least twice as fast (in case of regression). But when I run tests in TeamCity, is the fast method about 1.5 times faster than the slow? I would expect the hardware differences to have some effect, but not so much. What could be the reason for this?

+7
source share
1 answer

To answer my own question, the problem was that code coverage was enabled for building tests in TeamCity, so the overhead led to a convergence of the two methods. Hope this answer helps someone in the future.

+11
source

All Articles