Skip to content

Migrate test suite from JUnit 4 to JUnit 5#721

Open
tgd wants to merge 1 commit into
developfrom
feature/migrate-junit-4-to-5
Open

Migrate test suite from JUnit 4 to JUnit 5#721
tgd wants to merge 1 commit into
developfrom
feature/migrate-junit-4-to-5

Conversation

@tgd

@tgd tgd commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Migrated all test classes from JUnit 4 to JUnit 5
  • Updated Maven dependencies (removed junit:junit, added junit-jupiter)
  • Upgraded maven-surefire-plugin to 3.5.5
  • Verified: test count maintained, coverage not reduced

Migration details

  • Annotations: @test, @Before/@after, @BeforeClass/@afterclass, @ignore -> JUnit 5 equivalents
  • Assertions: migrated to org.junit.jupiter.api.Assertions (message parameter reordered)
  • Runners: @RunWith -> @ExtendWith
  • Rules: converted to JUnit 5 extensions
  • Exception testing: @test(expected=...) -> assertThrows()

Verification

See .migrate/ directory for baseline vs post-migration test counts and coverage data.

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant