UI Testing Support with IntelliJ IDE Starter
Summary
This PR introduces the IntelliJ IDE Starter framework, replacing the older UI Test Robot approach. This provides developers with a production-ready UI testing setup that follows current JetBrains best practices.
Key Changes
🎯 Core Features Added
-
UI Test Infrastructure
- New
uiTestsource set with complete example implementation - Integration with IntelliJ IDE Starter framework and Driver SDK
- Dedicated
./gradlew uiTesttask for running UI tests - Comprehensive documentation and code examples
- New
-
Test Implementation
MyProjectUITest.kt- Example UI test demonstrating project creation and tool window interactionSetup.kt- Test configuration with OS-specific settings (macOS, Linux, Windows)MyToolWindowPanelUIComponent.kt- Custom UI component definitions for testing
-
CI/CD Integration
- GitHub Actions workflow for automated UI testing on Linux and macOS
- Proper artifact collection for test debugging
- Test reporting with JUnit XML output
-
Documentation Updates
- Updated README with IntelliJ IDE Starter documentation
- Removed references to the deprecated UI Test Robot framework
- Added links to official UI testing documentation
🔧 Technical Implementation
Dependencies (Minimal Required):
- IntelliJ Platform Test Framework (Starter, JUnit5)
org.kodein.di:kodein-di-jvm:7.26.1- DI framework used by IDE Starterorg.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0- Required for async operations- JUnit 5 for test annotations and runtime
Configuration:
- Added
uiPlatformBuildVersionproperty ingradle.propertiesfor IDE version specification - OS-specific VM options properly segregated using
SystemInfoclass - Initialization safety checks to prevent
UninitializedPropertyAccessException
Notes for Reviewers
1. Windows Support in GitHub Actions
Issue: Windows UI tests are not included in the GitHub Actions workflow.
Reason: During testing, I encountered persistent issues running UI tests on Windows GitHub Actions runners:
- Windows Firewall popups interrupting test execution
- Display driver compatibility issues
- Significantly longer execution times compared to Linux/macOS
Recommendation: Windows testing can be added later if needed, but for template simplicity and reliability, Linux and macOS coverage should be enough for most plugin developers.
2. Platform Version Configuration
Current Implementation: Added uiPlatformBuildVersion property in gradle.properties.
Rationale:
- The IDE Starter framework requires a specific build number format (e.g.,
243.26574.91) - This differs from the
platformVersionformat (e.g.,2024.3.6) used by the plugin - The
pluginSinceBuildproperty doesn't provide the full build number needed
Alternative Consideration:
If there's a preferred way to derive the full build number from existing properties, I'm open to refactoring. Ideally, we could also use platformType to make the Setup.kt more flexible (currently hardcoded to IC).
Testing
All changes have been tested:
- ✅ Build compiles successfully
- ✅ UI tests run locally on macOS
- ✅ GitHub Actions workflow validated, see here.
- ✅ Documentation reviewed for accuracy
:warning: Please install the to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 34.48%. Comparing base (adad639) to head (eef98e5).
:warning: Report is 207 commits behind head on next.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@ Coverage Diff @@
## next #537 +/- ##
==========================================
+ Coverage 27.58% 34.48% +6.89%
==========================================
Files 4 4
Lines 29 29
==========================================
+ Hits 8 10 +2
+ Misses 21 19 -2
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Something is off with the workflows... it passed and now there are multiple infrastructure errors
This is awesome!
Thanks @jreznot
If you want me to update something or do other changes I can do it this week.
@hsz Hi you didn't like this PR or there is a new policy for contributing to the project?
Asking to know for next time, thanks
Oh my, this PR got closed automatically when I merged the next branch into main as a part of the release flow.
It was not my intention to drop your work — I'll get it back soon!