Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

Support for toHaveScreenshot using artifact management / Add a visual comparison NPM package to runtimes #282

Open
jonoc330 opened this issue Jan 26, 2023 · 1 comment
Labels

Comments

@jonoc330
Copy link

jonoc330 commented Jan 26, 2023

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!!!

@tnolet
Copy link
Member

tnolet commented Jan 26, 2023

@jonoc330 thanks for suggesting this. Screenshot testing and visual testing is supported in Playwright and we want to look into it and see if/how/when we can support this in a way that makes sense. No ETA yet, but we it has our attention: we are thinking all day long how we can make our Playwright support amazing.

@tnolet tnolet added enhancement New feature or request browser checks labels Jan 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants