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 output format #6726

Merged
merged 2 commits into from
Feb 25, 2025
Merged

JUnit output format #6726

merged 2 commits into from
Feb 25, 2025

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
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.

2 participants