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

Implemented budgets #33

Merged
merged 15 commits into from
Dec 8, 2023
Merged

Conversation

DurieuxPol
Copy link
Collaborator

Added budgets to represent a cost that an execution of MuTalk cannot exceed.
Currently there are MutationTestingFreeBudget, which is essentially a budget with no constraint and do the same as before, without budgets, and MutationTestingTimeBudget, which restrict the execution time with a time constraint.

In my implementation, the beggining of the timer is at the start of the run method rather than before the generateResults, so it takes into account the time to run the tests a first time before evaluating the tests with the mutants.

Also, if the time constraint is exceeded while the tests are running against a mutant, the execution continues until all tests have finished, then the constraint blocks the next mutants from being evaluated.

An example of use:
image

@coveralls
Copy link

coveralls commented Dec 4, 2023

Pull Request Test Coverage Report for Build 7143029780

  • 190 of 297 (63.97%) changed or added relevant lines in 11 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 60.395%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/MuTalk-Model/MutationTestingBudget.class.st 4 8 50.0%
src/MuTalk-TestResources/AuxiliarClassForMutationTestingBudget.class.st 0 4 0.0%
src/MuTalk-Model/ManualMutatedMethodSelectionStrategy.class.st 0 8 0.0%
src/MuTalk-Model/MutationTestingAnalysis.class.st 60 151 39.74%
Totals Coverage Status
Change from base Build 7083678478: 0.1%
Covered Lines: 3945
Relevant Lines: 6532

💛 - Coveralls

@DurieuxPol
Copy link
Collaborator Author

The time budget tests pass for me, but they seemingly fail in the CI. I'm going to change them and see.

@guillep
Copy link
Contributor

guillep commented Dec 6, 2023

Interesting, the tests pass in Pharo11 but not in Pharo10.

@DurieuxPol could you test in Pharo10?

Also, maybe later we should

  • evaluate if we keep supporting Pharo9
  • add CI support for Pharo12

@guillep guillep merged commit 00b620a into pharo-contributions:master Dec 8, 2023
3 checks passed
@DurieuxPol DurieuxPol deleted the feature/budget branch February 5, 2024 10:14
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.

3 participants