Katsumata describes UI testing as checking the parts of an app users can see, including whether a login page has the expected fields, button states, and loading state. He distinguishes snapshot tests, which track component structure, and interaction tests, which check user flows, from visual regression tests, which compare how screens look.
Visual Regression Test In React Native
Speaker
Jesse Katsumata, a front-end engineer at CureApp, discusses visual regression testing for React Native at React Native EU 2020, hosted by Callstack.
Visual regression testing takes reference screenshots and compares them with new screenshots after code changes. Katsumata’s example changes a shared button’s width from 150 to 240: the signup page improves, but the login page’s side-by-side buttons no longer fit. A screenshot report can reveal the unintended change across both pages.
Unlike snapshots, screenshot comparisons focus on appearance, so they can avoid updates caused solely by changes to component structure or a third-party library. Katsumata also recommends testing both light and dark appearances, since dark mode adds screens to check and can expose unreadable text.
Katsumata uses the open-source tool RegSuit to compare screenshots stored in cloud storage, such as AWS S3 or Google Cloud Storage, and generate reports for pull requests. He uses Storybook with React Native for Web and Storycap to capture components, while noting web screenshots may differ from native app rendering. In the demo, changing a button’s label and border radius produces a report that flags the button and a login page that uses it.
Takeaways
- Screenshot tests can catch unintended visual changes in every screen that uses a shared component.
- Use snapshots for structure and interaction tests for user flows; screenshot comparisons answer a different question about appearance.
- Test light and dark appearances to catch styling issues such as unreadable text.
- Connect screenshot capture and comparison to pull requests so reviewers can inspect visual changes before merging.
- If using React Native for Web to capture screenshots, account for differences from native rendering.
Mentioned in this talk
Search inside this talk
What was claimed 15
- role atJesse Katsumata is front-end engineer at CureApp
“working as a front-end engineer at a company called CureApp”
YouTube Unverified1 source· Talk
- usesCureApp uses React Nativefor mobile applications
“our mobile applications are built using React Native”
YouTube Unverified1 source· Talk
- usesfor infrastructure
“our infrastructure is set up using TypeScript with AWS CDK”
YouTube Unverified1 source· Talk
- usesfor servers
“our servers run on Node.js”
YouTube Unverified1 source· Talk
- usesfor web applications
“our web applications use React”
YouTube Unverified1 source· Talk
- usesCureApp uses TypeScript
“Our engineers write everything in TypeScript”
YouTube Unverified1 source· Talk
- featureCureApp: Builds digital therapeutic apps for medical treatment
“we're building digital therapeutic apps to provide medical treatment”
YouTube Unverified1 source· Talk
- usesJesse Katsumata uses RegSuitfor visual regression tests in his project
“The one I use for our project is called RegSuit”
YouTube Unverified1 source· Talk
- featureRegSuit: Compares new screenshots against reference screenshots and generates reports
“it compares the screenshots with what's stored in the cloud storage against the new screenshots”
YouTube Unverified1 source· Talk
- usesas an example of external screenshot storage
“or Google Cloud Storage”
YouTube Unverified1 source· Talk
- usesas an example of external screenshot storage
“store a series of screenshots ... in external cloud storage, like AWS S3”
YouTube Unverified1 source· Talk
- usesJesse Katsumata uses
Storybook
to list application pages and components“I use Storybook to list all my pages and components”
YouTube Unverified1 source· Talk
- useswith Storybook for React
“I use Storybook for React on the web along with the React Native for Web library”
YouTube Unverified1 source· Talk
- integrates with
“Then it will run reg-suit once the screenshots have been taken”
YouTube Unverified1 source· Talk
- integrates with
“a command to take screenshots of all the components and pages from my Storybook, called Storycap”
YouTube Unverified1 source· Talk





