@@ -44,6 +44,22 @@ def pytest_addoption(parser):
44
44
choices = ('prod' , 'qa' , 'test' ),
45
45
default = 'test' ,
46
46
help = SUPPRESS_HELP )
47
+ parser .addoption ('--with-s3_logging' , action = "store_true" ,
48
+ dest = 'with_s3_logging' ,
49
+ default = False ,
50
+ help = "Use to save test log files in Amazon S3." )
51
+ parser .addoption ('--with-screen_shots' , action = "store_true" ,
52
+ dest = 'with_screen_shots' ,
53
+ default = False ,
54
+ help = "Use to save screenshots on test failure." )
55
+ parser .addoption ('--with-basic_test_info' , action = "store_true" ,
56
+ dest = 'with_basic_test_info' ,
57
+ default = False ,
58
+ help = "Use to save basic test info on test failure." )
59
+ parser .addoption ('--with-page_source' , action = "store_true" ,
60
+ dest = 'with_page_source' ,
61
+ default = False ,
62
+ help = "Use to save page source on test failure." )
47
63
parser .addoption ('--headless' , action = "store_true" ,
48
64
dest = 'headless' ,
49
65
default = False ,
@@ -64,6 +80,10 @@ def pytest_configure(config):
64
80
with_selenium = config .getoption ('with_selenium' )
65
81
with_testing_base = config .getoption ('with_testing_base' )
66
82
with_db_reporting = config .getoption ('with_db_reporting' )
83
+ with_s3_logging = config .getoption ('with_s3_logging' )
84
+ with_screen_shots = config .getoption ('with_screen_shots' )
85
+ with_basic_test_info = config .getoption ('with_basic_test_info' )
86
+ with_page_source = config .getoption ('with_page_source' )
67
87
database_env = config .getoption ('database_env' )
68
88
browser = config .getoption ('browser' )
69
89
log_path = config .getoption ('log_path' )
@@ -85,6 +105,10 @@ def pytest_configure(config):
85
105
config_file .write ("data:::%s\n " % data )
86
106
config_file .write ("with_testing_base:::%s\n " % with_testing_base )
87
107
config_file .write ("with_db_reporting:::%s\n " % with_db_reporting )
108
+ config_file .write ("with_s3_logging:::%s\n " % with_s3_logging )
109
+ config_file .write ("with_screen_shots:::%s\n " % with_screen_shots )
110
+ config_file .write ("with_basic_test_info:::%s\n " % with_basic_test_info )
111
+ config_file .write ("with_page_source:::%s\n " % with_page_source )
88
112
config_file .write ("database_env:::%s\n " % database_env )
89
113
config_file .write ("log_path:::%s\n " % log_path )
90
114
config_file .write ("headless:::%s\n " % headless )
0 commit comments