I have an abstract class that extends the JUnit TestCase with related data
public abstract class AbstractTestClass extends TestCase
{
public ArrayList<TestDetails> testList;
}
I then have a test class that extends the abstract classes
public class TestClass extends AbstractTestClass
This is included in a test suite
@RunWith(Suite.class)
@Suite.SuiteClasses({
TestClass.class
})
public class TestSuite {
}
I then run the test suite from a runner class with a main function
public class TestRunner {
public static void main(String[] args) {
JUnitCore.runClasses(TestSuite.class);
}
}
My question is how do I access the testList data from within the runner class, i.e. if I wanted to print out the details of each element in the list from the main. The data is created dynamically (during the tests are being run)