{"id":24431,"library":"pytest-jira","title":"pytest-jira","description":"pytest plugin for JIRA integration using markers. Allows linking test cases to JIRA issues, updating test results, and verifying issue status. Current version 0.3.24, requires Python >=3.9. Maintained irregularly with community contributions.","status":"active","version":"0.3.24","language":"python","source_language":"en","source_url":"https://github.com/rhevm-qe-automation/pytest_jira","tags":["pytest","jira","plugin","testing","integration"],"install":[{"cmd":"pip install pytest-jira","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required plugin host","package":"pytest","optional":false},{"reason":"JIRA REST API client","package":"jira","optional":false},{"reason":"HTTP library used internally","package":"requests","optional":false}],"imports":[{"note":"pytest plugins are auto-discovered; explicit import not needed and may cause issues","wrong":"import pytest_jira","symbol":"pytest_jira","correct":"pytest_plugins = ['pytest_jira']"}],"quickstart":{"code":"import os\n\n# Configure via environment variables (recommended) or pytest.ini\nos.environ['JIRA_URL'] = 'https://your-jira-instance.atlassian.net'\nos.environ['JIRA_USER'] = 'your-email@example.com'\nos.environ['JIRA_PASSWORD'] = os.environ.get('JIRA_PASSWORD', '')\n\n# Or use token authentication:\n# os.environ['JIRA_TOKEN'] = 'your-api-token'\n\n# Mark test with JIRA issue key\nimport pytest\n\n@pytest.mark.jira('PROJECT-123')\ndef test_example():\n    assert 1 + 1 == 2","lang":"python","description":"Basic usage: set environment variables and use @pytest.mark.jira marker."},"warnings":[{"fix":"Remove any explicit import of pytest_jira. The plugin is activated by installing the package.","message":"Plugin auto-registers; do not import pytest_jira directly in test files. Instead, use the marker @pytest.mark.jira('KEY') after installing the package.","severity":"gotcha","affected_versions":">=0.3.0"},{"fix":"Run tests with 'pytest' not 'py.test'.","message":"Using 'py.test' command is deprecated; use 'pytest' instead.","severity":"deprecated","affected_versions":">=0.3.20"},{"fix":"Set JIRA_TOKEN environment variable instead of JIRA_USER/JIRA_PASSWORD if using token auth.","message":"From version 0.3.19, token authentication via JIRA_TOKEN environment variable is supported. In previous versions only basic auth (username/password) was available.","severity":"breaking","affected_versions":"<0.3.19"},{"fix":"Upgrade to >=0.3.23 to avoid JSON parsing errors during connectivity check.","message":"Connectivity check may fail with invalid JSON if JIRA response is not expected format; fixed in 0.3.23.","severity":"gotcha","affected_versions":"<0.3.23"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install pytest-jira' in the correct environment.","cause":"pytest-jira not installed or not in Python environment.","error":"ModuleNotFoundError: No module named 'pytest_jira'"},{"fix":"Ensure 'import pytest' is at top of test file and pytest is installed.","cause":"Missing pytest import or pytest version incompatibility.","error":"AttributeError: module 'pytest' has no attribute 'mark'"},{"fix":"Set JIRA_URL (and JIRA_USER/JIRA_PASSWORD or JIRA_TOKEN) in environment or pytest.ini.","cause":"Required environment variables not configured.","error":"pytest_jira.plugin.PytestJiraError: JIRA URL not set. Set JIRA_URL environment variable or in pytest.ini"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}