JUnit 注解@SuiteClasses的工作原理
Suppose I have four test cases in my project, the total methods to be tested:
Based on the blog Run only given sets of your unit test via @Category, it is possible to organize test methods within THE SAME CLASS to different categories via @Category, that is, the granularity to control which test methods should be executed is method level.
There is another annotation @SuiteClasses which can allows us to categorize test classes into different test suites, and once we specify a given test suite to be executed, all test classes within that suite would be executed one by one.
For example, I create a suite TestSuite1and2 and only put first and second test case into it, so when this test suite is executed, only three test methods ( 1 from first test case and 2 from second test case ) are executed:
And the same logic for TestSuite2and3:
If you need to integrate test suite execution into Maven, add the following parts in pom.xml:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>${runSuite}</include>
</includes>
</configuration>
</plugin>
Then use the following command line:
You will get exactly the same result as in Eclipse:
- 18.12 keepalived + LVS
- 学会JS只是知道了“是什么”,并不意味着你会用JS做什么
- Linux基础(day68)
- 启动zabbix 报错
- 深入理解C# 3.x的新特性(2):Extension Method[上篇]
- 深入理解C# 3.x的新特性(2):Extension Method[下篇]
- 19.13/19.14 配置邮件告警
- 19.12 添加自定义监控项目
- [原创]深入理解C# 3.x的新特性(3):从Delegate、Anonymous Method到Lambda Expression
- a=b=c,但a不等于c?这是什么鬼
- 为什么不是0,1,2,3,4?setTimeout的奇怪问题
- Linux基础(day67)
- 深入理解C# 3.x的新特性(5):Object Initializer 和 Collection Initializer
- 19.10 处理图形中的乱码
- JavaScript 教程
- JavaScript 编辑工具
- JavaScript 与HTML
- JavaScript 与Java
- JavaScript 数据结构
- JavaScript 基本数据类型
- JavaScript 特殊数据类型
- JavaScript 运算符
- JavaScript typeof 运算符
- JavaScript 表达式
- JavaScript 类型转换
- JavaScript 基本语法
- JavaScript 注释
- Javascript 基本处理流程
- Javascript 选择结构
- Javascript if 语句
- Javascript if 语句的嵌套
- Javascript switch 语句
- Javascript 循环结构
- Javascript 循环结构实例
- Javascript 跳转语句
- Javascript 控制语句总结
- Javascript 函数介绍
- Javascript 函数的定义
- Javascript 函数调用
- Javascript 几种特殊的函数
- JavaScript 内置函数简介
- Javascript eval() 函数
- Javascript isFinite() 函数
- Javascript isNaN() 函数
- parseInt() 与 parseFloat()
- escape() 与 unescape()
- Javascript 字符串介绍
- Javascript length属性
- javascript 字符串函数
- Javascript 日期对象简介
- Javascript 日期对象用途
- Date 对象属性和方法
- Javascript 数组是什么
- Javascript 创建数组
- Javascript 数组赋值与取值
- Javascript 数组属性和方法
- 娱乐圈排行榜动态条形图绘制
- vue3.0的 v-model 为啥不好用了?
- SHELL命令分组统计
- 一行代码实现display"过渡动画"原理
- 3D星空图
- shading-jdbc 4.1.1 + tk.mybatis + pagehelper 1.3.x +spring boot 2.x 使用注意事项
- 用辗转相除法求两个正整数的最大公约数
- Js根据数组相同的值生成二维数组
- 顺序消息管道《Message Pipe》v1.0.2版本发布
- Ts安装及自动编译ts文件
- python 自动化测试(1):获取验证码图片,实现自动登录
- RocketMQ学习第一步之源码构建
- python 库学习之:openpyxl
- python 学习之:读取xml配置文件
- 我的C语言入门笔记~!