Company
Date Published
Sept. 9, 2024
Author
Nočnica Mellifera
Word count
605
Language
English
Hacker News points
None

Summary

You can attach screenshots directly to Playwright's test reports using the `testInfo.attach()` method. This allows you to centralize all your screenshots, SVGs, or other files in one place within your report, decluttering your repository and providing a more integrated view of your test results. By attaching your screenshots, you can easily access them right from the report, making it convenient for uploading to CI/CD pipelines. The approach is not limited to screenshots and can be applied to attachments like JSON files or other data formats.