I'm running JUnit tests on a large code base, and I've been realizing that sometimes I get "Errors" while other times I get "Failures". What's the difference?
+7
A:
Ok, I've just noticed a pattern and think I've figured it out (correct me if I'm wrong). It seems to me that failures are when your test cases fail - i.e. your assertions are incorrect. Errors are unexpected errors that occur while trying to actually run the test - exceptions, etc.
froadie
2010-08-06 17:05:31
You are correct, sir.
Jesse J
2010-08-06 17:13:38
Though if anything extending `java.lang.AssertionError` is thrown it will be shown as a test failure instead of a test error. You should consider accepting your own answer because it is correct.
ponzao
2010-08-12 14:15:31