pytest plugin to integrate tests with JIRA XRAY
Project description
pytest-jira-xray
pytest-jira-xray is a plugin for pytest that uploads test results to JIRA XRAY.
Installation
pip install pytest-jira-xray
or
python setup.py install
Usage
Mark a test with JIRA XRAY test ID
# -- FILE: test_example.py
import pytest
@pytest.mark.xray('JIRA-1')
def test_one():
assert True
Jira Xray configuration can be provided via Environment Variables:
- Jira base URL:
$ export XRAY_API_BASE_URL=<Jira base URL>
- Basic authentication:
$ export XRAY_API_USER=<jria username>
$ export XRAY_API_PASSWORD=<user password>
- SSL Client Certificate
To disable SSL certificate verification, at the client side (no case-sensitive), default is True:
$ export XRAY_API_VERIFY_SSL=False
Or you can provide path to certificate file
$ export XRAY_API_VERIFY_SSL=</path/to/PEM file>
- Cloud authentication:
$ export XRAY_CLIENT_ID=<client id>
$ export XRAY_CLIENT_SECRET=<client secret>
Upload results
- Upload results to new test execution:
$ pytest --jira-xray
- Upload results to existing test execution:
$ pytest --jira-xray --execution TestExecutionId
- Upload results to existing test plan (new test execution will be created):
$ pytest --jira-xray --testplan TestPlanId
- Use with Jira cloud:
$ pytest --jira-xray --cloud
- Store results in a file instead of exporting directly to a XRAY server
$ pytest --jira-xray --xraypath=xray.json
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for pytest_jira_xray-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6580fdb7f640eb875d9773791c23439258820391255727e7b82e64a7d372514e |
|
MD5 | 7d3202a854e4d2d3a1e03014b2fbd0d5 |
|
BLAKE2b-256 | a83d3f4e4d647a0f9e79123f995001860ec602c2b3c62b1ea5feb056f4114d9e |