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

Notification

Icon
Error

No Code Coverage Data
CoolBreeze
#1 Posted : Tuesday, June 2, 2015 5:17:35 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 7/11/2014(UTC)
Posts: 79
Location: United States of America

Was thanked: 9 time(s) in 9 post(s)
Metrics window shows 0% and 0 covered lines for all my library classes.

I've restarted Visual Studio.
I've closed and reopened Tests window and Metrics window.
I've run individual tests.
When I look at the tested code I see black markers.


Environment:

Visual Studio 2010
NCrunch 2.15.09

The solution is a VB class project with a 2nd Tests project.

I've looked at every possible NCrunch setting and feature but can't seem to figure out how to get NCrunch to show the code coverage data.

NCrunch does displays code coverage information in a separate large solution containing over a dozen projects and hundreds of modules.

I must have overlooked some simple setting.

Thanks, Ed
Remco
#2 Posted : Tuesday, June 2, 2015 10:17:07 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,997

Thanks: 932 times
Was thanked: 1258 time(s) in 1171 post(s)
Hi Ed,

Sorry, I'll need to bombard you with some questions to figure out what is happening here :)

- Does NCrunch detect the tests themselves and run them with the correct results showing in the Tests Window?
- Are you doing any cross-process testing? (i.e. test deliberately launches a new process that runs the test code)
- Does NCrunch give you any warnings in the Tests Window?
- Are you using distributed processing?
- Which test framework are you using? Does switching to a different test framework for any of the tests make any difference?
- Has NCrunch ever worked correctly at any time on this solution?


Thanks!

Remco
CoolBreeze
#3 Posted : Wednesday, June 3, 2015 6:45:39 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 7/11/2014(UTC)
Posts: 79
Location: United States of America

Was thanked: 9 time(s) in 9 post(s)
Hi Remco,

I very much appreciate your support!


This was the key question which lead me to solve my problem:

- Does NCrunch give you any warnings in the Tests Window?

NCrunch did report a warning about project references. I overlooked this because NCrunch displayed in the Tests windows the top half
of the list of class library and test project modules. NCrunch displayed the warning at the end of the list of the modules. The window was only
tall enough for me to see the top most modules and not the warning.

I removed the reference to the class library in project properties References page.

I then added a project dependency using Project Dependencies...

I then saw lots of "not defined" and "not declared" errors.

I added back the reference to the class library under the project property References.

The projects successfully rebuilt and now I see the code coverage stats for the class library modules.

Two ideas:


1) I did look at just about every NCrunch item to find the problem. Perhaps NCrunch could display a warning indicator\icon
in a different spot so it's visible to the user with out the need to have to scroll down the Tests list. Maybe displaying the
warning\error icon in the menu bar would be a good spot.

2) When I finally found the warning I wasn't exactly sure what to do to solve the problem based on reading the warning. So maybe a clearer description
of the steps would be helpful. Maybe:

a) Right-click on your test project.
b) Select Project Dependencies...
c) Check the projects the Test project depends on.
d) Click OK.


Thanks!

Ed
1 user thanked CoolBreeze for this useful post.
Remco on 6/3/2015(UTC)
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.034 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download