Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

pytest plugin for creating TestRail runs and adding results

Project Description

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


pip install pytest-testrail


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

Settings file template cfg:

url =
email =
password = password

assignedto_id = 1
project_id = 1
suite_id = 1


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

This will create a test run in TestRail, add all marked tests to run. Once the all tests are finished they will be updated in TestRail.

--tr_name='My Test Run'

Testruns can be named using the above flag, if this is not set a generated one will be used. ‘ Automation Run “timestamp” ‘


This flag can be used prevent checking for a valid SSL certificate on TestRail host.

Release History

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pytest-testrail-1.0.0.tar.gz (5.6 kB) Copy SHA256 Checksum SHA256 Source Oct 19, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting