|
@@ -1,10 +1,16 @@
|
1
|
1
|
---
|
2
|
2
|
date: 2017-05-16
|
3
|
3
|
title: Android testing with Espresso and Spoon
|
4
|
|
-url: /2017/05/16/android-espresso-spoon/
|
5
|
|
-image: /res/images/android-tests/spoon-espresso.png
|
6
|
4
|
description: Automatically running Android UI tests, reducing flakeyness, and getting useful debugging information back on failure.
|
7
|
5
|
area: Android
|
|
6
|
+url: /2017/05/16/android-espresso-spoon/
|
|
7
|
+
|
|
8
|
+resources:
|
|
9
|
+ - src: spoon-espresso.png
|
|
10
|
+ name: Spoon output details, showing a screenshot captured of the failure
|
|
11
|
+ default: true
|
|
12
|
+ - src: spoon.png
|
|
13
|
+ name: Spoon output summary, showing results of 171 tests run on 3 devices
|
8
|
14
|
---
|
9
|
15
|
|
10
|
16
|
I've been spending some time recently setting up automated testing for our
|
|
@@ -49,7 +55,7 @@ Spoon produces HTML reports, showing the status of each test run on each device.
|
49
|
55
|
We have the report output folder collected as a build artefact, so the reports
|
50
|
56
|
can be seen right from the build server:
|
51
|
57
|
|
52
|
|
-<img src="/res/images/android-tests/spoon.png" alt="Spoon output summary, showing results of 171 tests run on 3 devices">
|
|
58
|
+{{< img "Spoon output summary, showing results of 171 tests run on 3 devices" >}}
|
53
|
59
|
|
54
|
60
|
### Flake-free UI testing with Espresso
|
55
|
61
|
|
|
@@ -160,7 +166,7 @@ Espresso's original handler so that it can output its debugging information
|
160
|
166
|
and fail the test. The Spoon runner automatically picks up the screenshot and
|
161
|
167
|
adds it to the report:
|
162
|
168
|
|
163
|
|
-<img src="/res/images/android-tests/spoon-espresso.png" alt="Spoon output details, showing a screenshot captured of the failure">
|
|
169
|
+{{< img "Spoon output details, showing a screenshot captured of the failure" >}}
|
164
|
170
|
|
165
|
171
|
Having the screenshot, error message and logs all presented in a clean UI
|
166
|
172
|
makes debugging failures much, much easier than searching through a huge build
|