You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.
""" Collect result and associated testcases (TestRail) of an execution """
outcome = yield
rep = outcome.get_result()
defectids = None
if item.get_closest_marker(TESTRAIL_DEFECTS_PREFIX):
defectids = item.get_closest_marker(TESTRAIL_DEFECTS_PREFIX).kwargs.get('defect_ids')
if item.get_closest_marker(TESTRAIL_PREFIX):
testcaseids = item.get_closest_marker(TESTRAIL_PREFIX).kwargs.get('ids')
if rep.when == 'call' and testcaseids:
if defectids != None:
self.add_result(
clean_test_ids(testcaseids),
get_test_outcome(outcome.get_result().outcome),
comment=rep.longrepr,
duration=rep.duration,
defects=str(clean_test_defects(defectids)).replace('[', '').replace(']', '').replace("'", '')
)
else:
self.add_result(
clean_test_ids(testcaseids),
get_test_outcome(outcome.get_result().outcome),
comment=rep.longrepr,
duration=rep.duration
)
We add result only if rep.when == 'call', that mean that if we will fail test on setup or teardown, we don't get message that test failed. If test failed at setup - we don't send any message. If test failed at teardown - we send message that test passed.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
We add result only if
rep.when == 'call'
, that mean that if we will fail test on setup or teardown, we don't get message that test failed. If test failed at setup - we don't send any message. If test failed at teardown - we send message that test passed.The text was updated successfully, but these errors were encountered: