I have e2e tests which will be triggered to run at midnight. Now I want to send notification to a MS Teams channels when the test fails.
- task: O365PostMessageRelease@0
inputs:
addressType: 'url'
url: 'https://hans.webhook.office.com/webhookb2/cfe11f3f-69ee-4447-ad1b'
messageType: 'message'
title: 'Test Result'
summary: 'test result summary'
text: 'here you can see the last test run results'
includeLink: true
linkText: 'View Release Detail'
the test results are puplished as an artifact like this
- publish: junit-result.xml
artifact: cypress_results_combined
Now I want to send the notification only when the test fails. How could I achieve that?