Skip to main content

Stryker4s 0.15 is Here with Exciting New Features!

ยท 3 min read
Hugo van Rijswijk
Stryker4s Team

We're excited to announce the arrival of Stryker4s 0.15. This latest release is filled with exciting new features. It's been a while since our last update, but we think you'll find this one worth the wait.

In this article, we'll guide you through the highlights of this release, including colorized console output, a revamped instrumenting algorithm, and various new configuration options.

New to mutation testing? It's a unique way to assess the quality of your tests. Check out our RoboCoasters ๐Ÿค–๐ŸŽข example to understand why 100% code coverage doesn't tell the whole story. You can also explore our new playground to experience mutation testing in action (C#). Mutation testing is the key to gauging the effectiveness of your tests.

To update or install Stryker4s, adjust your plugins.sbt file:

addSbtPlugin("io.stryker-mutator" % "sbt-stryker4s" % "0.15.0")

For Maven users:


๐ŸŒˆ Colorized Console Outputโ€‹

We've added color to your console output, making it easier to identify essential details. This feature is enabled by default, but you can disable it by setting the NO_COLOR environment variable to true. Stryker4s also strives to automatically adapt to your terminal's capabilities for colorized output. Here's a glimpse of the new output:

Colorized console output of Stryker4s

Colorized Stryker4s report

We're eager to hear your thoughts on these new colors. If you have suggestions or prefer different adjustments, feel free to create a new issue or leave a comment below ๐Ÿ‘‡.

๐Ÿงฌ Revamped Instrumenting Algorithmโ€‹

Before Stryker4s begins running your tests, it must parse and instrument your source code with mutants. We've completely overhauled this process, making it more robust and efficient. The new instrumenter, inspired by StrykerJS, streamlines the process. It also takes advantage of fs2 for parallel streaming, significantly boosting performance. This means Stryker4s can start running your tests faster!

๐Ÿ’ฌ New Dialectsโ€‹

Scala is a fast-evolving language, and to ensure compatibility, we already had the scala-dialect config option. In Stryker4s 0.15, we've introduced the source3 option for Scala 2 codebases using the -Xsource3 flag and the scala3future option for Scala 3 codebases with the -source:future flag ๐Ÿ“ก.

@fabianhjr has also resolved an issue where mutated code wasn't correctly written back to disk using the correct dialect. This mainly affected Scala 3 codebases. Thanks for the fix!

๐Ÿ“ New Configuration Optionsโ€‹

We've added several configuration options to offer more flexibility. The first is the clean-tmp-dir option, which defaults to true. When disabled, Stryker4s won't clean the temporary directory used for instrumented code, which can be handy for debugging. Combine this with static-tmp-dir, and Stryker4s will use the same temporary directory for each run. Both of these options were contributed by @gergelytraveltime.

๐Ÿ“ฆ Maven Plugin Updateโ€‹

Our Maven plugin now builds on Scala 2.13. You can still run Stryker4s with your preferred Scala version, but the plugin itself is now built on 2.13. If you encounter any issues, please don't hesitate to reach out.

๐Ÿ”ฎ What's Next?โ€‹

What's on the horizon? Look forward to the upcoming real-time HTML report for Stryker4s, along with test information integrated into the HTML report. This will help you determine which tests successfully battled the mutants and which didn't.

In the long term, we're exploring the possibility of expanding Stryker4s to other JVM languages, starting with Kotlin. It's a significant undertaking, but stay tuned for updates!

In the meantime, we'd love to hear your thoughts. Share your feedback in the comments below ๐Ÿ‘‡, on our Slack channel, or send us a tweet.