Skip to content

vs-odessa/PythonAutomationTraining

Repository files navigation

PythonAutomationTraining

Description

Project contains tasks for Auomation QA Python Course:

  • Phase 1: Python Basics
  • Phase 2: Working with files
  • Phase 3: UI Testing (Selenium)
  • Phase 4: Reporting (Allure)
  • Phase 5: API Testing with Requests
  • Phase 6: PyTest Parallel Execution

Project Status:

CircleCI

Prerequisites

  • Python 3 is required

  • Install python packages from requirements.txt:

    pip install -r requirements.txt
    
  • Install Allure according to docs: https://docs.qameta.io/allure/

Running tests

There are 3 categories of tests in project - unit, api, ui, marked with the same tags.

Unit tests

pytest -v -m "unit"

API tests

pytest -v -m "api"

UI tests

pytest -v - m "ui"

Creating Allure reports

Add option --alluredir={path_to_allure_reports_dir} at pytest run command. Example:

pytest -v tests_api/ --alluredir=./test-reports/allure

To generate an html report, run command:

allure generate -c ./test-reports/allure -o ./test-reports/allure_html_reports

Running tests in parallel

To run tests in parallel, run command:

pytest -n NUM

Select NUM according to CPU number for your testing host.

About

Lohika Python Automation Training 2019

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages