You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+36-6Lines changed: 36 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ The app is currently in development. The `prodRelease` variant is [available on
22
22
**Now in Android** displays content from the
23
23
[Now in Android](https://developer.android.com/series/now-in-android) series. Users can browse for
24
24
links to recent videos, articles and other content. Users can also follow topics they are interested
25
-
in.
25
+
in, and be notified when new content is published which matches interests they are following.
26
26
27
27
## Screenshots
28
28
@@ -109,12 +109,42 @@ Examples:
109
109
manipulate the state of the `Test` repository and verify the resulting behavior, instead of
110
110
checking that specific repository methods were called.
111
111
112
-
## Screenshot tests
112
+
To run the tests execute the following gradle tasks:
113
+
114
+
-`testDemoDebug` run all local tests against the `demoDebug` variant.
115
+
-`connectedDemoDebugAndroidTest` run all instrumented tests against the `demoDebug` variant.
113
116
114
-
**Now In Android** uses [Roborazzi](https://github.com/takahirom/roborazzi) to do screenshot tests
115
-
of certain screens and components. To run these tests, run the `verifyRoborazziDemoDebug` or
116
-
`recordRoborazziDemoDebug` tasks. Note that screenshots are recorded on CI, using Linux, and other
117
-
platforms might generate slightly different images, making the tests fail.
117
+
**Note:** You should not run `./gradlew test` or `./gradlew connectedAndroidTest` as this will execute
118
+
tests against _all_ build variants which is both unecessary and will result in failures as only the
119
+
`demoDebug` variant is supported. No other variants have any tests (although this might change in future).
120
+
121
+
## Screenshot tests
122
+
A screenshot test takes a screenshot of a screen or a UI component within the app, and compares it
123
+
with a previously recorded screenshot which is known to be rendered correctly.
124
+
125
+
For example, Now in Android has [screenshot tests](https://github.com/android/nowinandroid/blob/main/app/src/testDemoDebug/kotlin/com/google/samples/apps/nowinandroid/ui/NiaAppScreenSizesScreenshotTests.kt)
126
+
to verify that the navigation is displayed correctly on different screen sizes
0 commit comments