I am just starting with code coverage tools (primarily in C#). So far I have tested out NCrunch and DotCover.
They both seem to do a good job with branch and function coverage, but I can't tell for sure if they're doing conditional coverage. For example, in some code I'm testing, the following shows as covered so long as there is at least one path through (or am I wrong about that?). However, it seems to me that it should only be covered if both logical paths through the code are covered.
if (item != "")
{
glc.AddGrayListItem(GrayListTypeEnum.BlackList, item);
}
What I'd like to know is if DotCover or NCrunch (or any other tool for C#) will tell me that this isn't covered unless both cases (item != null) and (item == null) are tested.
I've looked on various sites and can't seem to find a definitive answer about whether either of these tools works this way, or if there's another tool that does work this way. Do any of you have definitive information about what types of coverage various code-coverage tools do or do not supply?