skillfed

pytest-pytestrail

Pytest plugin for interaction with TestRail

pytest-pytestrail v0.10.5 565.7K downloads/30d#5,973 on PyPI3
Permissive license MIT License Abandoned released

What it is and what it does

pytest-pytestrail is a pytest plugin that bridges your test suite to TestRail, a test case management platform. It lets you decorate individual pytest test functions with TestRail case IDs, then automatically report pass/fail results back to TestRail during test execution. You can also organize tests into steps, parametrize them with multiple data sets, and create named test runs with metadata like milestones and descriptions.

The plugin is configured through pytest.ini, setup.cfg, environment variables, or command-line flags. It handles authentication to TestRail, manages test run lifecycle (creation, result reporting, optional closure on completion), and supports timezone handling and custom date formatting. However, the package has been abandoned since early 2022 and receives no updates, so compatibility with newer pytest or TestRail API versions is not guaranteed.

Use it for:

  • Automatically sync pytest test results to TestRail after each test run without manual reporting.
  • Link automated tests to TestRail case IDs so test execution history is tracked in your test management system.
  • Organize multi-step tests in pytest and report each step's result separately to TestRail.
  • Parametrize pytest tests and report each parameter variant as a distinct TestRail case result.
  • Create and close TestRail test runs programmatically from CI/CD pipelines during automated testing.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A pytest plugin that decorates test functions to report results to TestRail, linking individual test cases by ID and optionally creating test runs with parametrized steps.

No—not for new projects. The package is abandoned (last update 2020-08-27, repository archived), so it will not receive bug fixes or compatibility updates. If you need TestRail integration with pytest, consider actively maintained alternatives or evaluate whether the risk of incompatibility with future pytest and TestRail API versions is acceptable for your use case. Only install if you are maintaining legacy code already using this plugin and cannot migrate.

Install

pytest-pytestrail on PyPI

pip

pip install pytest-pytestrail

uv

uv add pytest-pytestrail

poetry

poetry add pytest-pytestrail

Installing pytest-pytestrail

Before you install

Low install friction with only two runtime dependencies (pytest and testrail-api). However, the package is abandoned—last commit was 2022-01-15 and the repository is archived. No updates have been released since 2020-08-27, meaning it will not receive bug fixes or compatibility updates for newer pytest or TestRail API versions.

License in practice

MIT License (permissive) means you can use, modify, and distribute the package freely with minimal restrictions, though you should include the license notice.

Quickstart

pip install pytest-pytestrail

from pytest_pytestrail import pytestrail

@pytestrail.case('C32')
def test_one():
    assert True

Requires TestRail account credentials (TESTRAIL_URL, TESTRAIL_EMAIL, TESTRAIL_PASSWORD) set via environment variables or pytest configuration file.

Verify before relying

  • Whether the package remains compatible with current TestRail API versions and recent pytest releases.
  • Whether testrail-api dependency has active maintenance and security updates.
  • Whether SSL certificate validation bypass (--tr-no-ssl-check) introduces security risks in production environments.

Package facts

License MIT License (permissive)
Python support supports the current Python release (>=3.5)
Install friction low — pure-Python wheel
Runtime dependencies 2 — pytest, testrail-api
Maintenance abandoned — 2,178 days since the last release
Last repo commit (repository archived)
First released
Downloads 565,669/month — #5,973 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pytest_pytestrail-0.10.5-py2.py3-none-any.whl

Keywords: testrail, pytest, pytest-testrail, pytest-pytestrail, testrail_api, api

Development Status :: 4 - BetaEnvironment :: PluginsFramework :: PytestIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: ImplementationProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Quality AssuranceTopic :: Software Development :: Testing

Tags

pytest testrail integrationreport test results to testrailpytest plugin testrailtestrail test case decoratorautomated test reportingpytest testrail apitest case management integration
test-reportingtestrail-integrationabandoned

More Testing packages