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]: Label screenshots made in playwright with test file name #33143

Open
mastrzyz opened this issue Oct 16, 2024 · 4 comments
Open

[Feature]: Label screenshots made in playwright with test file name #33143

mastrzyz opened this issue Oct 16, 2024 · 4 comments

Comments

@mastrzyz
Copy link
Contributor

🚀 Feature Request

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

Example

Fix!

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

Image

This will allow us to find the artifact easier and not conflict in CI/CD systems like in Azure Devops

Motivation

This is purely a CI/CD Improvement for Playwright integration for us, we have a massively parallel system running hundreds of tests across multiple shards

@dgozman
Copy link
Contributor

dgozman commented Oct 17, 2024

@mastrzyz Thank you for filing the issue!

Don't you have the same problem with traces, all named trace.zip? It seems like the better solution is to update your reporter to include the test name in any attachments it generates, since these are presented as a plain list, not grouped by test.

@mastrzyz
Copy link
Contributor Author

Sorry @dgozman , I'm not using any custom reporter and relying on the existing Playwright reporters which are outputting trace.zip and screenshot1.png.

@dgozman
Copy link
Contributor

dgozman commented Oct 18, 2024

@mastrzyz In this case, why do you only focus on the screenshots? I'd think that trace.zip would be equally important. Do I miss something?

If I understand correctly, you are using junit reporter that is uploaded to Azure DevOps through this task, don't you? Perhaps we can improve that part instead? Why does it not show the full attachment path? Reading this post, I would think the full attachment path that already includes test path could be shown. Not to mentioning that it's a part of the specific test output.

@mastrzyz
Copy link
Contributor Author

You know to tell you the truth, why don't I see this failure for trace.zip!

Image

Could it be that trace.zip is only one? we have retries enabled so I wonder if we take screenshots in first attempt and then seccond also takes and collides

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

No branches or pull requests

2 participants