When you are writing multiple testMethods that ultimately start with the same test data, what is the best design for those initilization methods? By best design, I mean what are the implications for code coverage.
I see two possible designs but I cannot locate any references in documentation that indicate whether one is better or not.
Design 1: In your test class, create a method that initializes all the necessary data and that each testMethod can call. This works fine, but my concern here is that the inclusion of a non-testMethod in the test class will interfere with Salesforce's Code Coverage calculations. And is this how test classes end up appearing in your listed of tested/covered Classes and Triggers in Dev Console?
Design 2: Create a separate non-test class with data initialization methods that are called by your test methods in the test classes. This also works but the addition of extra classes is not ideal for controlling proliferation of Apex classes. The class is considered tested and averaged into Code Coverage but that's not necessarily desirable because it's truly just part of your testing infrastructure.