Skip to main content

Plugin skips (xfail) tests if unresolved Jira issue(s) linked

Project description


Plugin skips (xfail) test if it's linked to unresolved Jira issue(s)

1. Generate your Jira API token

You should have Jira user with API token generated

2. Add PytestJiraHelper to your pytest hook:

import pytest

from pytest_jira_xfail.jira_helper import PytestJiraHelper

def pytest_collection_modifyitems(items):
    jira = PytestJiraHelper(

3. Link a bug to your test

from pytest_jira_xfail.annotations import bug

def test_my_test_fails():
    assert False

@bug("MP-124", IndexError)
def test_my_test_broken():
    db_records = []
    assert db_records[0]

@bug("MP-124", IndexError)
def test_multiple_exceptions():
    db_records = []
    assert db_records[0][0] == 'active'

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest-jira-xfail-0.0.1.tar.gz (4.1 kB view hashes)

Uploaded source

Built Distribution

Supported by

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