Skip to content

Conversation

@alexgrozav
Copy link
Member

Summary

This pull request enhances the Playwright E2E testing setup by improving the management of web servers and test environment teardown. The most significant changes include introducing a global teardown script to clean up test processes, refactoring how web servers are started and reused, and updating related scripts for consistency and reliability.

Test environment management improvements:

  • Added a new global-teardown.ts script that kills any processes running on ports 5678 and 8080 after tests finish, ensuring a clean test environment. (packages/testing/playwright/global-teardown.ts)
  • Integrated the global teardown script into the Playwright config, running it automatically in development mode. (packages/testing/playwright/playwright.config.ts)

Web server and test script refactoring:

  • Refactored the Playwright config to support multiple web servers using a dynamic webServer array, allowing both backend and frontend servers to be started and reused as needed. (packages/testing/playwright/playwright.config.ts) [1] [2]
  • Updated the logic for starting frontend and backend servers, ensuring correct commands and environment variables are used based on the test context. (packages/testing/playwright/playwright.config.ts) [1] [2]
  • Removed the unused dev:fe:e2e script from package.json to avoid confusion and redundancy. (package.json)

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/CAT-1890/allow-running-playwright-e2e-in-dev-mode-using-vite-devserver

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@alexgrozav alexgrozav self-assigned this Dec 15, 2025
@n8n-assistant n8n-assistant bot added the n8n team Authored by the n8n team label Dec 15, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

@currents-bot
Copy link

currents-bot bot commented Dec 15, 2025

E2E Tests: n8n tests passed after 5m 23.9s

🟢 69 · 🔴 0 · ⚪️ 1 · 🟣 1

View Run Details

Run Details

  • Project: n8n

  • Groups: 1

  • Framework: Playwright

  • Run Status: Passed

  • Commit: 5e2b929

  • Spec files: 121

  • Overall tests: 559

  • Duration: 5m 23.9s

  • Parallelization: 1


This message was posted automatically by currents.dev | Integration Settings

@blacksmith-sh

This comment has been minimized.

@alexgrozav alexgrozav merged commit 6abed53 into master Dec 15, 2025
105 of 109 checks passed
@alexgrozav alexgrozav deleted the e2e-dev-cleanup-4 branch December 15, 2025 14:18
@n8n-assistant
Copy link

n8n-assistant bot commented Dec 15, 2025

Got released with n8n@[email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

n8n team Authored by the n8n team Released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants