This article explains the implementation of how to send an Automation execution report using Sendgrid. Implementing sending email option on test completion is good when stakeholders are interested in following up and understanding how stable is the application.
Pre-requisite:
create account at Sendgrid and generate api token. Sendgrid provides different plans to opt for. For testing, You can opt for free 100 emails/day plan.
Project Background:
Its a page object framework using Selenium Webdriver and TestNG. Tests are triggered with the help of a docker container and Kubernetes. Following dependencies are required to generate extent reports and send it as emails
Below code, the snippet is class which is used to send the report from its location via email. Make sure to update required fields like sender, recipient address and API key
Originally Posted @ mkken.github.io
Image by: Muhammad Ribkhan @ Pixabay