Skip to content

Conversation

@sirbrillig
Copy link
Owner

@sirbrillig sirbrillig commented Nov 8, 2025

This adds a new reporter type, junit which can be used to output JUnit XML format.

Fixes #106

There seem to be slightly different definitions for the schema of this format.

Notably, do we need an id attribute or a time attribute? I believe that id is not needed but time might be good so I've added support for that.

Here's an example of the one used by this PR:

<?xml version="1.0" encoding="UTF-8"?>
<testsuites tests="1" failures="1" errors="0" time="0.000">
        <testsuite name="bin/store/code/review-stuck-orders.php" tests="1" failures="1" errors="0" time="0.000">
                <testcase name="line 20, column 5" classname="ImportDetection.Imports.RequireImports.Import" time="0">
                        <failure type="ImportDetection.Imports.RequireImports.Import" message="Found unused symbol &apos;Foobar&apos;.">Line 20, Column 5: Found unused symbol &apos;Foobar&apos;. (Severity: 5)</failure>
                </testcase>
        </testsuite>
</testsuites>

@sirbrillig sirbrillig marked this pull request as ready for review November 8, 2025 21:48
@sirbrillig sirbrillig merged commit 2900b8b into trunk Nov 8, 2025
26 checks passed
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

Successfully merging this pull request may close these issues.

Request to add junit output format

2 participants