Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

PyTest plugin for TestRail

Project description

pytest-testrail-plugin

PyTest plugin for integration with TestRail

Usage

  1. Installing pip install pytest-testrail-plugin

  2. Create config file .cfg test/testrail_config.cfg:

[API]
url = https://cashwagon.testrail.io
email = name@cashwagon.com
password = pass

[TESTRUN]
project_id = your ID
root_section = directory_name
  1. Use @pytestrail.case() decorator for tests

    from pytest_testrail_plugin.plugin import pytestrail

  2. Use docstring in yaml or json format if you want customize test case

    from pytest_testrail_plugin.plugin import pytestrail
    @pytestrail.case()
    def test_foo():
       """
       title: case title in TestRail
       custom_preconds: preconditions info
       custom_steps: steps info
       custom_expected: this is too long a string 
           to print in a single line
       """
       assert 1 == 1
    
  3. Run test with flags

    py.test --testrail --tr-config=path/to/config/file.cfg

    If you want to delete unused cases and sections use --tr-unsafe flag:

    py.test --testrail --tr-config=path/to/config/file.cfg --tr-unsafe

Project details


Download files

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

Files for pytest-testrail-plugin, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size pytest_testrail_plugin-0.0.3-py3-none-any.whl (12.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pytest_testrail_plugin-0.0.3.tar.gz (11.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page