Skip to content

[Feature]: Error: "context" and "page" fixtures are not supported in "beforeAll" since they are created on a per-test basis. #39197

@DavitV-yan

Description

@DavitV-yan

🚀 Feature Request

Hi all,
Is it possible to add support for the context and page fixtures in beforeAll?
The issue is that when I need to perform a one-time action, such as calling page.goto(), before running all tests, I can’t do this using fixtures in beforeAll. As a result, I’m forced to move this logic to beforeEach, which is not optimal for performance or test design.

Example

No response

Motivation

This proposal aims to improve test performance and flexibility by allowing one-time setup actions using context and page fixtures in beforeAll. It would reduce unnecessary repetition in beforeEach, enable cleaner test design, and better support common real-world testing scenarios where shared setup is required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions