Assume you have 2 classes, A and B, each with 10 methods of equal length. You write 2 test classes, TestA and TestB, each running all 10 methods and producing 100% coverage.
However, when run from TestB, class B calls 2 methods of class A.
So when you run TestA and then look at coverage, class A is covered at 100%. When you run TestB and then look at coverage, class B is covered at 100%, and class A is covered at 20%.
Is there any way to prevent recalculation of dependent class coverage when testing? Is there any way to sequence tests into a specific order? Is there any way to prevent Apex from mistakenly reducing the coverage on a class when it is used indirectly while testing another class? Is there any other workaround for this issue?