Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mark stack traces with CDATA in JUnit XML report #62

Merged
merged 1 commit into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Runtime/Utilities/JUnitReporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ private static string CreateJUnitXmlReport(int exitCode, string logString, strin
private const string ErrorElement = @"
<error message=""{0}""
type=""""
>{1}</error>";
><![CDATA[{1}]]></error>";

private const string FailureElement = @"
<failure message=""{0}""
type=""""
>{1}</failure>";
><![CDATA[{1}]]></failure>";

// XML format from: https://github.com/jenkinsci/benchmark-plugin/blob/master/doc/JUnit%20format/JUnit.txt
}
Expand Down
4 changes: 2 additions & 2 deletions Tests/Runtime/Utilities/JUnitReporterTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public void Output_error_wroteJUnitXmlReportingFile()
>
<error message=""Error message!""
type=""""
>Stack trace!</error>
><![CDATA[Stack trace!]]></error>
</testcase>
</testsuite>
</testsuites>"));
Expand Down Expand Up @@ -123,7 +123,7 @@ public void Output_failure_wroteJUnitXmlReportingFile()
>
<failure message=""Failure message!""
type=""""
>Stack trace!!</failure>
><![CDATA[Stack trace!!]]></failure>
</testcase>
</testsuite>
</testsuites>"));
Expand Down