playwright icon indicating copy to clipboard operation
playwright copied to clipboard

bug(artifacts) Fix generic screenshot paths causing collisions in multi-sharded DevOps builds

Open mastrzyz opened this issue 1 year ago • 2 comments

Append the sanitized test name to the automatic screenshot mechanism of Playwright.

Why?

Currently the names are very generic and cause conflicts in CI/CD Systems like Azure Devops when we have multiple jobs failing with the same generic name:

image

It's also not very clear which number responds to which testcase when we are able to upload:

image

Fix!

Added the sanitized file name, a good example of how this looks like are the fixed unit tests :

image

mastrzyz avatar Oct 16 '24 00:10 mastrzyz

Test results for "tests 1"

10 failed :x: [playwright-test] › reporter-junit.spec.ts:310:9 › created › should render existing attachments, but not missing ones @macos-latest-node18-1 :x: [playwright-test] › reporter-junit.spec.ts:337:9 › created › should render attachment paths relative to report file when report file name is specified @macos-latest-node18-1 :x: [playwright-test] › reporter-junit.spec.ts:310:9 › created › should render existing attachments, but not missing ones @ubuntu-latest-node18-1 :x: [playwright-test] › reporter-junit.spec.ts:337:9 › created › should render attachment paths relative to report file when report file name is specified @ubuntu-latest-node18-1 :x: [playwright-test] › reporter-junit.spec.ts:310:9 › created › should render existing attachments, but not missing ones @ubuntu-latest-node20-1 :x: [playwright-test] › reporter-junit.spec.ts:337:9 › created › should render attachment paths relative to report file when report file name is specified @ubuntu-latest-node20-1 :x: [playwright-test] › reporter-junit.spec.ts:310:9 › created › should render existing attachments, but not missing ones @ubuntu-latest-node22-1 :x: [playwright-test] › reporter-junit.spec.ts:337:9 › created › should render attachment paths relative to report file when report file name is specified @ubuntu-latest-node22-1 :x: [playwright-test] › reporter-junit.spec.ts:310:9 › created › should render existing attachments, but not missing ones @windows-latest-node18-1 :x: [playwright-test] › reporter-junit.spec.ts:337:9 › created › should render attachment paths relative to report file when report file name is specified @windows-latest-node18-1

1 flaky :warning: [playwright-test] › ui-mode-test-setup.spec.ts:98:5 › should show errors in config @macos-latest-node18-1

35951 passed, 624 skipped :heavy_check_mark::heavy_check_mark::heavy_check_mark:

Merge workflow run.

github-actions[bot] avatar Oct 16 '24 00:10 github-actions[bot]

@mastrzyz Could you please file an issue first? I've got a bunch of questions, and we prefer to discuss things in an issue rather than in a PR, for better discoverability in the future. Thank you!

dgozman avatar Oct 16 '24 06:10 dgozman

Closing as per above - lets continue the discussion in https://github.com/microsoft/playwright/issues/33143 for now.

mxschmitt avatar Oct 23 '24 10:10 mxschmitt