+ Start a Discussion
BrianWKBrianWK 

Test Objects for Test Classes with multiple test methods

I have a fairly big class that I'm testing that requires a lot of data to be created and tested on.

 

Right now I have multiple methods in my test class, that tests separate portions of the class.

 

Do I need to create test objects within each method? Or can I have all my test objects created in my first test method and have them exist throughout the test class?

 

What are best practices for handling test object creation?