intellij-idea - Easy way to run JUnit testcase over and over with @Before and @After method for every run
问题描述
The question here is a variant of Easy way of running the same junit test over and over?
The above mentioned link nicely answered how to run a test repetitively through IntelliJ.
However, I need a way to run the entire test suite multiple times, with @Before and @After for every run.
Any help is appreciated.
解决方案
您好,您可以为此目的使用junit Rule
以下是示例链接:
https://www.testwithspring.com/lesson/introduction-to-junit-4-rules/
这是文档链接:
推荐阅读
- php - 尝试使用 Worpdress 和 WPML 根据语言在主页上发布不同的帖子
- javascript - Discord.js:如何在新的 12.0.0 更新中为机器人添加角色?
- java - 在 Spring Webflux 中组合多个单声道
- json - 如何将 JSON 文件导入 Cloud Firestore
- powershell - Powershell 脚本正在运行,但未采取任何措施
- html - 如何声明一个对象并在 pug js 中对其进行迭代?
- python - 有没有更好/更快的方法来计算数组中每个元素的相对排名?
- swift - 如何在 SwiftUI 中禁用列表中的某些单元格
- cocos2d-x - 在 cocos2d 中使用哪个 EventDispatcher ?Node::EventDispatcher 还是 Director::EventDispatcher?
- search - 数据库中的 Tkinter 搜索查询:TypeError:'NoneType' 对象不可迭代