Skip to content

Commit

Permalink
write skipped and passed test cases to file
Browse files Browse the repository at this point in the history
Signed-off-by: vavuthu <vavuthu@redhat.com>
  • Loading branch information
vavuthu authored and fbalak committed Jun 14, 2024
1 parent c1a0e3a commit 27d5eca
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ocs_ci/framework/pytest_customization/ocscilib.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,22 @@ def pytest_runtest_makereport(item, call):
) as file:
file.write(f"{test_name}\n")

if rep.passed and rep.when == "call":
test_name = item.nodeid
# Write the passed information to a file
with open(
f'{ocsci_config.ENV_DATA["cluster_path"]}/passed_testcases.txt', "a"
) as file:
file.write(f"{test_name}\n")

if rep.skipped:
test_name = item.nodeid
# Write the skipped information to a file
with open(
f'{ocsci_config.ENV_DATA["cluster_path"]}/skipped_testcases.txt', "a"
) as file:
file.write(f"{test_name}\n")


def set_log_level(config):
"""
Expand Down

0 comments on commit 27d5eca

Please sign in to comment.