pytest-jira-xray
pytest plugin to integrate tests with JIRA XRAY
What it is and what it does
pytest-jira-xray is a pytest plugin that bridges automated test execution with JIRA's XRAY test management system. You mark individual pytest tests with JIRA XRAY test IDs using a decorator, run pytest with the --jira-xray flag, and the plugin automatically uploads pass/fail results, comments, and optional evidence back to JIRA. It supports multiple JIRA authentication schemes (basic auth, personal access tokens, client credentials), handles both JIRA Server/DC and Cloud endpoints, and allows grouping multiple test IDs under a single pytest test or linking multiple pytest tests to the same JIRA ID.
The plugin depends only on pytest and requests, making it lightweight to install. Configuration is entirely environment-variable-driven, so it integrates cleanly into CI/CD pipelines without code changes. You can upload to a new test execution, append to an existing one, or create a new execution under a test plan. It also supports defect linking, duplicate test ID handling, and custom result modification via pytest hooks.
Use it for:
- Automatically report pytest test results to JIRA XRAY after each CI/CD run, eliminating manual test status updates.
- Link automated regression tests to JIRA test cases and track execution history across builds and environments.
- Attach test evidence (screenshots, logs) to JIRA test results when tests fail, captured via pytest hooks.
- Manage test execution metadata (environment, version, revision) from environment variables in CI pipelines.
- Support multiple JIRA authentication methods (basic, PAT, client credentials) for different organizational security policies.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A pytest plugin that marks individual tests with JIRA XRAY IDs and uploads their pass/fail results back to JIRA, supporting multiple authentication methods and test execution tracking.
Yes, if you use JIRA XRAY and pytest. The plugin is actively maintained, has no known vulnerabilities, installs with minimal friction, and solves a real integration gap. The permissive license and broad Python version support make it safe for most teams. Install it when you need automated test result reporting to JIRA; skip it if you don't use XRAY or manage test status through other means.
Install
pytest-jira-xray on PyPI
pip
pip install pytest-jira-xrayuv
uv add pytest-jira-xraypoetry
poetry add pytest-jira-xrayInstalling pytest-jira-xray
Before you install
Low friction: pure Python wheel with only pytest and requests as runtime dependencies. Actively maintained with a recent release and no known vulnerabilities.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most organizational contexts.
Quickstart
# Install
pip install pytest-jira-xray
# Mark tests in test_example.py
import pytest
@pytest.mark.xray('JIRA-1')
def test_example():
assert True
# Set environment variables
export XRAY_API_BASE_URL=https://jira.example.com
export XRAY_API_USER=username
export XRAY_API_PASSWORD=password
# Run pytest with plugin
pytest --jira-xray
Requires JIRA XRAY instance with valid credentials and network access; XRAY_API_BASE_URL and authentication environment variables must be set before running pytest.
Verify before relying
- Whether the plugin handles partial test failures gracefully when JIRA connectivity is lost mid-execution
- Performance impact when uploading results for large test suites
- Compatibility with pytest plugins that also modify test reporting or result collection
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — pytest, requests |
| Maintenance | actively maintained — 112 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 164,470/month — #10,547 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pytest_jira_xray-0.9.4-py3-none-any.whl
Keywords: pytest, JIRA, XRAY
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
pytest-jiraA pytest plugin that links test cases to JIRA…
copyleft · top 15,000 on PyPI
pytest-runtime-xfailA pytest plugin that provides a `runtime_xfail`…
permissive · top 15,000 on PyPI
pytest-checkA pytest plugin that allows tests to continue…
unclear · top 5,000 on PyPI
pytest-jsonA pytest plugin that generates JSON reports of…
permissive · top 15,000 on PyPI
cosmic-rayCosmic Ray is a mutation testing tool that…
permissive · top 15,000 on PyPI
pytest-orderingA pytest plugin that lets you control the…
permissive · top 5,000 on PyPI
pytest-azurepipelinesA pytest plugin that automatically formats test…
permissive · top 5,000 on PyPI
pytest-onlyA pytest plugin that runs only tests marked…
permissive · top 15,000 on PyPI
pytest-reportportalA pytest plugin that integrates test execution…
permissive · top 5,000 on PyPI
mypy-boto3-xrayProvides type annotations for boto3's XRay…
permissive · top 5,000 on PyPI