Running JUnit 4 Tests in Junit 5

Learn to run JUnit 4 tests in JUnit 5.

JUnit Vintage engine, which is included in JUnit 5, helps us run JUnit 4 tests in JUnit 5.

The junit-vintage-engine module supports backward compatibility with previous JUnit versions, which allows seamless migration from JUnit 4 to JUnit 5.

Migration with Maven

We use the following dependency to install the junit-vintage-engine module.

Get hands-on with 1200+ tech skills courses.