Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Visual regression testing: in the browser or in node #536

Unanswered
LarsDenBakker asked this question in General
Discussion options

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.

You must be logged in to vote

Replies: 2 comments

Comment options

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?

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.

You must be logged in to vote
0 replies
Comment options

Looks like WTR has @web/test-runner-visual-regression. Works great for me! I suppose this thread can be closed now.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /