Reputation: 123
(PYTEST_test_programs) E:\PYTEST_test_programs\Allure_report1>pytest test_file01.py --alluredir="C:\Users\Admin\Desktop\Resumes\reports"
ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: unrecognized arguments: --alluredir=C:\Users\Admin\Desktop\Resumes\reports
inifile: None
rootdir: E:\PYTEST_test_programs\Allure_report1
Upvotes: 6
Views: 13680
Reputation: 9
for error message : ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...] pytest: error: unrecognized arguments: --alluredir=C:\Users\Admin\Desktop\Resumes\reports inifile: None rootdir: E:\PYTEST_test_programs\Allure_report1 first of all enter inside of the directory where <filename.py> and run the below .
python -m pytest <filename.py> --alluredir="report path"
python -m allure serve "report path"
Upvotes: -1
Reputation: 1
Check if you have installed allure-pytest
by pip
:
pip list
If not, install it using:
pip install allure-pytest
Upvotes: -1
Reputation: 70205
I'm not at all familiar with the allure framework, but it sounds like you're missing the allure-pytest
plugin which provides that command line argument
you probably need to pip install allure-pytest
in whatever environment you're trying to run your tests in
Upvotes: 10