Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/template-cleanup/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ pluginSinceBuild = 243
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
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

# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.jetbrains.php:203.4449.22, org.intellij.scala:2023.3.27@EAP
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:

# Prepare the environment and build the plugin
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:

# Run tests
- name: Run Tests
run: ./gradlew check
run: ./gradlew check -x uiTest
Copy link
Contributor Author

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


# Collect Tests Result of failed tests
- name: Collect Tests Result
Expand Down
138 changes: 108 additions & 30 deletions .github/workflows/run-ui-tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GitHub Actions Workflow for launching UI tests on Linux, Windows, and Mac in the following steps:
# - Prepare and launch IDE with your plugin and robot-server plugin, which is needed to interact with the UI.
# - Wait for IDE to start.
# GitHub Actions Workflow for launching UI tests on Linux and Mac in the following steps:
# - Prepare and launch IDE with your plugin and robot-server plugin, which is necessary to interact with the UI.
# - Wait for IDE to start
# - Run UI tests with a separate Gradle task.
#
# Please check https://github.com/JetBrains/intellij-ui-test-robot for information about UI tests with IntelliJ Platform.
Expand All @@ -12,28 +12,28 @@ on:
workflow_dispatch

jobs:

# UI Test Jobs (one per OS/test combination)
testUI:
runs-on: ${{ matrix.os }}
name: Run UI Test on ${{ matrix.osName }}
runs-on: ${{ matrix.runner }}
permissions:
contents: write
checks: write
pull-requests: write
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
runIde: |
export DISPLAY=:99.0
Xvfb -ac :99 -screen 0 1920x1080x16 &
gradle runIdeForUiTests &
- os: windows-latest
runIde: start gradlew.bat runIdeForUiTests
- os: macos-latest
runIde: ./gradlew runIdeForUiTests &
# Linux test
- runner: ubuntu-latest
osName: Linux
# macOS test
- runner: macos-latest
osName: macOS
Copy link
Contributor Author

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)


steps:

# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v4
uses: actions/checkout@v5

# Set up the Java environment for the next steps
- name: Setup Java
Expand All @@ -44,22 +44,100 @@ jobs:

# Setup Gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
uses: gradle/actions/setup-gradle@v4.2.2
with:
cache-read-only: true

# Run IDEA prepared for UI testing
- name: Run IDE
run: ${{ matrix.runIde }}
# Set up Xvfb for Linux headless mode
- name: Setup Xvfb for Linux
if: runner.os == 'Linux'
run: |
sudo apt-get update -y
sudo apt-get install -y xvfb x11-utils libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0
export DISPLAY=:99.0
Xvfb -ac :99 -screen 0 1920x1080x16 &
sleep 3
echo "DISPLAY=:99.0" >> $GITHUB_ENV

# Run UI test with IDE Starter framework
- name: Run UI Test
env:
CODECOV_API_TOKEN: ${{ secrets.CODECOV_API_TOKEN }}
LICENSE_KEY: ${{ secrets.LICENSE_KEY }}
UI_BRANCH_NAME: "${{ matrix.osName }}-${{ github.ref_name }}"
DISPLAY: ${{ runner.os == 'Linux' && ':99.0' || '' }}
run: |
echo "UI on ${{ matrix.osName }} run #: ${{ github.run_number }} and id: ${{ github.run_id }}"
./gradlew uiTest
timeout-minutes: 30

# List build directory for debugging
- name: List build directory structure
if: always()
shell: bash
run: |
echo "=== Build directory structure ==="
if [ -d "build" ]; then
find build -type d -name "log" -o -name "screenshots" -o -name "ui-hierarchy" 2>/dev/null | head -20 || true
echo "=== Looking for IDE test output ==="
find build -type d -path "*/ide-tests/*" 2>/dev/null | head -20 || true
else
echo "Build directory not found"
fi

- name: Collect Test Results
Copy link
Contributor Author

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.

if: always()
uses: actions/[email protected]
with:
name: tests-result-${{ matrix.osName }}
path: |
build/reports/
build/test-results/
build/out/
build/idea-sandbox/
build/**/*.log
build/**/screenshots/
build/**/ui-hierarchy/
if-no-files-found: warn
continue-on-error: true

- name: Collect Test Report XML
if: always()
uses: actions/[email protected]
with:
name: test-report-${{ matrix.osName }}
path: ${{ github.workspace }}/build/test-results/uiTest/*.xml

# Test report job using dorny/test-reporter
test-report:
name: UI Test Report
needs: testUI
runs-on: ubuntu-latest
if: always()
permissions:
contents: write
checks: write
pull-requests: write
actions: read

# Wait for IDEA to be started
- name: Health Check
uses: jtalk/url-health-check-action@v4
steps:
- name: Fetch Sources
uses: actions/checkout@v5
with:
url: http://127.0.0.1:8082
max-attempts: 15
retry-delay: 30s
token: '${{ secrets.GITHUB_TOKEN }}'

# Run tests
- name: Tests
run: ./gradlew test
- name: Download all test reports
uses: actions/[email protected]
with:
pattern: test-report-*
path: test-reports
merge-multiple: true

- name: Generate Test Report
uses: dorny/[email protected]
if: success() || failure()
with:
name: UI Test Report Dashboard
reporter: java-junit
fail-on-error: 'true'
path: 'test-reports/*.xml'
24 changes: 24 additions & 0 deletions .run/Run UI Tests.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run UI Tests" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="uiTest" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest>
<method v="2" />
</configuration>
</component>
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,21 @@
### Added

- Add `platformBundledModules` to `gradle.properties` along with `bundledModules()` helper to the Gradle build file
- UI Test support using IntelliJ IDE Starter framework
- New `uiTest` source set with example UI test demonstrating project creation
- GitHub Actions workflow for running UI tests on Linux and macOS
- UI test configuration with proper dependencies and Gradle task

### Changed

- Dependencies - upgrade `org.jetbrains.intellij.platform` to `2.7.1`
- Dependencies - upgrade `org.jetbrains.intellij.platform` to `2.7.2`
- Update documentation to reference IntelliJ IDE Starter instead of UI Test Robot framework
- Simplified repository configuration, removing unnecessary Maven repositories

### Fixed

- GitHub: Fixed the missing `$RELEASE_NOTE ` parent directory in the Release workflow
- UI Test: Added initialization check to prevent `UninitializedPropertyAccessException` in test teardown

## [2.3.0] - 2025-08-09

Expand Down
Loading
Loading