Repo is dedicated for testing Website automationexercise using pytest, playwright, allure.
Among requirements are installing project, pytest, faker, any code editor, python and allure.
-
Install any code editor (VS Code) or IDE
-
Install python
https://www.python.org/downloads/
-
Clone the project:
git clone https://github.com/BilikSergey/Task-9-Pytest.git- Install dependencies:
pipenv install --dev- Install python package:
py -m ensurepip --upgrade- Install package manager:
pip install pipenv- Create an isolated environment:
pipenv shell- Install pytest-playwright
pipenv install pytest-playwright- Install browsers:
playwright install- Install next pytest packages for running parallel tests:
pip install pytest pytest-xdist- Install allure and commandline for it
pip install allure-pytest
https://github.com/allure-framework/allure2/releases- Install faker.
pip install fakerRun all tests:
pytestRun tests of particular file
pytest tests/register_test.pyRun certain test:
pytest -v tests/basic_pages_test.py::test_verify_scroll_up_using_arrow_button_and_scroll_down_functionalityRun tests with Firefox:
pytest --browser=firefoxRun tests with WebKit:
pytest --browser webkitRun tests parallelly
pytest -n 3Run to build an allure_result
pytest --alluredir=allure-resultsRun to build a reporter
allure serve allure-results