What is the difference between errors and errors in JUnit?

I am studying using JUnit.

Some of my tests appeared as "errors" and some as "failures." What is the difference between the two?

+5
source share
4 answers

Error : when something breaks and an exception occurs, for example, a reference to Null.

A failure is when test criteria are not met. that is, with failure Assert().

[This is not just junit at all.]

+10
source

In simple words

Errors - mean that during your test there were some unhandled / unforeseen exceptions, and therefore your test case basically crashed without full execution.

- , , ( , ).

+4

A failure - , - , JUnit- .

- - - , , , NullPointerException ArrayIndexOutOfBoundsException.

+2

- (, , )

-

+2

All Articles