@RunWith(Suite.class)
@Suite.SuiteClasses({ TestClass1.class, TestClass2.class })
public class SuiteTest {
}
@Suite.SuiteClasses({ TestClass1.class, TestClass2.class })
public class SuiteTest {
}
@RunWith(Suite.class)
@Suite.SuiteClasses({ TestClass3.class, TestClass5.class })
public class TestClass1 {
}
@Suite.SuiteClasses({ TestClass3.class, TestClass5.class })
public class TestClass1 {
}
@RunWith(Suite.class)
@Suite.SuiteClasses({ TestClass4.class, TestClass5.class })
public class TestClass2 {
}
@Suite.SuiteClasses({ TestClass4.class, TestClass5.class })
public class TestClass2 {
}
public class TestClass3 {
@Test
public void test3() {
System.out.println("3");
}
}
@Test
public void test3() {
System.out.println("3");
}
}
public class TestClass4 {
@Test
public void test4() {
System.out.println("4");
}
}
@Test
public void test4() {
System.out.println("4");
}
}
public class TestClass5 {
@Test
public void test5() {
System.out.println("5");
}
}
@Test
public void test5() {
System.out.println("5");
}
}
实行结果:
3
5
4
5
5
4
5