junit5使用suite功能-爱代码爱编程
1.需要的suite引入的maven依赖
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-suite-api</artifactId>
<version>1.11.2</version>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-suite-engine</artifactId>
<version>1.11.2</version>
</dependency>
2.调用类需要的代码
@Suite
@SelectClasses(value = {
regress.taskassign.v1201.TestTaskAssign1201.class,
regress.taskassign.v1202.TestTaskAssign1202.class,
regress.taskassign.v1204.TestClass1204.class,
regress.taskassign.v1211.TaskAssign1211.class,
regress.taskassign.v1221.TaskAssign1221.class,
})
//@SelectPackages(value ={
// "regress.taskassign"
//})
public class AllTests {
}