java - 如何根据 JUnit 中的测试大小对测试进行分类
问题描述
鉴于我有测试尺寸:如https://testing.googleblog.com/2010/12/test-sizes.html中所述的small、medium和large。
如何根据测试大小对所有测试进行分类?
解决方案
您可以使用@org.junit.experimental.categories.Category
JUnit 4 或@org.junit.jupiter.api.Tag
JUnit Jupiter(又名 JUnit 5 的编程模型)。
推荐阅读
- javascript - Javascript / Angular httpClient 从 url 获取数据并传递外部方法
- apache-nifi - NiFi 1.5.0 : GenerateTableFetch 订单结果
- c# - .NET Core 项目中的 System.Automation.Runspaces 错误
- mysql - 在 Django 中使用 GROUP_CONCAT 和其他注释
- javascript - 计算数组中的组合产品
- python - 从python中的dicom文件获取z-buffer(深度)信息
- c++ - 如何在对象数组中打印对象的变量
- ruby-on-rails - ActiveRecord::Base.connected?即使 DB 关闭也返回 true
- php - 将实体传递给 Form 时的 TransformationFailedException
- windows-installer - MSP 安装期间出现错误 1603