File tree Expand file tree Collapse file tree 3 files changed +37
-1
lines changed
Expand file tree Collapse file tree 3 files changed +37
-1
lines changed Original file line number Diff line number Diff line change 4040
4141``` bash
4242
43+ # https://github.com/google/mobly/blob/master/docs/tutorial.md
44+
45+
4346# -----------------------
4447# TEST 1
4548# -----------------------
@@ -50,6 +53,15 @@ python3 hello_world_test.py -c sample_config.yml
5053python3 test_1.py -c sample_config.yml
5154
5255
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+
5365
5466# -----------------------
5567# 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
88 def setup_class (self ):
99
1010 print (">>> InstrumentationTest start" )
11+ print (">>> android_device = " + str (android_device ))
1112 self .dut = self .register_controller (android_device )[0 ]
13+ print (">>> self.dut = " + str (self .dut ))
1214
1315 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)
1519
1620
1721if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments