Skip to content

test: add mutation testing for evaluator - #129

Merged
sf403 merged 1 commit into
mainfrom
test/259045253/mutation-testing
Dec 31, 2025
Merged

sf403 merged 1 commit into
mainfrom
test/259045253/mutation-testing

Conversation

@sf403

@sf403 sf403 commented Dec 31, 2025

Copy link
Copy Markdown
Collaborator

The evaluator module internally uses all the other modules and hence if we generate tests for this one then all other modules are automatically tested.

The features cannot be tested individually because of how the code is structured and its interdependence between all other user stories and all of the other code.

The commands used to generate tests is:

PYNGUIN_DANGER_AWARE="1" PYTHONHASHSEED="0" pynguin \
    --project-path . --module-name src.evaluator    \
    --output-path 259045253/test/whitebox/mutation_testing      \
    --algorithm RANDOM --assertion-generation MUTATION_ANALYSIS \
    --seed 0 --maximum-search-time 60 -v            \
    --coverage-metrics BRANCH --create-coverage-report True

And the command used to generate coverage report is:

coverage run -m pytest  \
    259045253/test/whitebox/mutation_testing/test_src_evaluator.py  \
    && coverage report  \
    -m > 259045253/test/whitebox/mutation_testing/coverage.txt

The evaluator module internally uses all the other modules and hence if
we generate tests for this one then all other modules are automatically
tested.

The features cannot be tested individually because of how the code is
structured and its interdependence between all other user stories and
all of the other code.

The commands used to generate tests is:
```
PYNGUIN_DANGER_AWARE="1" PYTHONHASHSEED="0" pynguin \
    --project-path . --module-name src.evaluator    \
    --output-path 259045253/test/whitebox/mutation_testing      \
    --algorithm RANDOM --assertion-generation MUTATION_ANALYSIS \
    --seed 0 --maximum-search-time 60 -v            \
    --coverage-metrics BRANCH --create-coverage-report True
```

And the command used to generate coverage report is:
```
coverage run -m pytest  \
    259045253/test/whitebox/mutation_testing/test_src_evaluator.py  \
    && coverage report  \
    -m > 259045253/test/whitebox/mutation_testing/coverage.txt
```
@sf403
sf403 merged commit 7e5e04a into main Dec 31, 2025
1 of 2 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.

1 participant