pest icon indicating copy to clipboard operation
pest copied to clipboard

[2.x] Fix JUnit output for mutation testing

Open nuernbergerA opened this issue 2 years ago • 1 comments

What:

  • [x] 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 avatar Apr 27 '24 06:04 nuernbergerA

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

alexandre-daubois avatar Jun 06 '24 09:06 alexandre-daubois

I agree this should be merged.

henzeb avatar Aug 02 '24 21:08 henzeb

we are doing our own mutation testing plugin for pest 3.

nunomaduro avatar Aug 22 '24 20:08 nunomaduro

we are doing our own mutation testing plugin for pest 3.

@nunomaduro Well that's great, but what about those who still want to use Infection?!

aldemeery avatar Sep 19 '24 01:09 aldemeery

we are doing our own mutation testing plugin for pest 3.

@nunomaduro Well that's great, but what about those who still want to use Infection?!

Pest is just as good with mutations. the only thing missing is an html page that shows the mutated failures, what infection has. but other than that there is no reason wanting to keep use Infection, imho. Unless I am missing something, of course?

henzeb avatar Sep 19 '24 13:09 henzeb