Skip to content

Migrate from JUnit 4 to JUnit 5#1

Draft
BalusC wants to merge 2 commits into
arquillian-glassfish-server-poolfrom
junit5-migration
Draft

Migrate from JUnit 4 to JUnit 5#1
BalusC wants to merge 2 commits into
arquillian-glassfish-server-poolfrom
junit5-migration

Conversation

@BalusC
Copy link
Copy Markdown
Owner

@BalusC BalusC commented May 21, 2026

Swap junit:junit + arquillian-junit-container for org.junit.jupiter + arquillian-junit5-container. Update ~100 IT classes: imports, @RunWith@ExtendWith(ArquillianExtension.class), @Before/@After@BeforeEach/@AfterEach, assertion arg order (message moves to last).

ArquillianBase's @Rule TestWatcher becomes a nested FailedResponseLogger implementing JUnit 5's TestWatcher, registered via @ExtendWith on the base class (inherited by subclasses).

Also adds a ProgressListener (ported from the Faces TCK) auto-registered via META-INF/services, printing one tagged line per test event ([RUNNING][SLOT1][module][N/M] ClassIT#test).


NOTE: this is a Draft PR because the target branch (jakartaee#368) is not yet merged. This is a sequential PR because the work partly depends on the work done in the target branch (so merge conflicts are avoided).

BalusC and others added 2 commits May 21, 2026 09:33
Swap junit:junit + arquillian-junit-container for org.junit.jupiter +
arquillian-junit5-container. Update ~100 IT classes: imports, @RunWith@ExtendWith(ArquillianExtension.class), @Before/@after → @BeforeEach/
@AfterEach, assertion arg order (message moves to last).

ArquillianBase's @rule TestWatcher becomes a nested FailedResponseLogger
implementing JUnit 5's TestWatcher, registered via @ExtendWith on the
base class (inherited by subclasses).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Ported from Jakarta Faces TCK util module. Prints RUNNING/SKIPPED/FAILED
events tagged with the GlassFish pool slot and a per-JVM N/total counter,
with failure throwables inlined for log-only diagnosis.

Auto-registered via META-INF/services so every IT picks it up.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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