Mutation Testing in Smalltalk
This project was originally developed at the University of Buenos Aires (Argentina) by Nicolás Chillo, Gabriel Brunstein and others in times of Pharo 1.1.
- Latest release:
Metacello new
baseline: 'MuTalk';
repository: 'github://pharo-contributions/mutalk:v2.3.0/src';
load.- Full version:
Metacello new
baseline: 'MuTalk';
repository: 'github://pharo-contributions/mutalk/src';
load."Put here the classes you want to mutate"
classesToMutate := { }.
"Put here the test classes associated with"
testClasses := { }.
analysis := MTAnalysis new
classesToMutate: classesToMutate;
testClasses: testClasses.
analysis run.
"To inspect the results"
analysis generalResult inspect.You can find a wiki here with a lot of information about MuTalk and how it works. It is higly recommended to read it.
Releases are published automatically when a Semantic Versioning tag is pushed
(2.7.0, v2.7.0, 2.7.0-beta.1, ...). The composite action in
guillep/pharo-release (wired up by .github/workflows/pharo-release.yml):
- validates the tag and fails on non-SemVer tags;
- reads the source repository location from
.project(resolved relative to the project file, override with theproject-fileinput); - queries the GitHub Releases API for existing releases;
- generates an
index.htmlwith release metadata, absolute artifact URLs, changelog and the renderedREADME.md; - publishes the GitHub Release with
index.html.
The index format, the release.json schema and reuse instructions for other
Pharo repositories are documented in
the guillep/pharo-release repository.
Original repository: http://www.squeaksource.com/MutationTesting
ESUG presentation: https://www.slideshare.net/esug/mutation-testing
Master thesis (in spanish): http://gestion.dc.uba.ar/media/academic/grade/thesis/brunstein.pdf
Following text is copy from https://code.google.com/archive/p/mutalk/
During the 70s, mutation testing emerged as a technique to assess the fault-finding effectiveness of a test suite. It works mutating objects' behavior and looking for tests to “kill” those mutants. The surviving mutants are the starting point to writing better tests. Thus, this technique is an interesting alternative to code coverage regarding test quality.
However, so far it is a “brute force” technique that takes too long to provide useful results. This characteristic has forbidden its widespread and practical use regardless the existence of new techniques, such as schema-based mutation and selective mutation. Additionally, there are no mutation testing tools (to our knowledge) that work on meta-circular and dynamic environments, such as Smalltalk, so compile and link time are the current technique's bottleneck.
This Smalltalk-based tool was developed at the University of Buenos Aires (Argentina) in the context of the final thesis work. The tool uses Smalltalk's dynamic and meta-programming facilities to notably reduce the time to get valuable output and help to understand and implement new tests due to its integration with the rest of the environment.