第一次失败后如何使junit测试停止

第一次失败后如何使junit测试停止

问题描述:

有没有办法让运行的junit测试在测试失败后停止?

Is there a way to make running junit test to stop after a test fails?

是的……此功能(或缺少此功能)已内置到各种TestRunner中(控制台,AWT,Swing,Ant,Maven或内置的一种)进入Eclipse等).您必须在要使用的特定平台的文档中寻找此控件.

Yes ... this ability (or the lack of it) is built into the various TestRunners (Console, AWT, Swing, Ant, Maven or the one built into Eclipse, etc). You'll have to look for this control in the documentation for the specific platform you're using.