Skip to content

Associate one function with multiple Tests

Use the passing example from the tutorial.

Automatic case generation assigns exactly one Test per combination and rejects manual xray markers. Ordinary manual mapping remains available for existing one-to-one cases: @pytest.mark.xray('DEMO-101') with --jira-xray --execution=DEMO-1 (or the complete command python -m pytest --jira-xray --xraypath=results.json for offline export). Never share a key between cases. Multiple distinct manual keys can represent the same ordinary test where intended; this does not enable parameter aggregation. Manual mode does not create Tests.

For a complete offline manual example, temporarily replace test_example.py:

import pytest

@pytest.mark.xray('DEMO-101')
def test_manual():
    assert True
python -m pytest --jira-xray --xraypath=results.json

This writes manual Xray JSON without contacting Jira. --xraypath alone does not enable the publisher. Restore the two-case example for automatic mapping.