From 2f657daada55f58d8110cf9bc898c99e71a60aed Mon Sep 17 00:00:00 2001 From: Duncan Watson Date: Tue, 10 Dec 2024 18:23:41 +0000 Subject: [PATCH] EES-5705 - in addition to posting the UI test zip file if suites failed, also post if all tests passed but it took more than 1 run to achieve it. This will help us spot flaky tests. --- tests/robot-tests/tests/libs/slack.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/robot-tests/tests/libs/slack.py b/tests/robot-tests/tests/libs/slack.py index 2c8c40f098..6071874ae9 100644 --- a/tests/robot-tests/tests/libs/slack.py +++ b/tests/robot-tests/tests/libs/slack.py @@ -130,7 +130,9 @@ def send_test_report(self, env: str, suites_ran: str, suites_failed: [], number_ response = self.client.chat_postMessage(channel=self.slack_channel, text="All results", blocks=attachments) - if suites_failed: + # Post the test report if there were test failures or if more than 1 run attempt was necessary in + # order to get all tests to pass. The latter case will help to identify which of our tests are flaky. + if suites_failed or number_of_test_runs > 1: date = datetime.datetime.utcnow().strftime("%Y%m%d-%H%M%S") report_name = f"UI-test-report-{suites_ran.replace('tests/', '')}-{env}-{date}.zip"