Skip to content

Commit

Permalink
Encode attributes in JUnit report output
Browse files Browse the repository at this point in the history
  • Loading branch information
David Nemcok authored and David Nemcok committed Dec 9, 2016
1 parent ca11b8f commit 99bca6c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/massive/munit/client/JUnitReportClient.hx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
****/

package massive.munit.client;
import StringTools;
import massive.munit.ITestResultClient;
import massive.munit.TestResult;
import massive.munit.util.MathUtil;
Expand Down Expand Up @@ -138,7 +139,7 @@ class JUnitReportClient implements IAdvancedTestResultClient
suiteFailCount++;

testSuiteXML.add( "<testcase classname=\"" + result.className + "\" name=\"" + result.name + "\" time=\"" + MathUtil.round(result.executionTime, 5) + "\" >" + newline);
testSuiteXML.add("<failure message=\"" + result.failure.message + "\" type=\"" + result.failure.type + "\">");
testSuiteXML.add("<failure message=\"" + StringTools.htmlEscape(result.failure.message) + "\" type=\"" + result.failure.type + "\">");
testSuiteXML.add(result.failure);
testSuiteXML.add("</failure>" + newline);
testSuiteXML.add("</testcase>" + newline);
Expand All @@ -154,7 +155,7 @@ class JUnitReportClient implements IAdvancedTestResultClient
suiteErrorCount++;

testSuiteXML.add("<testcase classname=\"" + result.className + "\" name=\"" + result.name + "\" time=\"" + MathUtil.round(result.executionTime, 5) + "\" >" + newline);
testSuiteXML.add("<error message=\"" + result.error.message + "\" type=\"" + result.error.type + "\">");
testSuiteXML.add("<error message=\"" + StringTools.htmlEscape(result.error.message) + "\" type=\"" + result.error.type + "\">");
testSuiteXML.add(result.error);
testSuiteXML.add("</error>" + newline);
testSuiteXML.add("</testcase>" + newline);
Expand Down

0 comments on commit 99bca6c

Please sign in to comment.