1

I am using pytest-testrail in order to publish some python test cases to testrail. I have a couple test cases that are flaky and use the "@pytest.mark.flaky" in order to rerun the test cases that fail. After the rerun, some test cases will pass (meaning the case failed once and passed on the rerun), but pytest-testrail will publish the failed run on top (meaning the test case will be marked as failed). I can only think of two ways to fix this, either find a way to published the passed run first or find a way to only published the passed run. I do not know how I could perform either of these. Overall, I would like to publish the test case as passed if one of the reruns succeeds.

kamakani
  • 11
  • 2

1 Answers1

0

TestRail supports two methods on how to submit test results via the API:

  • get_results_for_case (get Failed for the existing case)
  • add_result_for_case (update Passed for the existing case)

I hope this helps.

Reference:

thuantp J
  • 13
  • 5