Annotation for executing method before all test methods run in the current class
@BeforeClass
@BeforeAll
Annotation for executing method after all test methods run in the current class
@AfterClass
@AfterAll
Annotation for executing method before each test case
@Before
@BeforeEach
Annotation for executing method after each test method
@After
@AfterEach
Architecture
It has everything like PLATFORM, annotations etc bundled in a single jar file.
JUnit 5 is composed of 3 sub-units - JUnit Platform, JUnit Jupiter and JUnit Vintage
Required JDK Version
This needs Java 5 or higher versions.
This needs Java 8 or above.
Assertions
Assert methods are present in org.junit.Assert package for validating expected and actual outputs.
Assert methods are present in the org.junit.jupiter.Assertions package. The methods also have overloaded methods for SUPPORTING error messages in case TESTSFAIL.