/playwright-pytest-example

Example of e2e web tests ptoject using Python, Playwright and Pytest with Allure reporting and attaching video files to allure report

Primary LanguagePythonApache License 2.0Apache-2.0

Playwright Pytest Example Project

Build Status Free

Last Published results:

Allure Report on Github Pages

Running Tests

Go to test directory

Run Tests in 1 thread

pytest login_tests.py --headful

Run Tests in parallel

pipenv install pytest-xdist
cd test
pytest login_tests.py registration_tests.py article_tests.py --headful -n 3

Run With Allure Report in parallel

cd test
pytest login_tests.py article_tests.py registration_tests.py --headful --alluredir=./allure-results -n 3
allure generate
allure serve allure-results

Run tests on all browser engines (chromium, firefox, webkit)

# Note!!!!
# Make sure that "@pytest.mark.only_browser" decorators are commented under the tests

pytest article_tests.py --browser chromium --browser firefox --browser webkit --headful -n 3