argos-ci / argos

Visual Testing for modern web apps. Review visual changes in your development workflow.
https://argos-ci.com
MIT License
399 stars 33 forks source link

Partial screenshot upload #1189

Open oliviertassinari opened 8 months ago

oliviertassinari commented 8 months ago

As a user, I would like to be able to only upload a sub-set of my screenshots, based on the files that I know changed relative to the baseline.

Motivation

At MUI, we take screenshots of React components. We should be able to create a webpack plugin that skip the emission of all the modules that didn't change in the git diff and that have not parent dependency. This would allow us to take/diff 10 screenshots per build rather than 1,000. So a gain of two orders of magnitude.

Benchmarks

gregberge commented 8 months ago

Hello @oliviertassinari, it's very interesting. It could dramatically speed up the build time for you! I will think about it and I keep you up to date.

oliviertassinari commented 8 months ago

To be fair, we don't have the bandwidth to update our screenshot generator to support this. However, I know Argos has one for different tools so I thought that I would open an issue. It could be a way for Argos to differentiate, I don't know if Chromatic does this for instance.

The way to solve pricing is either to bill skipped screenshots or to add a per editor component.

gregberge commented 8 months ago

Chromatic does it yes but they have the control over Storybook so it's integrated. https://www.chromatic.com/docs/turbosnap/

For Argos we can't make it automatic that's why it's not a urgent issue. For enterprise projects with lot of screenshots I think it's interesting.