• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how do i send a email test report from maven

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any idea of which plugin to use in pom.xml and other changes required for it?
 
linda russel
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator




this is my pom.xml file
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This should help: http://doc.fortysix.ch/maven/maven-postman-plugin/surefire-mail-mojo.html
 
linda russel
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is there anything else i should do in order to get the email other than adding the above mentioned postman plugin to my pom.xml


 
linda russel
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator



why am not recieving any emails??
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your configuration seems correct (at least according to http://support.google.com/mail/bin/answer.py?hl=en&answer=13287)

Does running with -X provide any clues? Have you tried the same settings in another app?

As an aside, I wouldn't send email from Maven itself. I'd have Jenkins fire off the build and send an email after it was completed. That way only official builds would result in email notifications. Or just let interested parties subscribe to the RSS feed for the job in Jenkins. Or they could subscribe to the RSS feeds in Nexus (which is where we deploy our artifacts).
 
linda russel
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I ran mvn test command from the command line.

one more thing is that i am still not sure that from which location the Test reports will be fetched if at all it is fetched in the first place!!!

Do i need to run any other command in order to get the email of test reports.

is the port number correct for the emai??
 
Bartender
Posts: 1051
5
Hibernate Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Linda

You have defined your plugin to run under the 'deploy' phase. However, you are only running up to 'test' so no attempt to send the email is made.

Try mvn clean deploy instead.
 
linda russel
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator



i changed the phase to site and it downloaded some required plugins but i get the error as above
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you try running with -X to see if that provides additional details on the error. Looks like there is something wrong with the configuration.
 
linda russel
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is it like mvn -X site from command line?
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not "mvn -X site", rather "mvn -X deploy" because you have email configured to run during deploy.
 
linda russel
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply.

I will surely test with the above command
 
linda russel
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Finally i got a email but i got it only when i used GMAIL . but when i tried with my company email it failed.


I tried to ping smtp.mycompany.com but i got the error as below



 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You will have to contact your IT department to find out the proper settings for connecting to the corporate email system. I have the same issue with the Exchange server in my company - I cannot programmatically access the same Exchange server that I access via Outlook. Instead, there is different server that was set up to handle programmatic connections, and I have to target that one.
 
linda russel
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks :-)
 
linda russel
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator




i get the above error when my mvn test finishes. i do not understand why surefire-report.html is not getting generated !!!

my pom.xml is pasted below





what changes i need to do?
 
linda russel
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is there any command i need to run to get the site folder and surefire-report.html under it?


or any more plugins need to be added?
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic