I have to custom @pytest.mark decorator to build xray reports (and push it ...) With the new parametrized tests xray feature, and associated steps, I would like to get every kw called during iteration (marked as a step) hooks documentation is not so clean to me and i don't find how to do this... does anyone have an idea ?
pytest : 6.2.4
Edit :
test example
import pytest
class Test(object):
@pytest.mark.xray(test_key='DEMO-1')
@pytest.mark.parametrize('param1, param2', [(2, 2), (3, 4), (5, 5), (5, 5), (6, "a"), ("aa", "aa")])
def test_pytest_parametrized_feature_d(self, param1, param2):
self.kw_one(param1, param2)
self.kw_three(param1, param2)
assert param1 == param2
def kw_one(self, param1, param2):
self.kw_two(param1, param2)
def kw_two(self, param1, param2):
print(param1)
print(param2)
def kw_three(self, param1, param2):
assert param1 == param2
Expected result : steps : kw_one : PASSED kw_two : PASSED kw_three : FAILED
I expect informations in pytest hooks, like : def pytest_terminal_summary(terminalreporter, exitstatus, config):