All Projects → allankp → pytest-testrail

allankp / pytest-testrail

Licence: MIT license
pytest plugin for integration with TestRail, for creating testruns and updating results

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to pytest-testrail

pytest-pycodestyle
pytest plugin to run pycodestyle
Stars: ✭ 15 (-82.95%)
Mutual labels:  pytest
publishing-python-packages
Examples and exercises for Publishing Python Packages from Manning Books 🐍 📦 ⬆️
Stars: ✭ 25 (-71.59%)
Mutual labels:  pytest
covdefaults
A coverage plugin to provide sensible default settings
Stars: ✭ 38 (-56.82%)
Mutual labels:  pytest
pytest-docker-tools
Opionated helpers for creating py.test fixtures for Docker integration and smoke testing environments
Stars: ✭ 61 (-30.68%)
Mutual labels:  pytest
pytest-subprocess
Pytest plugin to fake subprocess.
Stars: ✭ 83 (-5.68%)
Mutual labels:  pytest
pytest-mongodb
pytest plugin for mocking MongoDB with fixtures
Stars: ✭ 56 (-36.36%)
Mutual labels:  pytest
PixelTest
Fast, modern, simple iOS snapshot testing written purely in Swift.
Stars: ✭ 56 (-36.36%)
Mutual labels:  testing-tool
pytest-elk-reporter
A plugin to send pytest test results to ELK stack
Stars: ✭ 17 (-80.68%)
Mutual labels:  pytest
drf-chat-server-example
A chat server example used Django REST framework with pytest
Stars: ✭ 15 (-82.95%)
Mutual labels:  pytest
pytest-emoji
A pytest plugin that adds emojis to your test result report 😍
Stars: ✭ 41 (-53.41%)
Mutual labels:  pytest
python-appium-framework
Complete Python Appium framework in 360 degree
Stars: ✭ 43 (-51.14%)
Mutual labels:  pytest
pytest-tap
Test Anything Protocol (TAP) reporting plugin for pytest
Stars: ✭ 34 (-61.36%)
Mutual labels:  pytest
pytest-csv
CSV reporter for pytest.
Stars: ✭ 16 (-81.82%)
Mutual labels:  pytest
volder
volder is powerful Object schema validation lets you describe your data using a simple and readable schema and transform a value to match the requirements
Stars: ✭ 106 (+20.45%)
Mutual labels:  testing-tool
python-pytest-harvest
Store data created during your `pytest` tests execution, and retrieve it at the end of the session, e.g. for applicative benchmarking purposes.
Stars: ✭ 44 (-50%)
Mutual labels:  pytest
salt-toaster
Salt Toaster: An ultimate test suite for Salt
Stars: ✭ 24 (-72.73%)
Mutual labels:  pytest
ipython pytest
Pytest magic for IPython notebooks
Stars: ✭ 33 (-62.5%)
Mutual labels:  pytest
emacs-python-pytest
run pytest inside emacs
Stars: ✭ 105 (+19.32%)
Mutual labels:  pytest
pytest-datafixtures
Data fixtures for pytest made simple
Stars: ✭ 24 (-72.73%)
Mutual labels:  pytest
TorXakis
A tool for Model Based Testing
Stars: ✭ 40 (-54.55%)
Mutual labels:  testing-tool

pytest-testrail

PyPI version Downloads Codacy Badge

This is a pytest plugin for creating/editing testplans or testruns based on pytest markers. The results of the collected tests will be updated against the testplan/testrun in TestRail.

Installation

pip install pytest-testrail

Configuration

Config for Pytest tests

Add a marker to the tests that will be picked up to be added to the run.

    from pytest_testrail.plugin import testrail

    @testrail('C1234', 'C5678')
    def test_foo():
        # test code goes here

    # OR	

    from pytest_testrail.plugin import pytestrail

    @pytestrail.case('C1234', 'C5678')
    def test_bar():
        # test code goes here

Or if you want to add defects to testcase result:

    from pytest_testrail.plugin import pytestrail

    @pytestrail.defect('PF-524', 'BR-543')
    def test_bar():
        # test code goes here

Config for TestRail

  • Settings file template config:
    [API]
    url = https://yoururl.testrail.net/
    email = [email protected]
    password = <api_key>

    [TESTRUN]
    assignedto_id = 1
    project_id = 2
    suite_id = 3
    plan_id = 4
    description = 'This is an example description'

    [TESTCASE]
    custom_comment = 'This is a custom comment'

Or

  • Set command line options (see below)

Usage

Basically, the following command will create a testrun in TestRail, add all marked tests to run. Once the all tests are finished they will be updated in TestRail:

    py.test --testrail --tr-config=<settings file>.cfg

All available options

option description
--testrail Create and update testruns with TestRail
--tr-config Path to the config file containing information about the TestRail server (defaults to testrail.cfg)
--tr-url TestRail address you use to access TestRail with your web browser (config file: url in API section)
--tr-email Email for the account on the TestRail server (config file: email in API section)
--tr-password Password for the account on the TestRail server (config file: password in API section)
--tr-testrun-assignedto-id ID of the user assigned to the test run (config file:assignedto_id in TESTRUN section)
--tr-testrun-project-id ID of the project the test run is in (config file: project_id in TESTRUN section)
--tr-testrun-suite-id ID of the test suite containing the test cases (config file: suite_id in TESTRUN section)
--tr-testrun-suite-include-all Include all test cases in specified test suite when creating test run (config file: include_all in TESTRUN section)
--tr-testrun-name Name given to testrun, that appears in TestRail (config file: name in TESTRUN section)
--tr-testrun-description Description given to testrun, that appears in TestRail (config file: description in TESTRUN section)
--tr-run-id Identifier of testrun, that appears in TestRail. If provided, option "--tr-testrun-name" will be ignored
--tr-plan-id Identifier of testplan, that appears in TestRail (config file: plan_id in TESTRUN section) If provided, option "--tr-testrun-name" will be ignored
--tr-version Indicate a version in Test Case result.
--tr-no-ssl-cert-check Do not check for valid SSL certificate on TestRail host
--tr-close-on-complete Close a test plan or test run on completion.
--tr-dont-publish-blocked Do not publish results of "blocked" testcases in TestRail
--tr-skip-missing Skip test cases that are not present in testrun
--tr-milestone-id Identifier of milestone to be assigned to run
--tc-custom-comment Custom comment, to be appended to default comment for test case (config file: custom_comment in TESTCASE section)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].