我想打电话给sendmail的一次RunTests完成,但其没有工作调用一个Ant任务陆续
<project name="Sample usage of Salesforce Ant tasks" basedir="." xmlns:sf="antlib:com.salesforce" default="RunTests">
<!--******************************************* P R O P E R T Y F I L E *********************************************-->
<property file="build.properties"/>
<property environment="env"/>
<!--*******************************************RunTests***********************************************************-->
<target name="RunTests">
<record name="RunTest.log" action="start"/>
<sf:compileAndTest username="${sf.backup_username}" password="${sf.backup_password}" serverurl="${sf.backup_serverurl}" >
<runTests Alltests="true"/>
</sf:compileAndTest>
<record name="RunTest.log" action="stop"/>
</target>
<target name="sendmail" depends="RunTests">
<mail mailhost="email.corp.testcompany.com" mailport="25" subject="Run all tests - Sandbox 1337" messagefile="RunTest.log">
<from address="[email protected]"/>
<replyto address="[email protected]"/>
<to address="[email protected]"/>
</mail>
</target>
</project>
我得到以下故障 -
构建失败 C:\ ANT_HOME \ QA_1337_TestRunner \构建.xml:8:失败:
有没有什么办法可以执行“sendemails”任务,即使前面的任务失败了。
感谢您的回复,我认为我的构建失败这就是为什么它没有去电子邮件任务是吗? –
@PfulfullaPatil这是正确的。这个答案解释了如何调用sendmail任务,它不能解决测试失败时发送邮件的问题。 –
刚刚编辑了我的帖子,提供了解决此问题的可能解决方案。 – ben75