ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From RADEMAKERS Tanguy <tanguy.rademak...@swift.com>
Subject Re: REPOST: problem with character set when sending junit testrep ort via mail
Date Fri, 19 Mar 2004 15:47:36 GMT
Well, i guess it *might* be possible by using a combo of <loadfile> and 
writing a custom <filterreader>

Deblauwe, Wim wrote:

>Hi,
>
>I changed the mail task to attach the html file, not display it in the
>message body. This seems to work fine. I will re-try the other solution if
>we where to upgrade to a new ant version.
>
>What I'd like to do is set the number of failures in the message, but I
>don't suppose the junit task sets such a property?
>I would then do this:
>
><mail>
>   <message="There are ${junit.nrOfFailures} failures. Please look at the
>results in the attached html">
>   ...
></mail>
>
>Is it possible?
>
>-----Original Message-----
>From: RADEMAKERS Tanguy [mailto:tanguy.rademakers@swift.com]
>Sent: vrijdag 19 maart 2004 13:38
>To: Ant Users List
>Subject: Re: REPOST: problem with character set when sending junit
>testrep ort via mail
>
>
>Wim,
>
>1) What differs between the times when it works, and the time when it 
>doesn't work (other than the fact that the mail works..., obviousely)? 
>Does it work when all tests pass and fail when they fail, or is it one 
>specific test failing that causes the probem? What happens when you mail 
>the report from the disk using your mail client?
>
>2) Don't suppose there's any way you could upgrade your version of ant. 
>1.5.4 supports the encoding attribute of mail....
>
>/t
>
>Deblauwe, Wim wrote:
>
>  
>
>>Hi Tanguy,
>>
>>I'm setting the messagemimetype, not the encoding. The encoding can only be
>>set in versions of ant higher then the one I'm using (I am using 1.5.3).
>>    
>>
>The
>  
>
>>strange thing is that is sometimes works, and other times doesn't work.
>>
>>Anyway, this is part of my ant file:
>>
>>	<target name="JUnitTest" depends="init">
>>		<junit fork="yes" printsummary="yes" errorProperty="error"
>>failureProperty="failure" dir="${basedir}" haltonerror="no"
>>haltonfailure="no">
>>			<jvmarg value="-ea"/>
>>			<classpath>
>>				<pathelement location="${basedir}"/>
>>				<pathelement location="${basedir}\lib"/>
>>				<pathelement
>>location="${basedir}\lib\log4j.jar"/>
>>				<pathelement
>>location="${basedir}\lib\jdom.jar"/>
>>				<pathelement
>>location="${basedir}\lib\dnsjava-1.2.2.jar"/>
>>				<pathelement
>>location="${basedir}\lib\activation.jar"/>
>>				<pathelement
>>location="${basedir}\lib\mail.jar"/>
>>				<pathelement
>>location="${basedir}\lib\classes.jar"/>
>>				<pathelement
>>location="${basedir}\lib\xdsiii.jar"/>
>>				<pathelement
>>location="${basedir}\lib\xmlrpc-1.1.jar"/>
>>				<pathelement
>>location="${basedir}\jre\lib\comm.jar"/>
>>			</classpath>
>>			<formatter type="xml" usefile="true"/>
>>			<batchtest fork="yes" todir="${report.dir}"
>>haltonerror="no" haltonfailure="no" if="all">
>>				<fileset dir="${basedir}">
>>					<include
>>name="**/testbench/*Test.class"/>
>>					<exclude
>>name="com/barco/bds/is/colmeasdev/testbench/XRiteDTP92Test.class"/>	<!--
>>Is not a JUnit test -->
>>					<exclude
>>name="com/barco/bds/is/dinvw/testbench/*Test.class"/>
>><!-- Is not a JUnit test -->
>>					<exclude
>>name="com/barco/bds/is/timedtasks/testbench/TimedTaskSerializationTest.clas
>>    
>>
>s
>  
>
>>"/>	<!-- Is not a JUnit test -->
>>					<exclude
>>name="com/barco/bds/is/util/testbench/MethodToolTest.class"/>
>><!-- Is not a JUnit test -->
>>					<exclude
>>name="com/barco/bds/is/util/DefaultMessageHandlerTest.class"/>
>><!-- is a JUnit test but user interaction is needed -->
>>				</fileset>
>>			</batchtest>
>>			<batchtest fork="yes" todir="${report.dir}"
>>haltonerror="no" haltonfailure="no" unless="all">
>>				<fileset dir="${basedir}">
>>					<include name="${myclass}.class"/>
>>				</fileset>
>>			</batchtest>
>>		</junit>
>>	</target>
>>	<target name="JUnitReport" depends="JUnitTest">
>>		<junitreport>
>>			<fileset dir="${report.dir}">
>>				<include name="TEST-*.xml"/>
>>			</fileset>
>>			<report format="noframes" todir="${report.dir}"/>
>>		</junitreport>
>>	</target>
>>	<target name="mail" depends="JUnitReport">
>>		<mail messageMimeType="text/html"
>>	
>>messageFile="${report.dir}\junit-noframes.html"
>>					tolist="xxx@barco.com"
>>					cclist="yyy@barco.com"
>>					subject="JUnit Test Results - NewDev
>>branch: ${TODAY}"
>>					mailhost="smtp.barco.com"
>>					from="JUnitTest@barco.com">
>>		</mail>
>>	</target>
>>
>>
>>-----Original Message-----
>>From: RADEMAKERS Tanguy [mailto:tanguy.rademakers@swift.com]
>>Sent: vrijdag 19 maart 2004 13:10
>>To: Ant Users List
>>Subject: Re: REPOST: problem with character set when sending junit
>>testreport via mail
>>
>>
>>Dag Wim,
>>
>>Could you post your <junit>, <junitreport> and <mail> tasks from
your 
>>build.xml?
>>Are you setting the messagemimetype and/or encoding attributes on <mail>?
>>
>>/t
>>
>>Deblauwe, Wim wrote:
>>
>> 
>>
>>    
>>
>>>I haven't seen any reply yet to my question, although this list is very
>>>active.
>>>
>>>Isn't there anyone who can help me?
>>>
>>>-----Original Message-----
>>>From: Deblauwe, Wim [mailto:wim.deblauwe@barco.com]
>>>Sent: dinsdag 16 maart 2004 17:33
>>>To: 'user@ant.apache.org'
>>>Subject: problem with character set when sending junit testreport via
>>>mail
>>>
>>>
>>>Hi,
>>>
>>>I'm using ant 1.5.3 and have a problem when I send a mail containing the
>>>report of the junit tests. In stead of the mail, I get a mail with the
>>>following message in it:
>>>
>>>"This message uses a character set that is not supported by the Internet
>>>Service. To view the original message content, open the attached message.
>>>   
>>>
>>>      
>>>
>>If
>> 
>>
>>    
>>
>>>the text doesn't display correctly, save the attachment to disk, and then
>>>open it using a viewer that can display the original character set. "
>>>
>>>The mail has an attachment message.txt with this:
>>>
>>>Received: from kuuvir04.barco.com ([150.158.252.11]) by kuurex03.barco.com
>>>with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2657.72)
>>>id GZN8M8CY; Tue, 16 Mar 2004 16:13:12 +0100
>>>Received: From BVWCLTJ8 ([150.158.203.114]) by kuuvir04.barco.com
>>>   
>>>
>>>      
>>>
>>(WebShield
>> 
>>
>>    
>>
>>>SMTP v4.5 MR1a);
>>>id 1079449983947; Tue, 16 Mar 2004 16:13:03 +0100
>>>Message-ID: < 24478976.1079449990515.JavaMail.WIMD@BVWCLTJ8
>>><mailto:24478976.1079449990515.JavaMail.WIMD@BVWCLTJ8> >
>>>Date: Tue, 16 Mar 2004 15:13:09 +0000
>>>From: JUnitTest@barco.com <mailto:JUnitTest@barco.com> 
>>>To: xxx @barco.com <mailto:xxx@barco.com> 
>>>Subject: JUnit Test Results - NewDev branch: March 16 2004
>>>Cc: yyy@barco.com <mailto:yyy@barco.com> 
>>>Mime-Version: 1.0
>>>Content-Type: multipart/mixed; 
>>>boundary="----=_Part_0_20089978.1079449989265"
>>>
>>>------=_Part_0_20089978.1079449989265
>>>Content-Type: text/html; charset=Cp1252
>>>Content-Transfer-Encoding: quoted-printable
>>><REST OF FILE REMOVED HERE>
>>>
>>>I'm using the junitreport task to create the report and the mail task to
>>>send email.
>>>
>>>somebody have clue what might case this?
>>>
>>>kind regards,
>>>
>>>Wim
>>>
>>>Ing. Wim Deblauwe 
>>>Software Development Engineer 
>>>
>>>BarcoView - Medical Imaging Systems 
>>>Theodoor Sevenslaan 106 
>>>B-8500 Kortrijk, Belgium 
>>>Tel. +32 56 233 985 Fax +32 56 233 457 
>>>www.barco.com <http://www.barco.com/>  
>>>wim.deblauwe@barco.com <mailto:wim.deblauwe@barco.com> 
>>>
>>>- - - - - - - - DISCLAIMER - - - - - - - - 
>>>Unless indicated otherwise, the information contained in this message is
>>>privileged and confidential, and is intended only for the use of the
>>>addressee(s) named above and others who have been specifically authorized
>>>   
>>>
>>>      
>>>
>>to
>> 
>>
>>    
>>
>>>receive it. If you are not the intended recipient, you are hereby notified
>>>that any dissemination, distribution or copying of this message and/or
>>>attachments is strictly prohibited. The company accepts no liability for
>>>   
>>>
>>>      
>>>
>>any
>> 
>>
>>    
>>
>>>damage caused by any virus transmitted by this email. Furthermore, the
>>>company does not warrant a proper and complete transmission of this
>>>information, nor does it accept liability for any delays. If you have
>>>received this message in error, please contact the sender and delete the
>>>message. Thank you.
>>>- - - - - - - - DISCLAIMER - - - - - - - - 
>>>Unless indicated otherwise, the information contained in this message is
>>>privileged and confidential, and is intended only for the use of the
>>>addressee(s) named above and others who have been specifically authorized
>>>   
>>>
>>>      
>>>
>>to
>> 
>>
>>    
>>
>>>receive it. If you are not the intended recipient, you are hereby notified
>>>that any dissemination, distribution or copying of this message and/or
>>>attachments is strictly prohibited. The company accepts no liability for
>>>   
>>>
>>>      
>>>
>>any
>> 
>>
>>    
>>
>>>damage caused by any virus transmitted by this email. Furthermore, the
>>>company does not warrant a proper and complete transmission of this
>>>information, nor does it accept liability for any delays. If you have
>>>received this message in error, please contact the sender and delete the
>>>message. Thank you.
>>>
>>>
>>>
>>>   
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>For additional commands, e-mail: user-help@ant.apache.org
>>- - - - - - - - DISCLAIMER - - - - - - - - 
>>Unless indicated otherwise, the information contained in this message is
>>privileged and confidential, and is intended only for the use of the
>>addressee(s) named above and others who have been specifically authorized
>>    
>>
>to
>  
>
>>receive it. If you are not the intended recipient, you are hereby notified
>>that any dissemination, distribution or copying of this message and/or
>>attachments is strictly prohibited. The company accepts no liability for
>>    
>>
>any
>  
>
>>damage caused by any virus transmitted by this email. Furthermore, the
>>company does not warrant a proper and complete transmission of this
>>information, nor does it accept liability for any delays. If you have
>>received this message in error, please contact the sender and delete the
>>message. Thank you.
>>
>> 
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>- - - - - - - - DISCLAIMER - - - - - - - - 
>Unless indicated otherwise, the information contained in this message is
>privileged and confidential, and is intended only for the use of the
>addressee(s) named above and others who have been specifically authorized to
>receive it. If you are not the intended recipient, you are hereby notified
>that any dissemination, distribution or copying of this message and/or
>attachments is strictly prohibited. The company accepts no liability for any
>damage caused by any virus transmitted by this email. Furthermore, the
>company does not warrant a proper and complete transmission of this
>information, nor does it accept liability for any delays. If you have
>received this message in error, please contact the sender and delete the
>message. Thank you.
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message