I have an AbstractTestBase
and many junit Test classes extending it, and new Test classes are extending it over the time
I have this test suite now
@RunWith(Suite.class)
@SuiteClasses({ATest.class, BTest.class, CTest.class})
public class AllTests {}
ATest, BTest, CTest, ..., ZTest extend AbstractTestBase
How to create a junit test suite that dynamically runs all subclasses of AbstractTestBase
without having to list them manually in @SuiteClasses
using Junit, java-7 only, no 3rd parties.
I figured out the solution
https://gist.github.com/amgadhanafy/b172cf776bfe313762d38480e17f4517