Skip to content

JUnit output format#6726

Merged
samsonasik merged 2 commits intorectorphp:mainfrom
VitalyArt:report-junit
Feb 25, 2025
Merged

JUnit output format#6726
samsonasik merged 2 commits intorectorphp:mainfrom
VitalyArt:report-junit

Conversation

@VitalyArt
Copy link
Contributor

@VitalyArt VitalyArt commented Feb 10, 2025

Adoption of the JUnit format for GitLab CI integration

Specification: https://github.com/junit-team/junit5/blob/main/platform-tests/src/test/resources/jenkins-junit.xsd

Example

Run command:

php bin/rector process bin --output-format=junit --dry-run

Output:

<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
    <testsuite name="rector">
        <testcase name="bin/test-fixture-stats.php:17">
            <error type="Error">Syntax error, unexpected T_VARIABLE</error>
        </testcase>
        <testcase name="bin/rector.php:70">
            <error type="MultiDirnameRector / AddVoidReturnTypeWhereNoReturnRector">--- Original
                +++ New
                @@ -71,7 +71,7 @@
                $this-&gt;loadIfExistsAndNotLoadedYet('vendor/autoload.php');
                }

                - public function autoloadFromCommandLine()
                + public function autoloadFromCommandLine(): void
                {
                $cliArgs = $_SERVER['argv'];

            </error>
        </testcase>
    </testsuite>
</testsuites>

Gitlab widget:

telegram-cloud-photo-size-4-5859291718208308972-x

@samsonasik
Copy link
Member

@VitalyArt could you rebase? Thank you.

@samsonasik
Copy link
Member

Looks good, thank you @VitalyArt

@samsonasik samsonasik merged commit 4d2efb4 into rectorphp:main Feb 25, 2025
44 checks passed
@github-actions
Copy link
Contributor

This pull request has been automatically locked because it has been closed for 150 days. Please open a new PR if you want to continue the work.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants