开发者

is it possible to send JUnit test report by email?

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 questio开发者_开发百科n: 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.


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="config@myisp.com"/>
  <replyto address="me@myisp.com"/>
  <to address="all@xyz.com"/>
  <message>The ${buildname} nightly build has completed</message>
  <attachments>
    <fileset dir="dist">
      <include name="**/*.html"/>
    </fileset>
  </attachments>
</mail>


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


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜