Skip to content

[Bug]: The --repeat-each flag does not work with --last-failed #36356

Open
@MeshyIce

Description

@MeshyIce

Version

latest

Steps to reproduce

  1. Run a test and make it fail (like by calling test.fail() on a test that should succeed
  2. Run npx playwright test --last-failed --repeat-each=10

Expected behavior

I expect to see the failed test(s) repeated 10 times, since I passed the --repeat-each=X flag.

Actual behavior

This is not the case, and it seems like the --repeat-each flag is ignored if the --last-failed flag is given.

Additional context

The use of these two flags together would really help in understanding if a test is flaky or not.

Environment

System:
    OS: macOS 15.5
    CPU: (12) arm64 Apple M3 Pro
    Memory: 2.73 GB / 36.00 GB
  Binaries:
    Node: 22.14.0 - ~/.local/share/nvm/versions/node/v22.14.0/bin/node
    npm: 11.3.0 - ~/.local/share/nvm/versions/node/v22.14.0/bin/npm
    pnpm: 10.11.0 - /opt/homebrew/bin/pnpm
    bun: 1.2.13 - /opt/homebrew/bin/bun
  IDEs:
    VSCode: 1.101.0 - /usr/local/bin/code
  Languages:
    Bash: 3.2.57 - /bin/bash

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