@@ -47,7 +47,13 @@ def pytest_addoption(parser):
4747 parser .addoption ('--with-testing_base' , action = "store_true" ,
4848 dest = 'with_testing_base' ,
4949 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)""" )
5157 parser .addoption ('--log_path' , dest = 'log_path' ,
5258 default = 'latest_logs/' ,
5359 help = 'Where the log files are saved.' )
@@ -70,15 +76,18 @@ def pytest_addoption(parser):
7076 parser .addoption ('--with-screen_shots' , action = "store_true" ,
7177 dest = 'with_screen_shots' ,
7278 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.)""" )
7481 parser .addoption ('--with-basic_test_info' , action = "store_true" ,
7582 dest = 'with_basic_test_info' ,
7683 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.)""" )
7886 parser .addoption ('--with-page_source' , action = "store_true" ,
7987 dest = 'with_page_source' ,
8088 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.)""" )
8291 parser .addoption ('--server' , action = 'store' ,
8392 dest = 'servername' ,
8493 default = 'localhost' ,
@@ -146,6 +155,11 @@ def pytest_addoption(parser):
146155 default = None ,
147156 help = """Setting this overrides the default wait time
148157 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.)""" )
149163 parser .addoption ('--timeout_multiplier' , action = 'store' ,
150164 dest = 'timeout_multiplier' ,
151165 default = None ,
@@ -182,6 +196,7 @@ def pytest_configure(config):
182196 sb_config .js_checking_on = config .getoption ('js_checking_on' )
183197 sb_config .ad_block_on = config .getoption ('ad_block_on' )
184198 sb_config .verify_delay = config .getoption ('verify_delay' )
199+ sb_config .save_screenshot = config .getoption ('save_screenshot' )
185200 sb_config .timeout_multiplier = config .getoption ('timeout_multiplier' )
186201
187202 if sb_config .with_testing_base :
0 commit comments