Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为了在整个套件执行后仅重新执行失败的测试,我创建了一个 JUnit 规则。如果我单独使用 TestWatcher.failed() ,则成功调用该方法,但如果我定义了 apply() ,则不会调用 failed() 。预计会这样吗?
如果您apply()在自己的规则中定义,则覆盖TestWatcher's apply(),它调用failed().
apply()
TestWatcher
failed()