Skip to main content

Pytest plugin for interaction with TestRail, Pytest plugin for TestRail (internal fork with PR #25 fix)

Project description

PyPI Downloads PyPI - Python Version PyPI - Implementation Pytest Version Build Status codecov

pytest-pytestrail

Pytest plugin for interaction with TestRail

Install

pip install pytest-pytestrail-internal

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

Support environment variables

  • TESTRAIL_URL
  • TESTRAIL_EMAIL
  • TESTRAIL_PASSWORD
Config file

pytest.ini or setup.cfg pytest configuration

[pytest]
pytestrail (bool):                       Enable plugin
pytestrail-url (string):                 TestRail address
pytestrail-email (string):               Email for the account on the TestRail
pytestrail-password (string):            Password for the account on the TestRail
pytestrail-test-run (string):            ID testrun
pytestrail-no-decorator-skip (bool):     Skip tests without decorator
pytestrail-report (bool):                Enable report
pytestrail-no-ssl-check (bool):          Do not check for valid SSL certificate on TestRail host
pytestrail-project-id (string):          ID of the project
pytestrail-suite-id (string):            ID of the test suite
pytestrail-testrun-name (string):        Name given to testrun, that appears in TestRail
pytestrail-date-format (string):         Date format (default: %Y-%m-%d %H:%M:%S)
pytestrail-tz-local (bool):              Use local time zone (Default: UTC)
pytestrail-close-on-complete (bool):     Close test run on completion
pytestrail-milestone-id (string):        Set test tun milestone
pytestrail-testrun-description (string): Description given to testrun, that appears in TestRail

or

Command line options
--pytestrail                                    Enable plugin
--tr-url=TR_URL                                 TestRail address
--tr-email=TR_EMAIL                             Email for the account on the TestRail
--tr-password=TR_PASSWORD                       Password for the account on the TestRail
--tr-test-run=TR_TEST_RUN                       ID testrun
--tr-no-decorator-skip                          Skip tests without decorator
--tr-report                                     Enable report
--tr-no-ssl-check                               Do not check for valid SSL certificate on TestRail host
--tr-project-id=TR_PROJECT_ID                   ID of the project
--tr-suite-id=TR_SUITE_ID                       ID of the test suite
--tr-testrun-name=TR_TESTRUN_NAME               Name given to testrun, that appears in TestRail
--tr-date-format=TR_DATE_FORMAT                 Date format (default: %Y-%m-%d %H:%M:%S)
--tr-tz-local                                   Use local time zone (Default: UTC)
--tr-close-on-complete                          Close test run on completion
--tr-milestone-id=TR_MILESTONE_ID               Set test tun milestone
--tr-testrun-description=TR_TESTRUN_DESCRIPTION Description given to testrun, that appears in TestRail

Project details


Download files

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

Source Distribution

pytest_pytestrail_internal-0.0.1.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_pytestrail_internal-0.0.1-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file pytest_pytestrail_internal-0.0.1.tar.gz.

File metadata

File hashes

Hashes for pytest_pytestrail_internal-0.0.1.tar.gz
Algorithm Hash digest
SHA256 6dff73fa07fa81ab48506b40e0c04078d0f6359c61372888ab686b5cce2cd405
MD5 0a30b732fdfe84926006270096c7b221
BLAKE2b-256 3622c52546685c8cc87fdd16f8ff117c0b23fe5548eb58f19cffb66a86e93070

See more details on using hashes here.

File details

Details for the file pytest_pytestrail_internal-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_pytestrail_internal-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 32471e8526a807d3e0b3f29b165c07863af199a21e8fdb9f43e746bca61c21ae
MD5 84c91d09fee0b6f321b59500583438f8
BLAKE2b-256 75b49c650540f3bcd7fd0b5fdf1b0371b0f981437787708e02ed675b77f46ac4

See more details on using hashes here.

Supported by

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