Mutation testing for Scala
This release updates Scalameta to 4.9.3, resolving an issue some users might have when another plugin is also using a recent version of Scalameta.
This release mainly features improved reporting. The biggest feature is inclusion of tests in the report. Stryker4s will now show all your test suites, and (if supported) the individual tests of each test suite. This makes it easier to see which tests cause failing mutants.
In the HTML report, a new tab is added to show the test results:
Opening a test suite reveals the tests inside that suite, clicking on one shows more information available about what mutants it covers and might have killed:
Back on the mutant tab, each mutant will now show what tests are covered by it. And for killed mutants the test exception output is shown:
Regex mutations now show the precise characters inside the expression that has been mutated as its location, and a richer description with info about the mutation is added:
This patch release mostly refactors some internal module layout.
For Maven users, the default files to mutate configuration now uses Maven project info. For sbt users, using a snapshot release of the plugin will no longer require also adding a snapshot resolver to your project too (it is done automatically now).
This release updates log4j to 2.16.0
for the command-runner to fix the security issue. If you use the sbt or Maven plugin, this has no impact as those plugins do not use log4j. If you use the command-runner, upgrading is recommended.
Also updates the HTML report to a newer version with some performance fixes and a new 'diff' view https://github.com/stryker-mutator/stryker4s/pull/1028:
Stryker4s is a mutation testing framework. It tests your tests by temporarily inserting small bugs, or mutants, into your production code. Your tests are run for each mutant. If your tests fail, then the mutant is killed. If your tests passed, the mutant survived. The higher the percentage of mutants killed, the more effective your tests are. See the website for more information.
This release adds per-test coverage. That means when testing a mutant, Stryker4s will only run the tests that cover that mutant, instead of all tests. Tests that don't cover a mutant can never kill it. Makes sense, right? That's why we added it. When running Stryker4s on Stryker4s, this improved the performance by about 40% 🥳! Big thanks to @OssamaSijbesma for adding this feature!
testsCompleted
in the report (#1005) @hugo-vrijswijkStryker4s is a mutation testing framework. It tests your tests by temporarily inserting small bugs, or mutants, into your production code. Your tests are run for each mutant. If your tests fail, then the mutant is killed. If your tests passed, the mutant survived. The higher the percentage of mutants killed, the more effective your tests are. See the website for more information.
I'm thrilled to release this new version of Stryker4s. When Stryker4s was first released 3 years ago (time flies!), it's two major problems for large adoption were performance and handling compile errors. Performance got a big improvement in v0.10.0
and v0.12.0
. With this release, Stryker4s will detect if a mutant causes a compile error, mark it for the report, and cleanly rollback to continue with the rest of the mutants. This means compile-errors won't have to be manually excluded per file or with annotations anymore! Huge thanks to @MartinWelgemoed for contributing this feature!
This release also uses Protobuf for inter-process communication. Unfortunately, this means dropping support for Scala 2.11. The last release for 2.11 was 4 years ago, and is not supported anymore by most libraries. If you still need 2.11 support, then older Stryker4s versions will keep working. Using Protobuf makes Stryker4s faster, safer and easier to debug.
Speaking of easier to debug, there's two new config options for debugging: debug.debug-test-runner
and debug.log-test-runner-stdout
which opens up debug arguments to the test-runner, and log test-runner output to debug
only when enabled, respectively. Read more about the new options in the configuration docs.