Visual regression testing: in the browser or in node #536
Replies: 2 comments
-
This would be useful for the Stencil-based component design system I work on, as we're always looking to capture visual features of our components. I would like to integrate it directly with our tests since it would simplify the setup, no longer relying on Storybook for screenshot testing (we currently use Chromatic, but have used other tools like Screener in the past). We also would love to hop off the rollercoaster of always having to justify screenshot overages that happen each month. |
Beta Was this translation helpful? Give feedback.
-
Looks like WTR has |
Beta Was this translation helpful? Give feedback.
-
I do most of my testing in the browser, using Karma in the past and now WTR. So when thinking about visual regression testing, adding it to WTR was the first thing that came to mind.
After reviewing different visual regression testing solutions, a lot of them use node js to run these tests. For many I think this is because tools like jest can't actually be used for taking screenshots. But some solutions actually take screenshots of a running storybook application.
So an important question for us is whether visual regression testing from browser tests is something that is useful to people? Do people need this type of control, and integration with their existing tests?
You can definitely reuse storybook stories inside browser tests, you can import them and render them in test fixtures. This might be faster than running storybook, too.
Beta Was this translation helpful? Give feedback.
All reactions