MXUnitAnt Task XML Output Filename

18 views
Skip to first unread message

lbicknese

unread,
May 24, 2011, 9:32:39 AM5/24/11
to mxu...@googlegroups.com
I was wondering if was possible to specify a file name along with the outputdir for the ant task?

I would like to have multiple targets in my build file, all of which generate xml output. However, I do not want the files to get overwritten. Right now it appears that the xml output file always has the same name and I can't find anything in the docs that says it can be changed.

I know that I can update my build file to rename the file manually, but I wanted to check if there was an attribute that I was missing.

Thanks,

Luke

Bill Rawlinson

unread,
May 24, 2011, 10:04:30 AM5/24/11
to mxu...@googlegroups.com
I don't think there is.

You might want to use an ant task to zip up your old build results and
archive them..

Bill

> --
> You received this message because you are subscribed to the Google Groups
> "mxunit" group.
> To post to this group, send email to mxu...@googlegroups.com.
> To unsubscribe from this group, send email to
> mxunit+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/mxunit?hl=en.
>

Marc Esher

unread,
May 24, 2011, 11:12:22 AM5/24/11
to mxu...@googlegroups.com
When I have that situation -- for example, different xml dirs for UI,
unit, and integration tests, I simply point the "outputdir" to a
different folder.

So I'll set a base property named "test.output.xml" which points to
the root folder, and then in the mxunit task I'll have:

<mxunittask ... outputdir="${test.output.xml}/@{directoryName}" ..>

lbicknese

unread,
May 24, 2011, 11:23:21 AM5/24/11
to mxu...@googlegroups.com
Thanks Marc. That might be the easiest solution for us.

Do you use the junitreport task? and if you do, can you tell it to look in those sub-directories for the xml files with a single command?

I would like to generate all the xml output and then create a single HTML report of the results. I know this can be done if the xml files are in the same directory, but not if they are in sub-directories.

Thanks,

Luke

Marc Esher

unread,
May 24, 2011, 11:30:24 AM5/24/11
to mxu...@googlegroups.com
Try something like this, as the fileset you're passing to junit report:
<junitreport todir="${junit.out.dir.html}">
<fileset dir="${output.dir}">
<include name="**/*.xml" />
</fileset>

<report format="frames" todir="${junit.out.dir.html}"
styledir="${style.dir}" />
</junitreport>

lbicknese

unread,
May 24, 2011, 1:46:05 PM5/24/11
to mxu...@googlegroups.com
That worked perfectly. Thanks Marc.

Marc Esher

unread,
May 24, 2011, 2:14:20 PM5/24/11
to mxu...@googlegroups.com
Excellent. Glad it worked.

On Tue, May 24, 2011 at 1:46 PM, lbicknese <luke.b...@gmail.com> wrote:
> That worked perfectly. Thanks Marc.

Reply all
Reply to author
Forward
0 new messages