Running MXUnit fails with BlueDragon because of missing Stacktrace.

5 views
Skip to first unread message

Tero Pikala

unread,
Sep 23, 2009, 9:54:23 AM9/23/09
to mxunit
When creating XML report with BlueDragon execution fails because it
doesn't have same keys in cfcatch structure.

I added check if stacktrace exists and omit that if it's not present.
Patch is below.


Tero Pikala


Index: framework/JUnitXMLTestResult.cfc
===================================================================
--- framework/JUnitXMLTestResult.cfc (revision 1223)
+++ framework/JUnitXMLTestResult.cfc (working copy)
@@ -67,8 +67,13 @@
this.resultsXML = this.resultsXML & '<failure message="#xmlformat
(testResults.error.message)#"><![CDATA[#testResults.error.stacktrace#]]
></failure>';
}
else if( listFindNoCase("Error",testResults.testStatus)) {
- this.resultsXML = this.resultsXML & '<error
message="#testResults.error.type#"><![CDATA
[#testResults.error.stacktrace#]]></error>';
- }
+ if (structKeyExists(testResults.error, "stacktrace")) {
+ // BlueDragon.NET doesn't have key stacktrace available.
+ this.resultsXML = this.resultsXML & '<error
message="#testResults.error.type#"><![CDATA
[#testResults.error.stacktrace#]]></error>';
+ }
+ else {
+ this.resultsXML = this.resultsXML & '<error
message="#testResults.error.type#"></error>';
+ } }
this.resultsXML = this.resultsXML & '</testcase>';
}
this.resultsXML = this.resultsXML & '</testsuite>';

Tero Pikala

unread,
Sep 23, 2009, 9:57:58 AM9/23/09
to mxunit
It seems that some lines are split, I guess it's small enough change
so it's still readable?


Tero

bill shelton

unread,
Sep 23, 2009, 10:26:06 AM9/23/09
to mxunit
Excellent! Thanks, Tero.

bill

Peter J. Farrell

unread,
Sep 23, 2009, 6:15:56 PM9/23/09
to mxu...@googlegroups.com
Again, this sounds like one of the tickets I filed with a patch a month or more ago.  Bill, has those patches been rolled in yet?  And if yes, then Tero, you should pull the nightly down.

.Peter

bill shelton said the following on 09/23/2009 09:26 AM:

bill shelton

unread,
Sep 24, 2009, 7:01:18 AM9/24/09
to mxunit
Thanks, Peter. Doh! I responded too quickly. I'll review the issues
and SVN commits. I'm pretty sure I applied the patches you provided,
but it's possible I didn't commit them or they're branched. I'll
check ...

bill

Tero Pikala

unread,
Sep 24, 2009, 6:09:12 PM9/24/09
to mxunit
Hi

I did checkout latest MXUnit and created patches against that so I
guess fix wasn't yet there?

I'm bit uncomfortable though putting most recent code from SVN to our
CruiseControl server and to all developers... RIght now our local svn
repository has 1.0.7 + my patches.

Tero



On Sep 24, 12:01 pm, bill shelton <vir...@gmail.com> wrote:
> Thanks, Peter. Doh! I responded too quickly. I'll review the issues
> andSVNcommits. I'm pretty sure I applied the patches you provided,
Reply all
Reply to author
Forward
0 new messages