Skip to main content

Getting started

Install Stryker using npm.


1 Prepare

Make sure you have npm and nodejs installed. Open a terminal / command prompt and cd to the root of your project you want to mutation test.

cd my-project

2 Install

The easiest way to get started with Stryker is by using the npm init stryker command.

npm init stryker

This command will first install Stryker and then run the Stryker initializer. During the initialization, you'll be asked a series of questions to help set up Stryker for your project.

If you're asked to install Stryker, choose Yes.

After the init is done, inspect the stryker.config.mjs file.

For more information on what these options mean, take a look at the Configuration docs page

3 Let's kill some mutants

Run Stryker to mutation test your project

npx stryker run

Have troubles running Stryker? Try running with trace logging. You can also take a look at our troubleshooting guide.

npx stryker run --logLevel trace

You can also have a look at the Configuration docs page for more information about the configuration.

Please report any issues you have or let us know via Slack.