Difference between JUnit 4 and JUnit 5
Learn the difference between JUnit 4 and JUnit 5.
This lesson will help us understand the differences between JUnit 4 and JUnit 5.
JUnit 4 and JUnit 5 comparison
The table below shows a side-by-side comparison of annotations used in JUnit 4 and JUnit 5.
JUnit 5 | JUnit 4 |
@Test | @Test |
@BeforeEach | @Before |
@BeforeAll | @BeforeClass |
@AfterEach | @After |
@AfterAll | @AfterClass |
@Disabled | @Ignore |
@Tag | @Category |
@ExtendWith | @RunWith |
Code example using
... Ask