pachamaker / base_api_testing

Base architecture of API autotesting framework with requests, pytest and yandex allure

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

REST API Testing Framework

Requirements

Python 3.6
Allure 1.4+

Installation

Execute script:

sh prepare_env.sh

For running all tests, execute:

py.test

Running tests by Category

You can use pytest fixture for add category to your test, for example:

@pytest.mark.categories(component='logo', suite='smoke', country=['ru','uk'])

So test, which has component=log and country=ru, will be found via pytest, other tests will be skipped. This tests can be running via command

py.test --categories "component=logo,country=ru"

Reporting

We will be use Allure reporting, because it is informative report and it is easy to integrate. Run pytest with additional parameter alluredir. In this folder allure will be generating XML and other files.

py.test --alluredir ./var

For generating allure report locally, you can use Allure Commandline Generate & open report:

allure generate ./var
allure open

About

Base architecture of API autotesting framework with requests, pytest and yandex allure


Languages

Language:Python 99.0%Language:Shell 1.0%