Skip to main content

pytest plugin to integrate tests with JIRA XRAY

Project description

pytest-jira-xray

PyPi Build Status codecov

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


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

pytest_jira_xray-0.4.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file pytest_jira_xray-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: pytest_jira_xray-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.7

File hashes

Hashes for pytest_jira_xray-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dae337afc87fdd35f9e3bc5ca246dfbac28739c0aaa48530f80c85117193340b
MD5 ac32cafb1b1510cbbe2cbc4e967778c1
BLAKE2b-256 6bef0ad6f9e1dd87c197d263059e97062c0a4b10ec5b61814a146006ea2bdd01

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page