Stryker4s 0.15 is Here with Exciting New Features!
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:
<plugin>
<groupId>io.stryker-mutator</groupId>
<artifactId>stryker4s-maven-plugin</artifactId>
<version>0.15.0</version>
</plugin>
๐ 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:
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.