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
The Espresso Device API enables synchronized interactions with the test device. This API is experimental and subject to change. Currently, it is only supported on instrumentation tests run on emulators.
4
+
5
+
To skip tests on devices that do not have certain display attributes, such as display width and height, annotate your test with @RequiresDisplay. This annotation takes in a WidthSizeClassEnum and a HeightSizeClassEnum. It can be applied to test classes or test methods. For details on these size classes, see https://developer.android.com/guide/topics/large-screens/support-different-screen-sizes.
6
+
7
+
This project uses the Gradle build system. You don't need an IDE to build and execute it but Android Studio 3.4 is recommended.
8
+
9
+
1. Download the project code, preferably using `git clone`.
10
+
1. In Android Studio, select *File* | *Open...* and point to the `./build.gradle` file.
11
+
1. Check out the relevant code:
12
+
* The application under test is located in `src/main/java`
13
+
* Instrumentation Tests are in `src/androidTest/java`
14
+
* Local Tests are in `src/test/java`
15
+
1. Create and run the Instrumented test configuration
16
+
* Open *Run* menu | *Edit Configurations*
17
+
* Add a new *Android Instrumented Tests* configuration
18
+
* Choose the `app` module
19
+
* Connect a device or start an emulator
20
+
* Turn animations off.
21
+
(On your device, under Settings->Developer options disable the following 3 settings: "Window animation scale", "Transition animation scale" and "Animator duration scale")
22
+
* Run the newly created configuration
23
+
* The application will be started on the device/emulator and a series of actions will be performed automatically.
24
+
25
+
If you are using Android Studio, the *Run* window will show the test results.
0 commit comments