Thursday, 18 September 2014

Email XSLT Report Through ANT Automatically

Step -1 : Install ANT and configure from Here


Step -2 : Configure XSLT Report:


1. Download tsetng-xslt-1.1.2.zip file from Here

2. Unzip tsetng-xslt-1.1.2.zip file.

3. Unzip it and copy the testng-results.xsl from testng-xslt1.1.2 folder(testng-xslt1.1.2\src\main\resources\testng-results.xsl). and paste into the project.

4. Now Copy saxon-8.7 and SaxonLiaison library from (testng-xlt1.1.2\lib\saxon-8.7.jar).and paste into the project Jar Folder.

5. Create Build.xml from Here

Step -3 : Sending mail through ANT:


1. Download javax.mail.jar zip from here and javax.activation zip from here
2. Unzip Both file.
3. Copy both jar file and go to your ant lib folder and paste both jar file.
4. In build.xml , I have taken the example of gamil.com and if you may take some other SMTP server and port according to your need. 

How can we run build.xml:


  1. open the command promt .
  2. Go to the your project location.( D:\workspace\GetIt_Project)
  3. Type ant and press enter it is automatically run the build.xml and send the email.

No comments:

Post a Comment