remove hardcoded test_reports dir
The aim of this PS is to remove hardcoded test_reports dir path so test run can get screenshot dir from the specified configuration. Change-Id: I454ccdccbed93b831c41199481caf8b5eb302337
This commit is contained in:
parent
5ff708aed5
commit
039b208f7f
@ -123,7 +123,7 @@ SeleniumGroup = [
|
||||
help='Timeout in seconds to wait for a page to become available'),
|
||||
cfg.StrOpt(
|
||||
'screenshots_directory',
|
||||
default='integration_tests_screenshots',
|
||||
default='test_reports',
|
||||
help='Output directory for screenshots'),
|
||||
cfg.BoolOpt(
|
||||
'maximize_browser',
|
||||
|
@ -224,9 +224,9 @@ class BaseTestCase(testtools.TestCase):
|
||||
|
||||
@property
|
||||
def _test_report_dir(self):
|
||||
report_dir = os.path.join(ROOT_PATH, 'test_reports',
|
||||
'{}.{}'.format(self.__class__.__name__,
|
||||
self._testMethodName))
|
||||
report_dir = os.path.join(
|
||||
ROOT_PATH, self.CONFIG.selenium.screenshots_directory,
|
||||
'{}.{}'.format(self.__class__.__name__, self._testMethodName))
|
||||
if not os.path.isdir(report_dir):
|
||||
os.makedirs(report_dir)
|
||||
return report_dir
|
||||
|
@ -20,7 +20,7 @@ page_timeout=60
|
||||
|
||||
# Output directory for screenshots.
|
||||
# (string value)
|
||||
screenshots_directory=integration_tests_screenshots
|
||||
screenshots_directory=test_reports
|
||||
|
||||
# Implicit timeout to wait until element become available,
|
||||
# this timeout is used for every find_element, find_elements call.
|
||||
|
Loading…
Reference in New Issue
Block a user