• Stars
    star
    198
  • Rank 196,898 (Top 4 %)
  • Language
    Scala
  • License
    Apache License 2.0
  • Created over 6 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Mutation testing for Scala

Maven Central Build status Mutation testing badge Slack Chat

stryker-80x80

Stryker4s

Professor X: For someone who hates mutants... you certainly keep some strange company.
William Stryker: Oh, they serve their purpose... as long as they can be controlled.

Introduction

For an introduction to mutation testing and Stryker's features, see stryker-mutator.io. Looking for mutation testing in JavaScript or .NET?

Getting Started

For the quickstart, see our website's quickstart.

Stryker4s is a mutation testing framework for Scala. It allows you to test your tests by temporarily inserting bugs. Depending on your project setup, there are multiple ways to get started with Stryker4s.

Sbt plugin

Stryker4s provides a sbt plugin for easy use within sbt projects. To install the plugin, add the following line to plugins.sbt Maven Central:

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

After adding the plugin, Stryker4s can be used by running sbt stryker in the root of your project.

Multi-module projects

Multi-module projects are not yet fully supported. However, there is a workaround you can use while we work on a better solution. Set the base-directory to the correct directory of the submodule with the base-dir configuration setting. Then you can run sbt "project yourSubmoduleNameHere" stryker to set the active project and run Stryker4s.

Maven plugin

The Maven plugin can be added as follows in pom.xml under <plugins> Maven Central:

<plugin>
    <groupId>io.stryker-mutator</groupId>
    <artifactId>stryker4s-maven-plugin</artifactId>
    <version>${stryker4s.version}</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.

Pre-release versions

We also publish SNAPSHOT versions of each commit on master. To use a pre-release, add the following setting to your build.sbt and plugins.sbt:

resolvers ++= Resolver.sonatypeOssRepos("snapshots")

Then replace the Stryker4s version with this version: Sonatype Nexus (Snapshots).

Configuration

See the configuration page for setting up your stryker4s.conf file (optional).

Supported mutators

Stryker4s supports a variety of mutators, which can be found here. Do you have a suggestion for a (new) mutator? Feel free to create an issue!

An always up-to-date reference is also available in the MutantMatcher source.

Changelog

See the releases page for all the latest changes made.

Contributing

Want to contribute? That's great! Please have a look at our contributing guide.

More Repositories

1

stryker-js

Mutation testing for JavaScript and friends
TypeScript
2,562
star
2

stryker-net

Mutation testing for .NET core and .NET framework!
C#
1,755
star
3

stryker-handbook

A comprehensive guide to the stryker ecosystem
71
star
4

mutation-testing-elements

🗃 A schema for mutation testing results with the web components to visualise it 📊
TypeScript
28
star
5

stryker-jest-runner

A plugin to use the Jest test runner and framework in Stryker, the JavaScript mutation testing framework
27
star
6

stryker-mutator.github.io

Repository to maintain our stryker-mutator.io website
TypeScript
26
star
7

stryker-dashboard

See your mutation testing reports from anywhere 🚀
TypeScript
23
star
8

robo-coasters-example

An example project for Stryker
JavaScript
15
star
9

azure-devops-mutationreport-publisher

Azure Devops extension to publish and display the mutation testing report in the build result
TypeScript
11
star
10

sonar-stryker-plugin

A plugin to report stryker results to Sonar
Java
11
star
11

stryker-cli

The command-line interface for Stryker, the JavaScript mutation testing framework
TypeScript
10
star
12

weapon-regex

Mutating your regular expressions! For Scala and JS.
Scala
9
star
13

stryker4k

Kotlin
7
star
14

github-action

Shell
4
star
15

stryker-playground

Practice mutation testing with Stryker.
C#
2
star
16

stryker-karma-runner

A plugin to use the karma test runner in Stryker, the JavaScript mutation testing framework
2
star
17

stryker-html-reporter

A HTML reporter for stryker - the JavaScript mutation testing framework
1
star
18

stryker-tape-runner

A plugin to use the tape test runner in Stryker, the JavaScript mutation testing framework
TypeScript
1
star