Bloodboiler
Bloodboiler

Reputation: 2092

How to make junit testing to stop after first failing test

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

Upvotes: 6

Views: 5440

Answers (2)

Steve Moyer
Steve Moyer

Reputation: 5733

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.

Upvotes: 3

Dave Costa
Dave Costa

Reputation: 48121

I know that in Ant, the junit task has options "haltonerror" and "haltonfailure" that controls this behavior.

Upvotes: 5

Related Questions