rhevm-qe-automation / pytest_jira

py.test plugin to integrate with JIRA
GNU General Public License v2.0
29 stars 25 forks source link

How to apply mark.jira to only an iteration of parameterized test #132

Closed tome-autonomous closed 5 months ago

tome-autonomous commented 1 year ago

I am attempting to make one of the test iterations marked with the plugin's custom marker but I am not able to achieve it: This does not work: if test_id == "both_allow": pytest.mark.jira("PD-2366")

It does work using the default pytest markers, which seem to not require using 'mark' in this case: if test_id == "both_allow": pytest.xfail(reason="Not testing both allow")

I am wondering if there is a way to achieve this with the jira marker. It does work if I add the marker to the test itself: @pytest.mark.jira("PD-2366") but then all iterations are affected

lukas-bednar commented 1 year ago

Hello, please try to use a fixture, an example is here: https://github.com/rhevm-qe-automation/pytest_jira#fixture-usage

lukas-bednar commented 5 months ago

Feel free to re-open it if you don't find the suggestion from the above comment helpful.