ARUNDRUK
ARUNDRUK

Reputation: 123

pytest: error: unrecognized arguments: --alluredir

(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

Answers (3)

rajat tyagi
rajat tyagi

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

yee jeff
yee jeff

Reputation: 1

Check if you have installed allure-pytest by pip:

pip list

If not, install it using:

pip install allure-pytest

Upvotes: -1

anthony sottile
anthony sottile

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

Related Questions