ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <>
Subject Re: file.encoding within <junit> task
Date Wed, 07 Mar 2007 12:32:41 GMT
William Walsh wrote:
> Is anyone else using Ant's <junit> task on z/OS and having various
> file/string encoding issues?  We're using Ant 1.6.2 on z/OS 1.7 with WAS
> 6.1's Java 5 and some of our tests get errors due to XML parsing errors.
> In looking into this issue it appears that the file.encoding property
> set to "UTF-8" at <junit> invocation gets changed by Ant somewhere along
> the way back to the default IBM-1047 encoding when some of the tests
> run.

can you post the <junit> call. Ant forks a new JVM to do the logging, so 
it may not be being set up right.

Or JUnit is selecting the right output encoding when it creates files, 
which is dangerously likely. Though it uses DOM, and DOM is meant to do 
the right thing...

> The way I've gotten around this is to implement a simple RMI class to
> invoke junit so that encoding is still honored from the <java> task to
> the test class, but we then don't get the Ant-builtin HTTP Junit report
> processing.

1. I do RMI-based junit running too, but not on z/OS systems:

If you look at the slides you see that I create my own XHTML files, ones 
that are streamed out and viewable straight away, but not very pretty. 
I'm thinking of some Atom result format, either XHTML or RSS inside (or 
both!), which you can subscribe to in a viewer app or have xformed into 
summary docs later.

Also, our code uses serialized test result classes over RMI to relay 
results over the wire; you may want them :)

2. If you look at GridUnit on sourceforge, theres code there to display 
test run results from java test results serialized to a file. The 
classes are derived from mine,  but I've changed mine since, primarily 
to add log streams from multiple hosts. The griduit result viewer 
(swing) could be better than static html pages for viewing output...


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message