@RunWith(Suite.class)
@Suite.SuiteClasses({ TestClass1.class, TestClass2.class })
public class SuiteTest {
}
@RunWith(Suite.class)
@Suite.SuiteClasses({ TestClass3.class, TestClass5.class })
public class TestClass1 {
}
@RunWith(Suite.class)
@Suite.SuiteClasses({ TestClass4.class, TestClass5.class })
public class TestClass2 {
}
public class TestClass3 {
@Test
public void test3() {
System.out.println("3");
}
}
public class TestClass4 {
@Test
public void test4() {
System.out.println("4");
}
}
public class TestClass5 {
@Test
public void test5() {
System.out.println("5");
}
}
实行结果:
3
5
4
5
原文地址:https://www.cnblogs.com/wzhw2015/p/12355079.html
时间: 2024-10-10 18:04:29