Open dkjha52 opened 3 years ago
This is not possible at the moment, but you can copy the report to another location using the pytest_reporter_finish hook.
def pytest_reporter_finish(path, context, config):
# Copy or move path to another location
Thanks for the response. Can you please help me to provide sample scripts..
I think you can change report path in this hook. Add below in your conftest.py
def pytest_reporter_context(context, config):
config.option.report[0] = config.option.report[0].replace('.html', str(datetime.datetime.now().strftime(
"%Y-%m-%d-%H-%M-%S")) + '.html')
I want to set the report path from script (conftest.py). Please let me know the scripts for that so i can set --report=report.html from script.