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

[2.x] Fix JUnit output for mutation testing #1145

Open
wants to merge 3 commits into
base: 2.x
Choose a base branch
from

Conversation

nuernbergerA
Copy link
Contributor

@nuernbergerA nuernbergerA commented Apr 27, 2024

What:

  • Bug Fix

Description:

Mutation testing relies on real generated phpunit classes under the hood of pest.
(for example P\Tests\CalculatorTest::__pest_evaluable_it_adds)

my current junit implementation for pest is printing the "pretty" name Tests\CalculatorTest::it adds which is nice for humans not for other libs that try to work with the generated test classes by pest

Im reverting method and class name related changes which should fix it.
We still override the junit logger to get the proper file location

Test this fix

composer.json

{
    "require-dev": {
        "pestphp/pest": "dev-junit-revert-naming as v2.35.0"
    },
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/nuernbergerA/pest"
        }
    ]
}

Related:

Fixes #1095

@nuernbergerA nuernbergerA changed the title revert name and class related changes [2.x] Fix JUnit output for mutation testing Apr 27, 2024
@alexandre-daubois
Copy link

Would be amazing to see this merged! I can confirm it also fixes the issue on our project 🚀

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.

[Bug]: --log-junit and --coverage-xml conflicts
2 participants