File tree 4 files changed +31
-2
lines changed
4 files changed +31
-2
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ python3 hello_world_test_2.py -c sample_config.yml
62
62
63
63
python3 hello_world_test_2.py -c sample_config.yml --test_case test_bye test_hello test_bye
64
64
65
+ python3 hello_world_test_2.py -c sample_config_2.yml --test_bed AbcTestBed
65
66
66
67
# -----------------------
67
68
# TEST 2
Original file line number Diff line number Diff line change @@ -16,5 +16,12 @@ def test_hello(self):
16
16
def test_bye (self ):
17
17
self .dut .mbs .makeToast ('Goodbye! >>>>' )
18
18
19
+ def test_favorite_food (self ):
20
+ food = self .user_params .get ('favorite_food' )
21
+ if food :
22
+ self .dut .mbs .makeToast (">>> I'd like to eat %s." % food )
23
+ else :
24
+ self .dut .mbs .makeToast (">>> I'm not hungry." )
25
+
19
26
if __name__ == '__main__' :
20
27
test_runner .main ()
Original file line number Diff line number Diff line change 1
1
TestBeds :
2
- # A test bed where adb will find Android devices.
3
2
- Name : SampleTestBed
4
3
Controllers :
5
- AndroidDevice : ' *'
4
+ AndroidDevice : ' *'
5
+ TestParams :
6
+ favorite_food : Green eggs and ham.
Original file line number Diff line number Diff line change
1
+ # DefaultParams is optional here. It uses yaml's anchor feature to easily share
2
+ # a set of parameters between multiple test bed configs
3
+ DefaultParams : &DefaultParams
4
+ favorite_food : green eggs and ham.
5
+
6
+ TestBeds :
7
+ - Name : XyzTestBed
8
+ Controllers :
9
+ AndroidDevice :
10
+ - serial : xyz
11
+ phone_number : 123456
12
+ TestParams :
13
+ << : *DefaultParams
14
+ - Name : AbcTestBed
15
+ Controllers :
16
+ AndroidDevice :
17
+ - serial : abc
18
+ label : golden_device
19
+ TestParams :
20
+ << : *DefaultParams
You can’t perform that action at this time.
0 commit comments