Skip to content

Fix flaky E2E tests with API-based setup and data isolation#64024

Draft
choo121600 wants to merge 1 commit intoapache:mainfrom
choo121600:refactor/e2e-data-isolation
Draft

Fix flaky E2E tests with API-based setup and data isolation#64024
choo121600 wants to merge 1 commit intoapache:mainfrom
choo121600:refactor/e2e-data-isolation

Conversation

@choo121600
Copy link
Member

@choo121600 choo121600 commented Mar 21, 2026

Problem

E2E tests relied on UI interactions to create test data, which led to frequent flaky failures due to:

  • Timing issues (e.g. waiting for UI rendering / network idle)
  • Data interference between parallel test runs

Change

  • Replaced UI-based test data setup with direct API calls, removing timing-related instability in the setup phase
  • Introduced shared utilities (test-helpers.ts) so each test creates and cleans up its own isolated data
  • Added Playwright custom fixtures (fixtures.ts) to auto-inject Page Object instances, eliminating repetitive beforeEach boilerplate

Result

  • Stable parallel execution by eliminating cross-test data interference
  • Significantly reduced flaky failures across the test suite
  • Improved readability and maintainability with consistent setup patterns across all 37 E2E test files

related: #63036


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)
    claude

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@boring-cyborg boring-cyborg bot added the area:UI Related to UI/UX. For Frontend Developers. label Mar 21, 2026
@choo121600 choo121600 force-pushed the refactor/e2e-data-isolation branch 5 times, most recently from d091ff4 to 05f874e Compare March 22, 2026 19:12
@choo121600 choo121600 force-pushed the refactor/e2e-data-isolation branch from 05f874e to af31fa9 Compare March 22, 2026 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant