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

JUnit XML can contain invalid escape sequences #434

Open
pbiggar opened this issue May 26, 2022 · 0 comments
Open

JUnit XML can contain invalid escape sequences #434

pbiggar opened this issue May 26, 2022 · 0 comments

Comments

@pbiggar
Copy link

pbiggar commented May 26, 2022

Same issue as #324 (which is closed as they found a workaround).

Expecto is generating junit files with invalid xml, such as &#xA, for example:

<?xml version="1.0" encoding="utf-8"?>
<testsuites>
  <testsuite name="Nemo.Processors.RP65816.Tests, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
    <testcase name="addressing/absolute address x, long/always fails" time="0.065">
      <failure message="&#xA;.&#xA;&#x1B;[32mexpected&#x1B;[36m: &#x1B;[32m2&#x1B;[36m&#xA;&#x1B;[31m  actual&#x1B;[36m: &#x1B;[31m1&#x1B;[36m&#xA;   at [email protected](Unit unitVar) in /home/adam/Repos/nemo/Nemo.Processors.RP65816.Tests/src/ModeTests.fs:line 137&#xA;   at [email protected](Unit unitVar) in C:\Users\Anthony Lloyd\src\expecto\Expecto\Expecto.fs:line 939&#xA;   at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2)&#xA;   at &lt;StartupCode$FSharp-Core&gt;[email protected](AsyncActivation`1 ctxt)&#xA;   at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)" />
    </testcase>
</testsuites>

As a result, none of the xml file readers I've tried is able to parse it, including CircleCI which I want to use it to give me analytics.

The workaround is to use --colours 0 but that removes colours from console output, which isn't what we want either. We should never be putting this invalid XML into the XML files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant