vitest icon indicating copy to clipboard operation
vitest copied to clipboard

Long test names can break playwright traces

Open gu-stav opened this issue 1 year ago • 1 comments

Describe the bug

We have tried to enable tracing for the playwright provider, but couldn't because very long test names generate trace filenames that may be longer than what the operating system (Github Actions) supports:

Image

Reproduction

  1. Setup tracing in CI
trace: {
  mode: process.env.CI ? 'retain-on-failure' : 'off',
},
  1. Run tests with a very long name, e.g.
it('should call comlink.post() when the notification is clicked and the current resource and the target resource have the same type and share the same attributes', async () => {})

I am very sorry that I didn't provide an actual reproduction, but Stackblitz does not allow playwright to run. If you think it is required and want me to setup a new repo, please let me know, but since this is very likely dependent on the operating system I don't know if it is valuable.

System Info

System:
    OS: macOS 26.1
    CPU: (12) arm64 Apple M4 Pro
    Memory: 3.05 GB / 48.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 24.7.0 - /Users/gustav.hansen/.nvm/versions/node/v24.7.0/bin/node
    npm: 11.5.1 - /Users/gustav.hansen/.nvm/versions/node/v24.7.0/bin/npm
    pnpm: 10.24.0 - /opt/homebrew/bin/pnpm
  Browsers:
    Chrome: 142.0.7444.176
    Chrome Canary: 144.0.7559.3
    Firefox Nightly: 147.0a1
    Safari: 26.1

Used Package Manager

npm

Validations

gu-stav avatar Dec 04 '25 12:12 gu-stav

This looks like the same problem as #9006 (trace file names hitting the OS length limit). The trace part is being fixed in #11848, and #11455 covers the same issue for failure screenshots.

nomadical avatar Nov 09 '26 09:11 nomadical