Build/Test Issues

Not showing all the tests covering a function/method

Started by rlejeune on 9,260 views

I was wondering, is it a bug or is it a feature where there is a maximum of 6 covering tests showing?

Also, if it is a feature, anyway I can change that to be able to see all the covering tests? I would also like to understand how you choose which one to show.

I am using the latest build with VS2010

Thank you
There isn't any limit to the number of tests that NCrunch will show covering are particular line/method.

However, sometimes the behaviour of the coverage is misunderstood. NCrunch will only show physical code coverage (not conceptual code coverage), so if you have a static constructor that you are inspecting, NCrunch will only show you the tests that caused the constructor to be invoked (i.e. usually the first one that ran inside the testing process).
Remco wrote:There isn't any limit to the number of tests that NCrunch will show covering are particular line/method.

However, sometimes the behaviour of the coverage is misunderstood. NCrunch will only show physical code coverage (not conceptual code coverage), so if you have a static constructor that you are inspecting, NCrunch will only show you the tests that caused the constructor to be invoked (i.e. usually the first one that ran inside the testing process).


Thanks for your answer. From the testing that I did it seems like NCrunch doesn't behave that way, at least for me. Not that I want to argue with you about how NCrunch works ;)

I have 16 unit test which all call a certain function, when I check the covering test NCrunch gives me 6 of them. According to the usage I can see that 12 tests are in one class, 2 in a second class and 2 in a third one.

If I delete the class that contains the 12 tests, then NCrunch shows me the other 4 tests covering my code.

I will try to create a test project to reproduce that behavior.

Edited

Ok I did some more testing, here is what I found.

If I create a new class with one function, add a test class that I name TestClass1 to test it and write more than 6 tests covering that exact function. NCrunch shows me only the first 6 tests in the test class.

If I add a second class with 4 unit tests and that I name the class TestClass2. NCrunch doesn't show me those tests either, is still only show me the first 6 tests.

If I rename my first test class TestClass3. NCrunch shows me the four tests in TestClass2 first and then the first two in TestClass3.

Really easy to reproduce, it took me about 3 min with some cut and paste. Please let me know if there is a way that I can have NCrunch show me more than 6 tests, I would really appreciate.
Ok forget all my post, I just realized that there is a scroll bar on the right side of the popup :p
LOL. No problem :)

Post a reply

Log in to reply.