摘要: 1.导入 import static org.junit.jupiter.api.Assertions.assertAll;import static org.junit.jupiter.api.Assertions.assertEquals; 2.代码示例 assertAll("返回值校验:", 阅读全文
posted @ 2020-07-20 21:25 bky2020bky 阅读(2138) 评论(0) 推荐(0) 编辑
摘要: 1.添加或修改配置文件junit-platform.properties,该文件在resources目录下,并将resource标记为Test Resources Root 以下需添加进文件中的内容,值根据自身情况修改 #是否允许并行执行true/falsejunit.jupiter.executi 阅读全文
posted @ 2020-07-20 21:20 bky2020bky 阅读(1686) 评论(0) 推荐(0) 编辑
摘要: 1.默认按测试用例首字母排序执行 执行结果: 2.按@Order指定顺序执行 a.在calss前加 @TestMethodOrder(MethodOrderer.OrderAnnotation.class) b.在用例前添加@Order(n) //n为数字,按小到大的顺序执行 示例: 执行结果: 3 阅读全文
posted @ 2020-07-20 07:11 bky2020bky 阅读(2533) 评论(1) 推荐(0) 编辑