views:

48

answers:

4

Hello, with ant it is possible to run JUnit tests and generate test reports in several formats: text, HTML, XML .. and it is recurrent to send test results by email to the responsible, so my question: is it possible to use the xml file generated by Junit in order to send a summary(Html) of the test execution? or is there another better solution to send the results test execution by email? any help will be appreciated :) thanks for your helps.

A: 

Hi,

Use the cruise control to build your project and run unit test. http://cruisecontrol.sourceforge.net/, its a very good tool.

Jprogyog
A: 

Team City supports it out of the box, and I found it easier to configure than Cruise Control.

Grzenio
A: 

You could also convert the XML file into an HTML using XSL styles within junitreport task. http://ant.apache.org/manual/Tasks/junitreport.html

And then use the inbuilt mail task to mail this HTML file

<mail mailhost="smtp.myisp.com" mailport="1025" subject="Test build">
  <from address="[email protected]"/>
  <replyto address="[email protected]"/>
  <to address="[email protected]"/>
  <message>The ${buildname} nightly build has completed</message>
  <attachments>
    <fileset dir="dist">
      <include name="**/*.html"/>
    </fileset>
  </attachments>
</mail>
JoseK
A: 

Hudson is a very good build-server with support for email notifications of build and test results.

JesperE