- webtest: marks a test that uses selenium
- fail: marks a test that should fail
- green: marks a test that should pass
-
Install Python 3 (this also installs the python package-management system - pip)
-
Set up virtual environment
-
Install the
requirements.txtthrough the terminal runpip install -r requirements.txt -
Set up any IDE configurations
{ "python.testing.pytestArgs": [ ".", "--driver", "Chrome" ], "python.testing.unittestEnabled": false, "python.testing.pytestEnabled": true }
Pytest help
pytest --help
Run sample non-selenium tests in a file
pytest -s test/test_class.py
Run selenium tests in a file
pytest ./test_selenium.py --driver Chrome
pytest ./test/test_basic.py --driver Chrome