@@ -47,7 +47,13 @@ def pytest_addoption(parser):
47
47
parser .addoption ('--with-testing_base' , action = "store_true" ,
48
48
dest = 'with_testing_base' ,
49
49
default = True ,
50
- help = "Use to save logs (screenshots) when tests fail." )
50
+ help = """Use to save logs and screenshots when tests fail.
51
+ It's no longer needed to add the following arguments:
52
+ --with-screen_shots
53
+ --with-basic_test_info
54
+ --with-page_source
55
+ (Those modes are all active by default now when
56
+ --with-testing_base is active. (Default: active)""" )
51
57
parser .addoption ('--log_path' , dest = 'log_path' ,
52
58
default = 'latest_logs/' ,
53
59
help = 'Where the log files are saved.' )
@@ -70,15 +76,18 @@ def pytest_addoption(parser):
70
76
parser .addoption ('--with-screen_shots' , action = "store_true" ,
71
77
dest = 'with_screen_shots' ,
72
78
default = False ,
73
- help = "Use to save screenshots on test failure." )
79
+ help = """Use to save screenshots on test failure.
80
+ (When "--with-testing_base" is True, this is on.)""" )
74
81
parser .addoption ('--with-basic_test_info' , action = "store_true" ,
75
82
dest = 'with_basic_test_info' ,
76
83
default = False ,
77
- help = "Use to save basic test info on test failure." )
84
+ help = """Use to save basic test info on test failure.
85
+ (When "--with-testing_base" is True, this is on.)""" )
78
86
parser .addoption ('--with-page_source' , action = "store_true" ,
79
87
dest = 'with_page_source' ,
80
88
default = False ,
81
- help = "Use to save page source on test failure." )
89
+ help = """Use to save page source on test failure.
90
+ (When "--with-testing_base" is True, this is on.)""" )
82
91
parser .addoption ('--server' , action = 'store' ,
83
92
dest = 'servername' ,
84
93
default = 'localhost' ,
@@ -146,6 +155,11 @@ def pytest_addoption(parser):
146
155
default = None ,
147
156
help = """Setting this overrides the default wait time
148
157
before each MasterQA verification pop-up.""" )
158
+ parser .addoption ('--save_screenshot' , action = 'store_true' ,
159
+ dest = 'save_screenshot' ,
160
+ default = False ,
161
+ help = """Take a screenshot on last page after the last step
162
+ of the test. (Added to the "latest_logs" folder.)""" )
149
163
parser .addoption ('--timeout_multiplier' , action = 'store' ,
150
164
dest = 'timeout_multiplier' ,
151
165
default = None ,
@@ -182,6 +196,7 @@ def pytest_configure(config):
182
196
sb_config .js_checking_on = config .getoption ('js_checking_on' )
183
197
sb_config .ad_block_on = config .getoption ('ad_block_on' )
184
198
sb_config .verify_delay = config .getoption ('verify_delay' )
199
+ sb_config .save_screenshot = config .getoption ('save_screenshot' )
185
200
sb_config .timeout_multiplier = config .getoption ('timeout_multiplier' )
186
201
187
202
if sb_config .with_testing_base :
0 commit comments