File tree 3 files changed +37
-1
lines changed
3 files changed +37
-1
lines changed Original file line number Diff line number Diff line change 40
40
41
41
``` bash
42
42
43
+ # https://github.com/google/mobly/blob/master/docs/tutorial.md
44
+
45
+
43
46
# -----------------------
44
47
# TEST 1
45
48
# -----------------------
@@ -50,6 +53,15 @@ python3 hello_world_test.py -c sample_config.yml
50
53
python3 test_1.py -c sample_config.yml
51
54
52
55
56
+ # -----------------------
57
+ # TEST 2
58
+ # -----------------------
59
+
60
+ # should see words popup at device monitor
61
+ python3 hello_world_test_2.py -c sample_config.yml
62
+
63
+ python3 hello_world_test_2.py -c sample_config.yml --test_case test_bye test_hello test_bye
64
+
53
65
54
66
# -----------------------
55
67
# TEST 2
Original file line number Diff line number Diff line change
1
+ from mobly import base_test
2
+ from mobly import test_runner
3
+ from mobly .controllers import android_device
4
+
5
+
6
+ class HelloWorldTest (base_test .BaseTestClass ):
7
+
8
+ def setup_class (self ):
9
+ self .ads = self .register_controller (android_device )
10
+ self .dut = self .ads [0 ]
11
+ self .dut .load_snippet ('mbs' , android_device .MBS_PACKAGE )
12
+
13
+ def test_hello (self ):
14
+ self .dut .mbs .makeToast ('Hello World!' )
15
+
16
+ def test_bye (self ):
17
+ self .dut .mbs .makeToast ('Goodbye! >>>>' )
18
+
19
+ if __name__ == '__main__' :
20
+ test_runner .main ()
Original file line number Diff line number Diff line change @@ -8,10 +8,14 @@ class InstrumentationTest(base_instrumentation_test.BaseInstrumentationTestClass
8
8
def setup_class (self ):
9
9
10
10
print (">>> InstrumentationTest start" )
11
+ print (">>> android_device = " + str (android_device ))
11
12
self .dut = self .register_controller (android_device )[0 ]
13
+ print (">>> self.dut = " + str (self .dut ))
12
14
13
15
def test_instrumentation (self ):
14
- self .run_instrumentation_test (self .dut , 'com.example.package.test' )
16
+ print ("dummy test_instrumentation run" )
17
+ #self.run_instrumentation_test(self.dut, 'com.example.package.test')
18
+ #self.dut.run_instrumentation_test('self.dut', android_device.MBS_PACKAGE)
15
19
16
20
17
21
if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments