Testiny importer fails to parse linebreaks in JUnit Failure element message property

When adding automated results with a JUnit XML file generated by Pytest, it appears that Testiny fails to parse the message property of the failure element. The Line Feed characters (
) aren’t parsed, and are instead shown literally. An example is the following:

<failure message="assert -1 &lt; -1&#10;Failing test case: test_two_negative_numbers(&#10;    first_number=0,&#10;    second_number=-1,  # or any other generated value&#10;)">

It would be expected that this would be interpreted and rendered with a line break, or alternatively removed entirely.

3 - Steps to reproduce

Import the following example JUnit XML file:

junit.xml
<?xml version="1.0" encoding="utf-8"?>
<testsuites name="pytest tests">
    <testsuite name="pytest" errors="0" failures="1" skipped="0" tests="12" time="0.323"
        timestamp="2026-09-07T10:33:55.668367+00:00" hostname="KOP-L100007">
        <testcase classname="tests.test_math" name="test_sum_of_digits" time="0.020" />
        <testcase classname="tests.test_math" name="test_add_zero" time="0.019" />
        <testcase classname="tests.test_math" name="test_double_number" time="0.025" />
        <testcase classname="tests.test_math" name="test_double_zero" time="0.000" />
        <testcase classname="tests.test_math" name="test_add_single_number" time="0.018" />
        <testcase classname="tests.test_math" name="test_add_two_positive_numbers" time="0.025" />
        <testcase classname="tests.test_math" name="test_add_multiple_zeros" time="0.044" />
        <testcase classname="tests.test_math" name="test_reverse_first_last_swapped" time="0.019" />
        <testcase classname="tests.test_math" name="test_two_negative_numbers" time="0.024" />
        <testcase classname="tests.test_math" name="test_add_positive_and_negative_numbers"
            time="0.033" />
        <testcase classname="tests.test_math" name="test_add_self" time="0.010">
            <failure
                message="assert 2 == (1 * 3)&#10;Failing test case: test_add_self(&#10;    number=1,&#10;)">@given(strategies.integers())
                &gt; def test_add_self(number):
                ^^^

                f = &lt;function given.&lt;locals&gt;.run_test_as_given.&lt;locals&gt;.wrapped_test
                at 0x7de07ad9cea0&gt;

                tests/test_math.py:64:
                _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
                _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
                _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

                number = 1

                @given(strategies.integers())
                def test_add_self(number):
                """
                Adding a number to itself should double it
                """
                result = add(number, number)
                &gt; assert result == number * 3
                E assert 2 == (1 * 3)
                E Failing test case: test_add_self(
                E number=1,
                E )

                number = 1
                result = 2

                tests/test_math.py:69: AssertionError</failure>
        </testcase>
        <testcase classname="tests.test_math" name="test_reverse_single_digit" time="0.003" />
    </testsuite>
</testsuites>

This results in the following being shown:

Note that the Line Feed characters (&#10;) have not been parsed, and instead are shown literally.

2 Answers

2

Hello Ben,

Thank you for your report - I can confirm that numeric entities (decimal and hex) are currently not decoded here.
We will provide a fix in one of the upcoming releases.

Regards,
Michael

This issue should be fixed with the latest release Testiny v1.41.0.

Best regards,
Alex