ci: assign the test_case_name attribute to the case item while setting up a pytest session

This commit is contained in:
Aleksei Apaseev 2023-10-23 18:59:25 +08:00 committed by Fu Hanxi
parent d083a0e313
commit 3ed6c9bed5
No known key found for this signature in database
GPG Key ID: 19399699CF3C4B16

View File

@ -306,6 +306,11 @@ def junit_properties(test_case_name: str, record_xml_attribute: Callable[[str, o
record_xml_attribute('name', test_case_name) record_xml_attribute('name', test_case_name)
@pytest.fixture(autouse=True)
def set_test_case_name(request: FixtureRequest, test_case_name: str) -> None:
request.node.funcargs['test_case_name'] = test_case_name
###################### ######################
# Log Util Functions # # Log Util Functions #
###################### ######################