Skip to content

Commit 8e84a9f

Browse files
authored
Merge pull request #47 from android-ui-testing/update-snapshot-testing-introduction
Update screenshot_testing.md
2 parents 7929914 + e6301cf commit 8e84a9f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

docs/content/basics/screenshot_testing.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# Screenshot testing
22

33
## What it is
4-
Screenshot testing (also called Snapshot testing) has been in the Android world since 8th October 2015, when Facebook open sourced the first version of their snapshot testing library.
5-
6-
They are a special type of UI tests that inflate a view, take a screenshot of it, and compare it to an already stored image taken as reference. This reference is considered the source of truth: it depicts how the UI must be displayed, pixel by pixel.
4+
Screenshot tests (also called snapshot tests) are a special type of UI tests that inflate a view, take a screenshot of it, and compare it to an already stored image taken as reference. This reference is considered the source of truth: it depicts how the UI must be displayed, pixel by pixel.
75
If the generated snapshot file from the test differs from the reference, the test fails, passes otherwise.
86

7+
The first documented use of screenshot testing dates of April 2011, in a [blog post](https://dtmilano.blogspot.com/2011/04/monkeyrunner-visual-image-comparison.html) where Diego Torres Milano explains how to do visual image comparison with Monkeyrunner.
8+
Nevertheless, it started gaining popularity in Android since 8th October 2015, when Facebook open sourced the first version of their snapshot testing library.
9+
910
## Motivation
1011
Screenshot tests are easy to write and maintain and run fast (≈ 1 sec per test), what makes them affordable to execute upon PRs.
1112
They focus on detecting visual bugs that standard **UiAutomator** and **Espresso** cannot, namely
@@ -79,7 +80,9 @@ One could also use real devices for snapshot testing, but it does not scale. Dev
7980

8081
- [Shot](https://github.com/pedrovgs/Shot): Written on top of Facebook by Pedro.
8182

82-
- [Testify](https://github.com/Shopify/android-testify#readme): Shopify framework. Last one open sourced
83+
- [Testify](https://github.com/Shopify/android-testify#readme): Shopify library.
84+
85+
- [Dropshots](https://github.com/dropbox/dropshots): Dropbox library. Last one open sourced.
8386

8487
2. JVM
8588
- [Paparazzi](https://github.com/cashapp/paparazzi): Square framework

0 commit comments

Comments
 (0)