This is the contribution guide for Stryker. Great to have you here! Here are a few ways you can help make this project better.
- Simon de Lang: Stryker dev. Started Stryker as part of his thesis at Info Support. simondel on github.
- Nico Jansen: Stryker dev. Originally came up with the idea for the mutation testing framework as a thesis at Info Support. nicojs on github or @_nicojs on twitter
- Sander Koenders: Stryker dev. Creator of the stryker-webpack-plugin and stryker-jest-runner.
Get in touch with us through twitter or via the Stryker gitter.
Please adher to our editorconfig rules. The easiest way to do that is by installing the editorconfig plugin in your code editor of choice. For VSCode, use the editorconfig vscode extension
We use Lerna to manage the packages in this repository. You don't have to install it globally. The packages themselves can be found in the packages folder. npm commands such as npm test
can be executed from the root of the project but executing them inside of a package folder is more time efficient. However, we suggest running npm test
in the root of the project before a commit to ensure that everything still works. To get Stryker running locally, please follow these steps:
- Clone the repository
- Install dependencies using
npm install
in the root of the project - Run
npm run build
in the root of the project once. You can also runnpm test
in the root, as that will trigger a build as well. - Running
npm test
in one of the package folders also works. Just remember that those will not trigger a build. So you'll have to runnpm run build
before that if you want code changes to be tested.
We've chosen to check in in our vscode configuration. This makes development unified amongst stryker developers. VSCode is an open source code editor maintained by Microsoft. For more info and the download link, please visit https://code.visualstudio.com/.
After cloning this repo, open the workspace with $ code workspace.code-workspace
(or open code and use file -> Open Workspace...).
Some quick notes to help you get started:
- On the left side, you can see all stryker projects and plugins. Open files from there.
- Use
CTRL+B
(or⌘+B
on OSX) to open up the Run build task menu. This can enable typescript watch for a plugin directory. - Use
CTRL+Shift+D
(or⌘⇧D
on OSX) to open up the debug pane. Here you can select a config to run. For example: select "Unit tests (stryker-api)" to run the unit tests for thestryker-api
package.
- You can run the tests with
CTRL+F5
(or⌃F5
on OSX). - You can debug the tests with
F5
(alsoF5
on OSX). Setting breakpoints in your code and inspecting variables work as expected.
Have fun!
We support mutation testing Stryker with Stryker! After you got Stryker working locally, you can follow these steps to mutation test Stryker:
- Navigate to the root of the project
- Build all Stryker packages:
npm run build
- Navigate to
packages/stryker
- Run
node bin/stryker run
New features are welcome! Either as requests or proposals.
- Please create an issue first or let us know via the Stryker gitter
- Create a fork on your github account.
- When writing your code, please conform to the existing coding style.
See .editorconfig, the typescript guidelines and our tslint.json
- You can check if there are lint issues using
npm run lint-info
. Output will be in root folder intslint.log
file. - You can automatically fix a lot of lint issues using
npm run lint-fix
- You can check if there are lint issues using
- Please create or edit unit tests or integration tests.
- Run the tests using
npm test
- When creating commits, please conform to the angular commit message style.
Namely in the form
<type>(<scope>): <subject>\n\n[body]
- Type: feat, fix, docs, style, refactor, test, chore.
- Scope can the the file or group of files (not a strict right or wrong)
- Subject and body: present tense (
changedchange,addedadd) and include motivation and contrasts with previous behavior
Don't get discouraged! We estimate that the response time from the maintainers is around a day or so.
Found a bug? Don't worry, we'll fix it, or you can ;)
Please report a bug report on our issues page. In this please:
- Label the issue as bug
- Explain what the bug is in clear English
- Include reproduction steps This can be an example project, code snippit, etc
- Include the expected behaviour.
- Include actual behaviour.
- Add more details if required (e.g. which browser, which test runner, which versions, etc)
Do you want to help? Great! These are a few things you can do:
- Evangelize mutation testing
Mutation testing is still relatively new, especially in JavaScript. Please help us get the word out there!
Share your stories in blog posts an on social media. Please inform us about it! - Did you use Stryker? Your feedback is very valuable to us. Good and bad! Please contact us and let us know what you think!