How to test multiple classes
To test multiple classes, you need to use the class junit.framework.TestSuite. Create a TestSuite object using its default constructor, then add all test classes(check the previous page to know how to create a junit 3 test class) to it using its method addTest. Finally, pass this suite object to the run method of class junit.textui.TestRunner.
package com.techfundaes.junit3_8_1; import junit.framework.Test; import junit.framework.TestSuite; import junit.textui.TestRunner; public class TestMultipleClasses { public static Test suite() { TestSuite suite= new TestSuite(); suite.addTest(TestBasic.class); suite.addTest(TestException.class); return suite; } public static void main(String[] args) { TestRunner.run(suite()); } }