Build/Test Issues

No code coverage for references assembly.

Started by ivoloshin on 6,291 views

Could someone please point out steps for me to troubleshoot this? I have a MSUnit test project referencing another test project. Code in the unit test project appears to mark code coverage correctly. Code in the referenced assembly does not. I realize that this may be a missing library compilation somewhere, but I'm not sure where to start looking.

VS 2010
MSUnit
NCrunch 1.39.0.15b

Thanks,
Ilya
Hi Ilya -

Check that the reference from your test project is actually a ProjectReference and not just an assembly Reference. NCrunch relies on project references to identify the dependencies between projects. If the reference is pointing at the assembly in the built output path, NCrunch won't identify the dependency and you won't see code coverage outside your test project.

I hope this does the trick!


Cheers,

Remco
Thank you for your reply, Remco.

I verified that all references are project references. In the Metrics window it appears that some of the projects are showing code coverage, while others do not. I checked all the settings I could think of to see any differences between those that work and those that do not with out any luck. I also tried using Dynamic Analysis to see if that helps and it did not.

One thing that I am doing is running only selected tests. I never ran all tests. It'll take hours to do so, but you think that may help, I'll go ahead and do it.

Are there any other things I could check to help get this going?

Thanks,
Ilya
Would you be able to help by answering some of the questions below? This will help me to narrow down where the issue is:

- Do you see any code coverage markers at all in the problematic project? (i.e. do you see any black markers?)
- Are there errors of any kind showing in the Tests Window?
- Are there errors of any kind showing in the Processing Queue?
- Have you tried your solution with the newest version of NCrunch? (1.40b was released less than 24 hours ago, and it contains many fixes)
- Can you submit a bug report after you've run a few of the tests that have problems? I'll then check the log file for any mapping issues


Thanks!

Remco
Remco,

I have installed the latest version of NCrunch and the problem seems to be fixed! Thank you for your help!

Ilya

Post a reply

Log in to reply.