Support for `toHaveScreenshot` / visual regression testing

Is your feature request related to a problem? Please describe. I have a particular use case for toHaveScreenshot in that my Checkly tests goes through our UI to generate a PDF export of a particular page that you're on. I'd love to be able to compare a screenshot of the PDF generated to a snapshot, as it's impossible to run typical assertions on the information shown in PDFs.

Describe the solution you'd like I understand that Checkly agents run in an isolated environment for each test. However, toHaveScreenshot could be supported in a way similar to Buildkite in how it allows you to manage artifacts between builds and build steps, it would be cool if the Checkly agent could detect snapshots generated from toHaveScreenshot, store them somewhere, and then pull them down for the next test to verify against. This could be automatic, or something that the test does, wherer you test can import some kind of Checkly npm package that exports some functions to do these particular tasks.

Describe alternatives you've considered What I'm trying to achieve here I can write this code myself. I.e i can store the screenshot snapshots in S3 at the end of my test and write them to disk when the test starts again but that's not ideal at scale if I need to do this in multiple tests. There are visual comparison libraries out there but they aren't in the Checkly runtimes. Adding some kind of visual comparison npm package to the runtimes would suffice too!!!

original GH issue link

Please authenticate to join the conversation.




πŸ’‘ Feature Request


Browser Checks

Nov 09, 2023

About 1 year ago


Tim Nolet

Subscribe to post

Get notified by email when there are changes.