当 测试 有error ,失败后做就send mail
- <property name="report" value="report" />
-
- <target name="junitreport" depends="clean, compile">
- <junit printsummary="on"
- fork="true"
- haltonfailure="false"
- failureproperty="tests.failed"
- showoutput="true">
- <classpath refid="myclasspath"/>
- <formatter type="xml"/>
- <batchtest todir="${report}">
- <fileset dir="${build}">
- <include name="**/*Test.*"/>
- </fileset>
- </batchtest>
- </junit>
- <junitreport todir="${report}">
- <fileset dir="${report}">
- <include name="TEST-*.xml"/>
- </fileset>
- <report format="frames" todir="${report}"/>
- </junitreport>
- <fail if="tests.failed">
- ---------------------------------------------------------
- One or more tests failed, check the report for detail...
- ------------------
<mail mailhost="localhost" mailport="25" subject="Web Test Result">
<from address="webadm@gpe-hkg.com"/>
<to address="l.zhang@gpe-hkg.com"/>
<message>Dear All,
The test result link "http://192.6.4.102/flex/webtest/test".
Best Regards,
Web Team.</message>
</mail>
---------------------------------------
-
- </fail>
- </target>
。
|
|