Skip to content

Mutation testing#113

Open
vinceh121 wants to merge 4 commits into
maelgangloff:developfrom
vinceh121:feature/mutation-testing
Open

Mutation testing#113
vinceh121 wants to merge 4 commits into
maelgangloff:developfrom
vinceh121:feature/mutation-testing

Conversation

@vinceh121
Copy link
Copy Markdown
Contributor

Describe your changes

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist before requesting a review

  • Commit names follow the Conventional Commits convention
  • I have checked the entire code before submitting it
  • I have updated the documentation related to my commits
  • My code does not generate errors

@vinceh121 vinceh121 requested a review from maelgangloff as a code owner May 10, 2026 21:26
Copy link
Copy Markdown
Owner

@maelgangloff maelgangloff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

We'll discuss it again to make sure it's done properly, but it's a good idea to test the tests lol

Comment thread .dockerignore
.env.*.local
.env.local
.env.local.php
.env.test
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some registrar tests use a "dry run" flag. If mutation testing is performed, modifying this flag should be prevented, otherwise unintentional domain registrations could occur.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't run any tests if you don't have an appropriate .env for tests. J think your two main options are:

  • separate .env.test for mutation testing without any tokens
  • exclude provider classes with the infection config

Comment thread compose.test.yml
build:
context: .
target: frankenphp_test
# command: php infection.php
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented line?

Comment thread compose.test.yml
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for a database for the tests?
It seems to me that some tests do require one.

Comment thread Dockerfile
rm -rf node_modules; \
sync

#CMD [ "php", "infection.phar" ]
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented line?

Comment thread infection.json5
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should be better configured to avoid testing certain patterns.
For example, excluding log creation calls, method visibility, etc.

Also, we could remove files without logic (namespace App\Entity for example).

Comment thread infection.json5
"source": {
"directories": [
"src",
"tests"
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this line required?
You shouldn't modify the test instructions themselves, but rather the code covered by the tests.

@maelgangloff maelgangloff added the enhancement New feature or request label May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants