Pytest plugin for interaction with TestRail
Project description
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
Release history Release notifications | RSS feed
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
Close
Hashes for pytest_pytestrail-0.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc1631ec42f85be673b58b5071ab00e53b167d517a03864c12a95aaf2c851a5e |
|
MD5 | 76b68420568cef6f00ba5aa007ae0260 |
|
BLAKE2b-256 | 5a416d8db487432347f70ded7c4b65f8e7f0748df64168709ad231cc30fa9cde |