@@ -10,40 +10,15 @@ Add ```android:usesCleartextTraffic="true"``` in the ```<application>``` in the
10
10
of the Android app used for testing. It's best to put this in a debug or androidTest
11
11
AndroidManifest.xml so that you don't ship it to end users. (See the example app of this package.)
12
12
13
- Add dependencies to your build.gradle:
13
+ Add the following dependencies in android/app/ build.gradle:
14
14
15
15
``` groovy
16
16
dependencies {
17
17
testImplementation 'junit:junit:4.12'
18
18
testImplementation "com.google.truth:truth:1.0"
19
19
androidTestImplementation 'androidx.test:runner:1.1.1'
20
20
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
21
-
22
- // Core library
23
21
api 'androidx.test:core:1.2.0'
24
-
25
- // AndroidJUnitRunner and JUnit Rules
26
- androidTestImplementation 'androidx.test:runner:1.1.0'
27
- androidTestImplementation 'androidx.test:rules:1.1.0'
28
-
29
- // Assertions
30
- androidTestImplementation 'androidx.test.ext:junit:1.0.0'
31
- androidTestImplementation 'androidx.test.ext:truth:1.0.0'
32
- androidTestImplementation 'com.google.truth:truth:0.42'
33
-
34
- // Espresso dependencies
35
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
36
- androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.1.0'
37
- androidTestImplementation 'androidx.test.espresso:espresso-intents:3.1.0'
38
- androidTestImplementation 'androidx.test.espresso:espresso-accessibility:3.1.0'
39
- androidTestImplementation 'androidx.test.espresso:espresso-web:3.1.0'
40
- androidTestImplementation 'androidx.test.espresso.idling:idling-concurrent:3.1.0'
41
-
42
- // The following Espresso dependency can be either "implementation"
43
- // or "androidTestImplementation", depending on whether you want the
44
- // dependency to appear on your APK's compile classpath or the test APK
45
- // classpath.
46
- androidTestImplementation 'androidx.test.espresso:espresso-idling-resource:3.1.0'
47
22
}
48
23
```
49
24
@@ -91,10 +66,12 @@ public class MainActivityTest {
91
66
92
67
You ' ll need to create a test app that enables the Flutter driver extension.
93
68
You can put this in your test_driver/ folder, e.g. test_driver/example.dart.
69
+ Replace `<app_package_name>` with the package name of your app. If you' re
70
+ developing a plugin, this will be the package name of the example app.
94
71
95
72
```dart
96
73
import ' package:flutter_driver/driver_extension.dart' ;
97
- import ' .. / lib / main. dart' as app;
74
+ import ' package:<app_package_name> /main.dart' as app;
98
75
99
76
void main () {
100
77
enableFlutterDriverExtension();
0 commit comments