Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Summary of repo

Task 9 Pytest

Repo is dedicated for testing Website automationexercise using pytest, playwright, allure.

Requirements

Among requirements are installing project, pytest, faker, any code editor, python and allure.

Setup

  • 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 faker

Run tests

Run all tests:

pytest

Run tests of particular file

pytest tests/register_test.py

Run certain test:

pytest -v tests/basic_pages_test.py::test_verify_scroll_up_using_arrow_button_and_scroll_down_functionality

Run tests with Firefox:

pytest --browser=firefox

Run tests with WebKit:

pytest --browser webkit

Run tests parallelly

pytest -n 3

Create a report

Run to build an allure_result

pytest --alluredir=allure-results

Run to build a reporter

allure serve allure-results

Releases

Packages

Used by

Contributors

Languages