pytest-testrail
A pytest plugin for creating TestRail runs and adding results
Decision gist · record as of 2026-08-14
Yes, if you use TestRail and pytest together. The plugin has low install friction, permissive licensing, no known vulnerabilities, and is actively maintained (last commit January 2026). The aging maintenance status (201 days since last release) is not a blocker for stable integrations, but verify that your TestRail version and API requirements align before deploying to production.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; TestRail server credentials (URL, email/API key, project/suite IDs) must be configured via config file or command-line options.
- Low install friction with a pure-Python wheel.
- Maintenance status is aging—last release was 201 days ago—but the repository remains active and not archived, with recent commits as of 2026-01-25.
License · maintenance · safety
MIT (permissive) — MIT license (permissive) places no restrictions on use, modification, or distribution for commercial or private projects.
last release 2026-01-25 (201 days) · last repo commit 2026-01-25 · 97 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 123,329 downloads/mo, #11,913 on PyPI
Alternatives
Verify before relying
pip install pytest-testrail
from pytest_testrail.plugin import pytestrail
@pytestrail.case('C1234')
def test_example():
pass
# Run with: pytest --testrail --tr-config=testrail.cfg- Whether automatic retry on rate limiting (HTTP 429) is fully tested under production load.
- Compatibility with TestRail versions older than 6.7 (pagination support requires 6.7+).
- Performance characteristics when handling large test suites with connection pooling.
What it is and what it does
pytest-testrail is a pytest plugin that bridges test execution and TestRail test management. It reads pytest markers to identify which tests should be added to a TestRail test run, executes them, and automatically pushes results back to TestRail. The plugin handles test run creation, result updates, and defect tracking integration.
Version 3.1.1 is a modernized release requiring Python 3.10+, with full type hints, API key authentication (recommended over passwords), connection pooling via requests, automatic retry on rate limiting, and proper exception handling. It depends on pytest and requests, and supports TestRail API pagination for TestRail 6.7+. Configuration is done via INI file or command-line options, and the plugin can be used both as a pytest plugin or as a standalone APIClient for programmatic access.
Use it for
- Automatically create and populate TestRail test runs from pytest test suites marked with @pytestrail.case decorators.
- Push test results back to TestRail after pytest execution, keeping test management synchronized with CI/CD pipelines.
- Link test failures to defects in Jira or other tracking systems using @pytestrail.defect markers.
- Query TestRail data programmatically via the APIClient for custom reporting or test orchestration.
- Handle paginated TestRail API responses when working with large test case inventories.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you use TestRail and pytest together.
The plugin has low install friction, permissive licensing, no known vulnerabilities, and is actively maintained (last commit January 2026). The aging maintenance status (201 days since last release) is not a blocker for stable integrations, but verify that your TestRail version and API requirements align before deploying to production.
Install
pytest-testrail on PyPI
Before you install
Low install friction with a pure-Python wheel. Maintenance status is aging—last release was 201 days ago—but the repository remains active and not archived, with recent commits as of 2026-01-25.
Requires Python 3.10 or later; TestRail server credentials (URL, email/API key, project/suite IDs) must be configured via config file or command-line options.
License in practice
MIT license (permissive) places no restrictions on use, modification, or distribution for commercial or private projects.
Quickstart
pip install pytest-testrail
from pytest_testrail.plugin import pytestrail
@pytestrail.case('C1234')
def test_example():
pass
# Run with: pytest --testrail --tr-config=testrail.cfg
Verify before relying
- Whether automatic retry on rate limiting (HTTP 429) is fully tested under production load.
- Compatibility with TestRail versions older than 6.7 (pagination support requires 6.7+).
- Performance characteristics when handling large test suites with connection pooling.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagespytestrequests |
| Maintenance | Aging 201 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 123,329 / month, #11,913 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableFramework :: PytestIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Software Development :: Quality AssuranceTopic :: Software Development :: TestingTyping :: Typed |
Evidence: pytest_testrail-3.1.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “test rail automation”
- pytest-testrailA pytest plugin that integrates test execution with TestRail,…
- nemoguardrailsAdds programmable guardrails to LLM-based conversational applications…
- genie.libs.sdkGenie Libs SDK provides a library of reusable test triggers and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Testing packages
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.
Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.
Install it if you want to measure test completeness or enforce coverage thresholds in your project.
pytest-asyncio is a pytest plugin that enables writing and running async test functions using the asyncio library, allowing developers to await code directly within test cases.
Install it if you write tests for any asyncio-based code.
A pytest plugin that generates test reports in Common Test Report Format (CTRF) as JSON, compatible with pytest-xdist and pytest-playwright for distributed and browser-based testing.
Install it if you need CTRF-formatted test output for CI/CD integration or cross-tool reporting.
See also pytest-pytestrail · testrail-api · trcli · pytest-ordering · pytest-selenium · pytest-timeout · syrupy · pytest-integration · pytest-ruff · pytest-timeouts