Unrecognized argument error while generating .html allure report | Selenium Python Forum
G
Gaurav Valera Posted on 24/01/2021

Hi,

I am getting unrecognized argument error while generating .html allure report using following command:

pytest -s --html=C:/Git_Data/automationFrameworks/SelFinal/allureReport/report.html test_a.py

Error in output:

ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: unrecognized arguments: --html=C:/Git_Data/automationFrameworks/SelFinal/allureReport/report.html
  inifile: None
  rootdir: C:\Git_Data\automationFrameworks\SelFinal\projectStructure\testcases

 

Attached files for Envrionment variable, desktop path for allure report and cmd


G
Gaurav Valera Replied on 24/01/2021

Environment variable screenshot

Responsive image

G
Gaurav Valera Replied on 24/01/2021

Desktop Path screenshot

Responsive image

J
Jaspreet Replied on 27/01/2021

Hey, 

You need to have a package in your system to generate the HTML reports directly. The package to be installed is "pytest-html". Use command "pip install pytest-html" on the command prompt. It needs not be set anywhere just install the oackage and run your command to generate HTML report.


G
Gaurav Valera Replied on 31/01/2021

Thanks, it works as expected now.

Please close the ticket.


J
Jaspreet Replied on 01/02/2021

Thank you for update.


Related Posts