Purposeful coverage
Purposeful coverage
Hello,
I think it would be great to have a special attribute telling NCover which method(s) are aimed to be tested.
Consider the following code:
[Test]
public void test1()
{
double d1 = F();
[TestedMethod]
double d2 = G(d1);
Assert.AreEqual(3.1415, d2);
}
Although F() participates to the test (and thus to the coverage), the test is not aimed at testing F().
The result is that the global coverage can be good even if the "aimed" coverage is not.
With this attribute, you would be able to produce a coverage report of the functions that were effectively designed to be tested and we would not confuse the "side-effect" coverage of F() for the purpose-built coverage of G().
Thanks in advance
RE: Purposeful coverage
Thank you for the feedback.
Joe