JUnit TestCase object instantiation
Is a new (or different) instance of TestCase object is used to run each test method in a JUnit test case? Or one instance is reused for all the tests? public class MyTest extends TestCase { public void testSomething() { ... } public void testSomethingElse() { ... } } While running this test, how many instances of MyTest class is created? If possible, provide a link to a document or source code where I can verify the behaviour. I couldn't find a clear answer in the JUnit docs about your question, but the intent, as anjanb wrote, is that each test is independent of the others, so a new TestCase