Skip to content
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

[Feature]: Support globalTimeout Configuration at the Project Level #34604

Open
kathiresan-r-19912 opened this issue Feb 4, 2025 · 2 comments

Comments

@kathiresan-r-19912
Copy link

🚀 Feature Request

Currently, globalTimeout applies to the entire test run across all projects. However, in scenarios where multiple projects run in parallel, we may need different timeout limits for different projects.

For example, a Chromium-based project may require a longer execution time due to UI-heavy workflows, while a Firefox project may need a shorter timeout due to fewer test cases. Currently, the only workaround is to run each project separately with --global-timeout, which is not ideal for teams managing multiple projects in a single test suite.

Example

Allow globalTimeout to be set at the project level in playwright.config.js, similar to how timeout works for individual tests.

export default defineConfig({ projects: [ { name: 'chromium-tests', use: { ...devices['Desktop Chrome'] }, globalTimeout: 15 * 60 * 1000 // 15 minutes }, { name: 'firefox-tests', use: { ...devices['Desktop Firefox'] }, globalTimeout: 10 * 60 * 1000 // 10 minutes } ] });

Motivation

  • Enables better test time management for different browsers or environments.
  • Avoids the need for custom workarounds like globalSetup.js scripts.
  • Prevents unnecessary test terminations when some projects need a longer timeout than others.
@dgozman
Copy link
Contributor

dgozman commented Feb 4, 2025

@kathiresan-r-19912 How do you imagine this feature work when one project reaches its global timeout? Does the testing continue with other projects? Does everything fail? Please be more specific on the details.

@kathiresan-r-19912
Copy link
Author

@dgozman Each project in playwright.config.js can have its own globalTimeout.

If a project reaches its globalTimeout, the playwright should stop executing tests for that project without affecting other projects.

Other projects should continue running until they either complete or reach their own globalTimeout.

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

No branches or pull requests

2 participants