Be able to specify which class(es) a test is covering
I've noticed that in our test suite, various classes are showing as having code coverage through implict usage i.e. I'm testing class A, which is using class B within a tested method, and so lines of class B show as covered, when there's no dedicated tests for class B.
Technically class B is getting tested there, but it would be nice if we had an attribute we could optionally use (multiple times per class/method), which specifies which class(es) the class/method is testing.
[Tests<A>]
Then the code analysis will only calculate the LoC coverage for classes specified by the attribute(s) on that test or class.
2
votes
Trev
shared this idea