Home Java Overview Maven Tutorials

Tuesday, 6 February 2018

Send Reports Automatically to Email using Maven from Eclipse

Hell Friends,

In this article we will discuss

How to Send Reports Automatically to Email using Maven from Eclipse by Post-Man plugin

For Video :

Click here

This is very simple, you just need to add some plugin & remaining things will be same.
So steps will be as below :
Step 1 : Create a Maven Project.
Step 2 : Add Dependency as below in your POM.xml file.
Step 3 : Update the project.
Step 4 : Convert your Execution file to TestNG xml file & place it in main source folder(if using below plugins).
Step 5 : Set email address & report path.
Step 6 : Now Run your POM.xml file.

To Download the complete plugin in notepad click the below link :

click here

Alternatively, one can copy the below plugin & paste in his Maven Pom.xml file.

<project xmlns="" xmlns:xsi="" xsi:schemaLocation="">
<!-- -->
<!-- -->
<id>send a mail</id>
<!-- From Email address -->
<!-- Email subject -->
<subject>Test Automation Report</subject>
<!-- Fail the build if the mail doesnt reach -->
<!-- host -->
<!-- port of the host -->
<!-- Email Authentication(USername and Password) -->
<mailuser>Enter email id here</mailuser>
<mailpassword>Enter password here</mailpassword>
<!-- To Email address -->
<!-- Report directory Path -->
<!-- Report file name -->
<!-- Use Regular Expressions like **/*.html if you want all the html files to send-->

Here is the sample code

package com.lang.Execution;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import com.relevantcodes.extentreports.ExtentReports;
import com.relevantcodes.extentreports.ExtentTest;
import com.relevantcodes.extentreports.LogStatus;
public class ReportTest
WebDriver driver;
ExtentReports report;
ExtentTest logger;
public void navigate() throws InterruptedException, IOException
System.setProperty("", "D:\\Selenium\\Complete selenium\\ChromeDriver\\chromedriver.exe");
driver=new ChromeDriver();
report=new ExtentReports("./Reports/TestReport.html");
@Test(priority = 0)
public void title()
logger.log(LogStatus.INFO, "test started ");
System.out.println("Your Title is :" + driver.getTitle());
String title = driver.getTitle();
if(title.equalsIgnoreCase(" Online Software Testing: Software Testing"))
logger.log(LogStatus.PASS, "Test Verified");
logger.log(LogStatus.FAIL, "Test Failed");
//Flush the data to report
@Test(priority = 1)
public void clicklink(){
//Create object for Report with filepath
//report=new ExtentReports("./Reports/TestReport.html");
//Start the test
//Log the status in report
logger.log(LogStatus.INFO, "Test started ");
//Pass the test in report
logger.log(LogStatus.PASS, "Link Verified");
//End the test
//Flush the data to report

Tags :

how to send report through email in selenium webdriver,Sending Selenium Reports through mail,
Advance Selenium Reporting- Selenium Webdriver tutorial How to Send a Report via Email in selenium,
How to generate and send HTML reports using Selenium WebDriverSend Reports Automatically to Email using Maven from Eclipse
Robotically Send Test Reports via Mail Using Maven Postman PluginHow to send Test result to email using maven by postman plugin
how do i send a email test report from maven,How to send an automated email with test reports using Maven and TestNG,


  1. How to Send Reports Automatically to Email using Maven from Eclipse by Post-Man plugin for negative test cases

  2. This is really a nice and informative, containing all information and also has a great impact on the new technology. Thanks for sharing it Email Database

  3. After you have identified your market you are now ready to make your first communication with them. Email List

  4. Impressive web site, Distinguished feedback that I can tackle. Im moving forward and may apply to my current job as a pet sitter, which is very enjoyable, but I need to additional expand. Regards. Workflow Management

  5. Thanks For sharing this Superb article.I use this Article to show my assignment in is useful For me Great Work. email list

  6. i really like this article please keep it up.
    business email

  7. I was reading some of your content on this website and I conceive this internet site is really informative ! Keep on putting up. como abrir correo hotmail

  8. Thanks for the blog loaded with so many information. Stopping by your blog helped me to get what I was looking for. fraud detection