Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Not showing all the tests covering a function/method
rlejeune
#1 Posted : Tuesday, April 10, 2012 1:35:44 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/10/2012(UTC)
Posts: 8
Location: Quebec

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
Remco
#2 Posted : Tuesday, April 10, 2012 9:09:44 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,143

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
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).
rlejeune
#3 Posted : Wednesday, April 11, 2012 9:52:12 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/10/2012(UTC)
Posts: 8
Location: Quebec

Remco;1658 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.
rlejeune
#4 Posted : Wednesday, April 11, 2012 11:42:32 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/10/2012(UTC)
Posts: 8
Location: Quebec

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.
rlejeune
#5 Posted : Wednesday, April 11, 2012 7:35:07 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/10/2012(UTC)
Posts: 8
Location: Quebec

Ok forget all my post, I just realized that there is a scroll bar on the right side of the popup :p
Remco
#6 Posted : Thursday, April 12, 2012 2:19:29 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,143

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
LOL. No problem :)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.056 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download