mirror of
https://github.com/open-metadata/OpenMetadata
synced 2026-05-24 09:39:11 +00:00
Folds the UI integration test module into the canonical integration-tests
module under a `ui-it` Maven profile. One test home, one classpath, no
more test-jar reinstall dance or cross-module IntelliJ classpath quirks.
Why: most of the value the UI test module shipped was reusable backend
infra (factories, search helpers, server harness) that worked fine
without a browser. Keeping it in a separate module forced multiple
unnecessary boundaries — test-jar publication, IntelliJ test-classes-
jar-tests phantom paths, src/test placement for AuthBackend code that
should have been in src/main, "where does this test go?" friction.
Layout in integration-tests:
org/openmetadata/it/auth/ JwtAuthProvider + AuthBackend / OidcBackend
/ AuthSession / TokenRefresher / ...
org/openmetadata/it/server/ ContainerizedServer / ServerHandle /
ExternalServer / sso/ profile records
org/openmetadata/it/search/ ReindexHelpers / SearchClient /
SearchAssertions / SearchQueryHelper
org/openmetadata/it/ui/ SessionBrowser / UiSession /
UiSessionExtension / TraceRecorder /
ClipboardHelper / pages/
org/openmetadata/it/scenarios/ *UIIT.java tests
org/openmetadata/it/util/ SdkClients + UiTestServer / OssTestServer
org/openmetadata/it/factories/ existing + EntityLoader
Build:
- integration-tests pom gains com.microsoft.playwright:playwright
(test scope). Other testcontainers / jwt deps already there.
- test-jar publish-test-harness includes pattern expanded to ship
server/, search/, ui/ packages alongside auth/, util/, factories/,
bootstrap/. Downstream consumers (collate) inherit the full UI
test harness, not just backend factories.
- New `ui-it` profile runs `**/*UIIT.java` with skip.embedded.bootstrap
=true, PW_VIDEO=true, per-method parallel @ 0.5 factor. Mirrors the
failsafe execution from the old playwright module.
- Existing parallel-tests executions across all profiles gain a
`**/*UIIT.java` exclude so embedded-mode IT runs don't pick up UI
tests they can't run.
Module removal:
- openmetadata-java-playwright/ deleted.
- parent pom <modules> entry removed.
- .github/workflows/java-playwright-nightly.yml updated to build and
test `openmetadata-integration-tests -P ui-it` instead.
Docs:
- MIGRATION_TRACKING.md and CONVENTIONS.md from the old module are
UI_MIGRATION_TRACKING.md / UI_TEST_CONVENTIONS.md at the
integration-tests root.
No test code semantics changed — pure reorganization. The 4-5 backend-
flavored *UIIT.java tests we identified as misplaced (running against
SDK with vestigial UI checks) still live under scenarios/ for now; a
follow-up will rename them to *IT.java and have them target the
embedded TestSuiteBootstrap directly to drop their ~3-minute Docker boot
overhead.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
133 lines
4.7 KiB
YAML
133 lines
4.7 KiB
YAML
# Copyright 2026 Collate
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
# Nightly run of the UI integration suite (*UIIT.java) — lives inside
|
|
# openmetadata-integration-tests under the `ui-it` Maven profile. Expands in
|
|
# Phase 3 to include the external-mode matrix (ES + OS), distributed reindex
|
|
# coordination, and crash-recovery scenarios. Tracks EPIC #3731 / tickets
|
|
# #3767, #3792.
|
|
|
|
name: UI Integration Tests (Nightly)
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 2 * * *'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
checks: write
|
|
|
|
jobs:
|
|
ui-it-nightly:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 90
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
searchEngine: [opensearch, elasticsearch]
|
|
steps:
|
|
- name: Free Disk Space (Ubuntu)
|
|
uses: jlumbroso/free-disk-space@main
|
|
with:
|
|
tool-cache: true
|
|
android: true
|
|
dotnet: true
|
|
haskell: true
|
|
large-packages: true
|
|
docker-images: false
|
|
swap-storage: true
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: main
|
|
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'temurin'
|
|
|
|
- name: Cache Maven dependencies
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.m2
|
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-maven-
|
|
|
|
- name: Install Ubuntu dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y jq
|
|
|
|
- name: Add /etc/hosts entry for mock OIDC server
|
|
# The SSO test infrastructure (MockOidcServer) needs `om-mock-idp` to resolve to
|
|
# loopback on the host so the same URL works inside the Docker network and from
|
|
# the host-side Playwright browser, keeping the issued tokens' `iss` claim
|
|
# consistent across actors.
|
|
run: echo "127.0.0.1 om-mock-idp" | sudo tee -a /etc/hosts
|
|
|
|
- name: Build dependencies for integration-tests
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: mvn -DskipTests clean install -pl :openmetadata-integration-tests -am
|
|
|
|
- name: Install Playwright browsers
|
|
run: |
|
|
mvn -pl :openmetadata-integration-tests dependency:build-classpath -Dmdep.outputFile=/tmp/cp.txt -q
|
|
java -cp "$(cat /tmp/cp.txt)" com.microsoft.playwright.CLI install --with-deps chromium
|
|
|
|
- name: Free build artifacts
|
|
run: |
|
|
rm -rf openmetadata-service/target/lib openmetadata-service/target/classes
|
|
rm -rf openmetadata-spec/target openmetadata-sdk/target common/target
|
|
rm -rf openmetadata-shaded-deps/*/target
|
|
df -h /
|
|
|
|
- name: Run UI integration tests (${{ matrix.searchEngine }})
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
if [ "${{ matrix.searchEngine }}" = "elasticsearch" ]; then
|
|
mvn verify -P ui-it -pl :openmetadata-integration-tests \
|
|
-DsearchType=elasticsearch \
|
|
-DsearchImage=docker.elastic.co/elasticsearch/elasticsearch:9.3.0
|
|
else
|
|
mvn verify -P ui-it -pl :openmetadata-integration-tests
|
|
fi
|
|
|
|
- name: Upload Playwright traces
|
|
if: ${{ always() }}
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: playwright-traces-${{ matrix.searchEngine }}-${{ github.run_id }}
|
|
path: openmetadata-integration-tests/target/playwright-traces
|
|
if-no-files-found: ignore
|
|
retention-days: 14
|
|
|
|
- name: Upload Failsafe Reports
|
|
if: ${{ always() }}
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: failsafe-reports-${{ matrix.searchEngine }}-${{ github.run_id }}
|
|
path: openmetadata-integration-tests/target/failsafe-reports
|
|
if-no-files-found: ignore
|
|
retention-days: 14
|
|
|
|
- name: Publish Test Report
|
|
if: ${{ always() }}
|
|
uses: scacap/action-surefire-report@v1
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
fail_on_test_failures: true
|
|
report_paths: 'openmetadata-integration-tests/target/failsafe-reports/TEST-*.xml'
|