6
(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
anthony sottile
  • 61,815
  • 15
  • 148
  • 207
ARUNDRUK
  • 123
  • 1
  • 3
  • 6

3 Answers3

9

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

anthony sottile
  • 61,815
  • 15
  • 148
  • 207
  • Yes !! Your are Correct !! – ARUNDRUK Dec 26 '19 at 17:32
  • 1
    @druk If the answer resolved your issue, please accept it to help other visitors. See [What should I do when someone answers my question?](https://stackoverflow.com/help/someone-answers) – hoefling Dec 28 '19 at 11:23
0

Check if you have installed allure-pytest by pip:

pip list

If not, install it using:

pip install allure-pytest
Mohnish
  • 1,010
  • 1
  • 12
  • 20
yee jeff
  • 1
  • 1
  • I have installed allure-pytest, and it will also listed within "pip list", but when I check the version "allure --version", I get a message "Is not recognized as an internal.....". Do you have any idea how can I solve this problem? – Ghasem Tabatabaei Jun 03 '21 at 07:03
  • I have not encountered this problem,I suggest you use: pip install --upgrade module_name – yee jeff Jul 29 '21 at 00:40
0

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"

  • This isn't very helpful; more information is needed. – JerodG Aug 21 '22 at 16:16
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Aug 21 '22 at 16:16