Skip to content

Commit 0771ac4

Browse files
committed
Add base URL to report header
1 parent 981d0f1 commit 0771ac4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pytest_base_url/plugin.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ def pytest_configure(config):
4040
config.option.base_url = base_url
4141

4242

43+
def pytest_report_header(config, startdir):
44+
base_url = config.getoption('base_url')
45+
if base_url:
46+
return 'baseurl: {0}'.format(base_url)
47+
48+
4349
def pytest_addoption(parser):
4450
parser.addini('base_url', help='base url for the application under test.')
4551
parser.addoption(

0 commit comments

Comments
 (0)