-
Notifications
You must be signed in to change notification settings - Fork 754
UI Testing Support with IntelliJ IDE Starter #537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Conversation
…macOS compatibility, enhance test logging, and integrate new UI testing class.
…implify job naming, adjust artifact naming, and update UI platform build version.
# Run tests | ||
- name: Run Tests | ||
run: ./gradlew check | ||
run: ./gradlew check -x uiTest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed only because we run the check - the test task already has the tag exclusion, so when running the test task in the IDE or Gradle, it runs only the unit-tests
osName: Linux | ||
# macOS test | ||
- runner: macos-latest | ||
osName: macOS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had firewall issues when running on Windows ( also with the previous Robot Framework)
* | ||
* @see [IntelliJ IDE Starter Documentation](https://github.com/JetBrains/intellij-ide-starter) | ||
*/ | ||
class Setup { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Setup file is not mandatory, but I believe it can be helpful for developers. It could also be made more robust, since the IDE starter supports GitHub CI integration with DI.
echo "Build directory not found" | ||
fi | ||
- name: Collect Test Results |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed if we update SetUp.kt to use full CI integration with the DI framework.
platformType = IC | ||
platformVersion = 2024.3.6 | ||
# Intellij Platform UI Platform Build Version -> https://plugins.jetbrains.com/docs/intellij/integration-tests-ui.html | ||
uiPlatformBuildVersion = 243.26574.91 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is a way to retrieve the build version directly from the platformVersion, we do not need this. However, it is crucial to keep the build number in a single place, since we want to avoid updating it in multiple locations every time.
…ine `uiTest` setup, and clean up comments.
Codecov Report✅ All modified and coverable lines are covered by tests. 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 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The additional STARTER test framework is added, see https://github.com/JetBrains/intellij-ide-starter Thanks to others here who trailblazed, @jonathan1983, JetBrains/intellij-platform-plugin-template#537 and @helinx, flutter#8338
The additional STARTER test framework is added, see https://github.com/JetBrains/intellij-ide-starter Thanks to others here who trailblazed, @jonathan1983, JetBrains/intellij-platform-plugin-template#537 and @helinx, flutter#8338
Something is off with the workflows... it passed and now there are multiple infrastructure errors |
The additional STARTER test framework is added, see https://github.com/JetBrains/intellij-ide-starter Thanks to others here who trailblazed, @jonathan1983, JetBrains/intellij-platform-plugin-template#537 and @helinx, flutter#8338 The change does not try to get the new tests working in the presubmit.
The additional STARTER test framework is added, see https://github.com/JetBrains/intellij-ide-starter Thanks to others here who trailblazed, @jonathan1983, JetBrains/intellij-platform-plugin-template#537 and @helinx, flutter#8338 The change does not try to get the new tests working in the presubmit.
The additional STARTER test framework is added, see https://github.com/JetBrains/intellij-ide-starter Thanks to others here who trailblazed, @jonathan1983, JetBrains/intellij-platform-plugin-template#537 and @helinx, flutter#8338 The change does not try to get the new tests working in the presubmit.
The additional STARTER test framework is added, see https://github.com/JetBrains/intellij-ide-starter Thanks to others here who trailblazed, @jonathan1983, JetBrains/intellij-platform-plugin-template#537 and @helinx, #8338
This is awesome! |
Thanks @jreznot If you want me to update something or do other changes I can do it this week. |
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
uiTest
source set with complete example implementation./gradlew uiTest
task for running UI testsTest 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 testingCI/CD Integration
Documentation Updates
🔧 Technical Implementation
Dependencies (Minimal Required):
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 operationsConfiguration:
uiPlatformBuildVersion
property ingradle.properties
for IDE version specificationSystemInfo
classUninitializedPropertyAccessException
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:
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 ingradle.properties
.Rationale:
243.26574.91
)platformVersion
format (e.g.,2024.3.6
) used by the pluginpluginSinceBuild
property doesn't provide the full build number neededAlternative 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: