This issue has been created
There are 6 updates, 2 comments.
 
 
XWiki Platform / cid:jira-generated-image-avatar-ffc4a191-06a1-4907-b284-adee15919559 XWIKI-25438 Closed

Remove leftover JUnit 3 and JUnit 4 test tools and assertions

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-232fae00-d689-47a0-89ad-7c8819ca57d2 Vincent Massol created this issue on 21/Oct/26 14:29
 
Summary: Remove leftover JUnit 3 and JUnit 4 test tools and assertions
Issue Type: cid:jira-generated-image-avatar-ffc4a191-06a1-4907-b284-adee15919559 Task
Affects Versions: 17.10.0
Assignee: Unassigned
Components: Development Issues only
Created: 21/Oct/26 14:29
Priority: cid:jira-generated-image-static-major-56ff5e09-39d6-4d85-a00c-6994732db6d4 Major
Reporter: Vincent Massol
Description:

XWiki Platform still contains some JUnit 3 / JUnit 4 based test tools and assertions that are no longer needed now that the tests have been migrated to JUnit 5. Remove them, as a step towards removing JUnit 4 (and the JUnit Vintage engine) from the test classpath altogether:

  • Remove MockitoOldcoreRule (oldcore test-jar), which is no longer used as a JUnit 4 rule anywhere (the only remaining references were to static constants declared on MockitoOldcore).
  • Remove AbstractGuestTest (xwiki-platform-test-ui), which has no user anymore.
  • Replace JUnit 3 / JUnit 4 assertions (junit.framework.TestCase, org.junit.Assert) with JUnit 5 ones in the remaining places that still use them (page objects, test utilities, unit tests).
  • Remove stale references to JUnit 4 rules and to jmock.

Note: this doesn't cover the old non-Docker functional test frameworks (flavor-test-ui, -storage, -escaping, -webstandards, -misc, -security, -upgrade) which still require JUnit 4, and which need to be migrated separately.

 
 

6 updates

 
cid:jira-generated-image-avatar-232fae00-d689-47a0-89ad-7c8819ca57d2 Changes by Vincent Massol on 21/Oct/26 14:29
 
Fix Version: 18.10.0-rc-1
Documentation in Release Notes: N/A
Documentation: N/A
Assignee: Vincent Massol
Resolution: Fixed
Status: Open Closed
 
 

2 comments

 
cid:jira-generated-image-avatar-232fae00-d689-47a0-89ad-7c8819ca57d2 Vincent Massol on 21/Oct/26 14:31
 

The removal of MockitoOldcoreRule was committed as a [Misc] commit (merged before this issue was created): https://github.com/xwiki/xwiki-platform/pull/7072 (commit 3ce879603e8).

 
cid:jira-generated-image-avatar-232fae00-d689-47a0-89ad-7c8819ca57d2 Vincent Massol on 21/Oct/26 14:38
 

Fixed by https://github.com/xwiki/xwiki-platform/pull/7072 and https://github.com/xwiki/xwiki-platform/pull/7075.