Skip to main content

Posts

Showing posts from June, 2022

Publish test results to Microsoft Teams, Slack and many more

  A simple, extendable, and nice alerting tool to forward the test results from your CI/CD environment to different entities like teams or Slack: https://test-results-reporter.github.io/ It publishes test results from test frameworks like JUnit, TestNG, and xUnit.  GitHub link: https://github.com/test-results-reporter/reporter #alerts #automation #reporting #slack #teams #webhooks Enjoyed reading this article? Please share the knowledge with your friends and colleagues.

Want to share Test Results to MS Teams using AdaptiveCards.io?

Steps to follow: Microsoft Teams WebHook: Follow this  https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook to create a webhook. Capture the  URL you will get from Step # 5 from the above article for Posting the Results in MS teams. Select a design from https://adaptivecards.io/samples/ or you can take the one that I created here:  https://github.com/dgambhir01/AdaptiveCards/blob/main/src/main/java/listeners/ResultBuilder.java Now implement the Builder Class and a POJO Class. Sample code:  https://github.com/dgambhir01/AdaptiveCards/blob/main/src/main/java/listeners/CardBodyStructure.java Last but not least add a Listener Class to send Results on Finish. Sample code:  https://github.com/dgambhir01/AdaptiveCards/blob/main/src/main/java/listeners/ResultListener.java Now you can add the above TestNG Listener to your TestNG XML File and run your test cases.  After the Execution, you should see your test results like: