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 RoboBar 🤖🍷 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
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:
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!