Snapshot testing
This is a React-specific type of testing that has a long history of recording the appearance of user interfaces. React component trees are serialized to disk as a JSON string and then compared between tests runs.
React component trees are useful in a couple of important scenarios, including the following:
-
When your team has a low level of experience with TDD and general program design, and can become more confident with a safety net of snapshot testing
-
When you have zero test coverage of software that is already being used in production, and you would like to quickly gain some level of confidence before making any changes
QA teams are sometimes interested in how software changes visually between releases, but they will ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access