Hi I have the following project architecture, I am using selenium with pytest
- From the terminal, when I am at the root folder, I can not run one the tests inside the folder "\tests"
- As far as you know Pytest should be able to discover all tests in the subfolders or I am getting this wrong?
The command I am using is: (venv) C:\Users\Mike\PycharmProjects\UI_Selenium_Framework> pytest test_logib_logout.py I am getting ERROR: file not found: test_login_logout.py
And when I run (venv) C:\Users\Mike\PycharmProjects\UI_Selenium_Framework> pytest pytest discovers all tests inside "\tests" and run it successfully
The easiest way is to open the terminal in the folder where the pytest files are saved and run the command.
In your case the command should look like this:
You can also generate an html report (if you have
pytest-html
plugin installed) by running the commandpytest test_logib_logout.py --html=testreport.html