[mxunit:2117] Possible bug in MXUnit JUnit XML output found

3 views
Skip to first unread message

Barny

unread,
Apr 27, 2010, 5:10:42 AM4/27/10
to mxunit
Hi All,
just starting to use MXUnit in my application at work and so far
I'm really liking it. Our application runs a custom framework and most
components rely on it being there, so I've deployed MXUnit into the
root of our app. This all works fine, I can run tests from Eclipse and
from ant, but I'm getting invalid jUnit XML generated by the Ant task.
I've tracked this down to a combination of something our app does and
something MXUnit is doing.

Our app sets the following string when any request begins:

request.invalid_char_list = "&$##""% -+/\*()^!|~`'=[]{}@;:<>?.,"; //
invalid characters list that can't be used

When MXUnit generates it's report XML, it dumps out various scopes as
<property> tags (server, cgi, cookie, REQUEST etc) using genProps()
in /framework/JUnitXMLTestresult.cfc. Unfortunately, genProps() isn't
escaping the value properly for XML:

properties = properties & '<property name="#ucase(prop)#"
value="#replace(collection[prop],"&","&amp;","all")#" />';

I've modified it to

properties = properties & '<property name="#ucase(prop)#"
value="#XMLFormat(collection[prop])#" />';

and I now get valid XML out in my reports.

Sorry if this is the wrong place to file bug reports, but I didn't
find a public bug tracker

Thanks

Barny

--
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.

bill shelton

unread,
Apr 27, 2010, 6:41:39 AM4/27/10
to mxunit
Good find, Barny; and thanks for the fix! This will be rolled into
trunk and the next release.

bill

Randy Merrill

unread,
Apr 27, 2010, 9:56:45 AM4/27/10
to mxu...@googlegroups.com
And as a note, here is the bug tracker:


Thanks!
--
Randy Merrill
Reply all
Reply to author
Forward
0 new messages