Summary
Track the upstream support and prerequisites required to migrate the remaining IntelliJ Platform fixture tests from BasePlatformTestCase and JUnit Vintage to native JUnit Jupiter fixtures.
This is a tracking issue rather than an immediate implementation task. It does not block standalone unit tests or visual tests from using Jupiter.
Current state
- The plugin supports IntelliJ Platform builds starting from
241.
- General tests currently target IntelliJ IDEA Community
2024.1.7.
- The current test configuration uses:
junit:junit:4.13.2;
archunit-junit4;
TestFrameworkType.Platform.
- The current baseline is 45 test classes and 286 tests.
- 28 classes and 186 tests depend on
BasePlatformTestCase or related JUnit 3-style fixtures.
- The remaining tests consist of 95 JUnit 4 tests and 5 ArchUnit rules.
- IntelliJ Platform
2024.1.7 does not provide the complete composable JUnit 5 fixture API required to replace myFixture, including projectFixture(), moduleFixture(), and codeInsightFixture().
Switching only to useJUnitPlatform() without the Vintage engine would silently stop discovering the existing BasePlatformTestCase tests.
Upstream context
JetBrains/intellij-platform-plugin-template#537 proposed replacing the previous UI Test Robot setup with IntelliJ IDE Starter.
The proposed structure:
- retained JUnit 4 and
TestFrameworkType.Platform for the general test source set;
- added a separate
uiTest source set and Gradle task;
- configured only
uiTest with:
TestFrameworkType.Starter;
TestFrameworkType.JUnit5;
- JUnit Jupiter;
- JUnit Platform Launcher;
useJUnitPlatform();
- kept UI tests separate from the normal
check workflow.
The PR was closed without being merged and is not present in the current template. It should therefore be treated as a design reference rather than an officially adopted template configuration.
Decision for now
- Keep existing
BasePlatformTestCase tests compatible through the Vintage engine if the general test task is moved to JUnit Platform.
- Allow standalone unit tests to migrate to Jupiter independently.
- Add visual tests through a separate JUnit 5 source set and task.
- Keep visual-test implementation separate from this migration.
- Do not raise the minimum supported IntelliJ Platform version solely to remove Vintage.
Revisit when
Re-evaluate the migration when one or more of the following occurs:
- the minimum supported IntelliJ Platform version is raised;
- the published test framework for the minimum version provides stable project, module, editor, and code-insight fixtures;
- the official IntelliJ Platform plugin template adopts native Jupiter fixtures for general tests;
BasePlatformTestCase or the Vintage engine is deprecated;
- the JUnit 4 runtime workaround for
test-framework-junit5 is no longer required.
Migration scope
When the prerequisites are satisfied:
- replace
BasePlatformTestCase inheritance with native Jupiter fixtures;
- convert the remaining JUnit 4 annotations and timeout declarations;
- migrate ArchUnit to its JUnit 5 engine;
- remove the Vintage engine;
- remove
junit:junit and archunit-junit4;
- preserve the existing test coverage and discovery baseline.
Acceptance criteria
- All tests run through the Jupiter engine.
- No test depends on
BasePlatformTestCase or JUnit 3-style testXxx() discovery.
- No JUnit 4 runner or Vintage dependency remains.
- At least the existing 45 classes and 286 tests are discovered.
- The complete suite passes against every supported IntelliJ Platform version.
- Test-count verification prevents silent test omission during migration.
References
Summary
Track the upstream support and prerequisites required to migrate the remaining IntelliJ Platform fixture tests from
BasePlatformTestCaseand JUnit Vintage to native JUnit Jupiter fixtures.This is a tracking issue rather than an immediate implementation task. It does not block standalone unit tests or visual tests from using Jupiter.
Current state
241.2024.1.7.junit:junit:4.13.2;archunit-junit4;TestFrameworkType.Platform.BasePlatformTestCaseor related JUnit 3-style fixtures.2024.1.7does not provide the complete composable JUnit 5 fixture API required to replacemyFixture, includingprojectFixture(),moduleFixture(), andcodeInsightFixture().Switching only to
useJUnitPlatform()without the Vintage engine would silently stop discovering the existingBasePlatformTestCasetests.Upstream context
JetBrains/intellij-platform-plugin-template#537 proposed replacing the previous UI Test Robot setup with IntelliJ IDE Starter.
The proposed structure:
TestFrameworkType.Platformfor the generaltestsource set;uiTestsource set and Gradle task;uiTestwith:TestFrameworkType.Starter;TestFrameworkType.JUnit5;useJUnitPlatform();checkworkflow.The PR was closed without being merged and is not present in the current template. It should therefore be treated as a design reference rather than an officially adopted template configuration.
Decision for now
BasePlatformTestCasetests compatible through the Vintage engine if the general test task is moved to JUnit Platform.Revisit when
Re-evaluate the migration when one or more of the following occurs:
BasePlatformTestCaseor the Vintage engine is deprecated;test-framework-junit5is no longer required.Migration scope
When the prerequisites are satisfied:
BasePlatformTestCaseinheritance with native Jupiter fixtures;junit:junitandarchunit-junit4;Acceptance criteria
BasePlatformTestCaseor JUnit 3-styletestXxx()discovery.References