Skip to main content

Pytest plugin for interaction with TestRail

Project description

PyPI Downloads PyPI - Python Version Pytest Version

pytest-pytestrail

Pytest plugin for interaction with TestRail

Install

pip install pytest-pytestrail

Example

from pytest_pytestrail import pytestrail


@pytestrail.case('C32')
def test_one():
    assert True

@pytestrail.case('C12')
def test_two():
    assert True

Steps

from pytest_pytestrail import pytestrail

case = pytestrail.steps_case('C3')

@case.step(1)
def test_step_one():
    assert True


@case.step(2)
def test_step_two():
    assert True

Steps parametrize

from pytest_pytestrail import pytestrail
import pytest

@pytest.mark.parametrize('data', pytestrail.params('C84', [1, 23, 33, 1, 57]))
def test_five(data):
    assert data

@pytest.mark.parametrize('data', [pytestrail.param(1, 'C55'), pytestrail.param(2, 'C56')])
def test_six(data):
    assert data
Configuration
Config file

pytest.ini or setup.cfg pytest configuration

[pytest]
pytestrail = True
pytestrail-url = https://example.testrail.com
pytestrail-email = exemle@mail.com
pytestrail-password = password
pytestrail-test-run = 12
pytestrail-no-decorator-skip = True
pytestrail-report = True

or

Command line options
--pytestrail            Enable plugin
--tr-url=URL            TestRail address
--tr-email=EMAIL        Email for the account on the TestRail
--tr-password=PASSWORD  Password for the account on the TestRail
--tr-test-run=12        ID testrun
--tr-no-decorator-skip  Skip tests without decorator
--tr-report             Enable report

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pytest_pytestrail-0.5.0-py3-none-any.whl (9.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page