Skip to content

Commit

Permalink
Merge pull request #5448 from dfe-analytical-services/EES-5705-post-t…
Browse files Browse the repository at this point in the history
…est-zip-to-slack-if-flaky-tests

EES-5705 - post test ZIP if flaky tests exist
  • Loading branch information
duncan-at-hiveit authored Dec 10, 2024
2 parents 9ddeb34 + 2f657da commit 6bbf0f3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/robot-tests/tests/libs/slack.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 6bbf0f3

Please sign in to comment.