An Introduction to Effective Snapshot Testing on Android

Sergio Sastre Flórez

Android developer


UI tests are a powerful tool to detect regression bugs. However, they are tedious to write and run very slow. But they are not the only tool we got to test the UI:
snapshot tests are some specific type of UI tests, that are not only easier to write but also run much faster than standard UI tests. They even help detect visual regression bugs that Espresso/UiAutomator tests cannot. Indeed, they are more widely used than UI tests by big companies such as Airbnb, with ≈ 30.000 snapshot tests, and Uber, with thousand of snapshot tests vs. a handful of UI tests, among others.

While there are plenty of resources about writing UI tests on Android, the same doesn't exist for snapshot tests. There is no guidance.

So, what is actually snapshot testing? how do you write a valuable snapshot test? what are the best practices? what are the pitfalls you have to take into account?

If you want to know how to get the most out of snapshot testing, come and join this tech talk. You will learn:
- what is snapshot testing and how your app can benefit from it
- how to decide what to snapshot test
- how to write your first meaningful snapshot test
- tips and tricks for better snapshot testing and what pitfalls to avoid

I am currently working as an external Android developer at AutoScout24, and previously at CHECK24 for more than 5 years, among others. A big passionate of software testing in general, I’ve been recently writing blog posts on testing and contributing to open source testing frameworks like KasperskyLab/Kaspresso for Android.
 When I am not coding or with my family, I am likely playing football, running or snowboarding in the mountains.
love challenges and making things happen.