department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
281 stars 197 forks source link

Research and Implement Visual Regression Testing in CI/CD #22129

Open pjhill opened 3 years ago

pjhill commented 3 years ago

Problem Statement

VFS Teams do not currently have a means for verifying that changes are not indirectly causing regressions elsewhere in the platform. VSP personnel do not have any means of continuously scanning for visual regressions on the platform as changes are integrated.

How might we verify that newly integrated changes are not inadvertently causing regressions on the platform? How might we collect information about visual regressions into a report or dashboard?

Hypothesis or Bet

Given the ability to observe the impact to regressions on the platform immediately upon integrating their changes, VFS teams can fix regressions with context and precision. A tighter feedback loop for visual regressions will empower teams to resolve issues more quickly.

We will know we're done when... ("Definition of Done")

Known Blockers/Dependencies

No known blockers

Projected Launch Date

End of Q2

Launch Checklist

Guidance (delete before posting)

This checklist is intended to be used to help answer, "is my VSP initiative ready for launch?". All of the items in this checklist should be completed, with artifacts linked---or have a brief explanation of why they've been skipped---before launching a given VSP initiative. All links or explanations can be provided in Required Artifacts sections. The items that can be skipped are marked as such.

Keep in mind the distinction between Product and Initiative --- each Product needs specific supporting documentation, but Initiatives to improve existing Products should reuse existing documentation for that Product. VSP Product Terminology for details.

Is this service / tool / feature...

... tested?

... documented?

... measurable

Required Artifacts

Documentation

Testing

Measurement

TODOs

humancompanion-usds commented 1 month ago

Just a note, should we eventually pick this initiative up, since this was originally filed the Design System Team has implemented visual regression testing using Chromatic. In fact, we used it not too long ago to detect a change we picked up from USWDS that impacted a component of ours which was not documented in their release notes. We did do an evaluation of different solutions.

I don't know that our solution scales, and there is cost involved, but I do agree with the premise of this initiative. When the Design System Team picks up the injected header and footer work I have made it a prerequisite that we have some similar visual regression testing for a sampling of sitewide pages so that we can have some sense that any change there is not causing an immediately user visible problem.