Skip to content

Stryker4s v0.3.1

Compare
Choose a tag to compare
@hugo-vrijswijk hugo-vrijswijk released this 29 Mar 17:22
· 1464 commits to master since this release

We just released Stryker4s version 0.3.1! This release provides two new big features! A Maven plugin, and a fancy new HTML reporter. A number of smaller (but also important) are also included.

Maven plugin (#151)

Similar to the sbt plugin, the Maven plugin allows you to easily mutation test your Maven Scala project. Add Stryker4s to your project by adding the following lines to your pom.xml:

<plugin>
    <groupId>io.stryker-mutator</groupId>
    <artifactId>stryker4s-maven-plugin</artifactId>
    <version>0.3.1</version>
</plugin>

You can then run Stryker4s with the command mvn stryker4s:run. Note that this is different than the command for the sbt plugin.

HTML reporter (#176)

You can now output your mutation test report to a nicely readable HTML report. You can enable the report by enabling it in your stryker4s.conf:

reporters: [ "console", "html" ]

After completing a mutation run, a report will be written to target/stryker4s-report-$timestamp/index.html. See the mutation-testing-elements repo for more information.

Changes in logging configuration (#150)

We have also changed the configuration for setting a log level. This is now dependant on what plugin you use to run Stryker4s:

  • sbt plugin:
    • Add logLevel in stryker := Level.Debug in your build.sbt or via the command-line.
    • Options: Debug, Info, Warn, Error
  • Commandrunner:
    • Pass the loglevel as a parameter when running, like so: --debug.
    • Options: --off, --error, --warn, --info, --debug, --trace, --all (not case sensitive)
  • Maven plugin:
    • As a command-line property, like so: mvn -Dorg.slf4j.simpleLogger.defaultLogLevel=warn stryker4s:run.
    • Options: trace, debug, info, warn, or error

Note that the log-level property in stryker4s.conf is no longer used. We plan to add a deprecation warning in the future.

New mutators

The following new mutators are introduced:

  • If statement mutator (#157)
  • takeRight, dropRight, takeWhile, dropWhile mutators (#155)

Bugfixes

  • Update to Scalameta 4.1.5 (#170)
  • Fix topstatement for ! and literals (#163)

Other changes

  • Add vscode settings and suggested extensions (#171)
  • Refactor reporters and log detected mutants (#158)
  • Refactor Mutant and MutantRunner (#154)
  • Verify code formatting with Travis (#146)