Skip to content

Latest commit

 

History

History
100 lines (70 loc) · 5.91 KB

CONTRIBUTING.md

File metadata and controls

100 lines (70 loc) · 5.91 KB

Contribute to Stryker

This is the contribution guide for Stryker. Great to have you here! Here are a few ways you can help make this project better.

Team members

  • 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.

Learn & listen

Get in touch with us through twitter or via the Stryker gitter.

Code style

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

Runner Stryker locally

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:

  1. Clone the repository
  2. Install dependencies using npm install in the root of the project
  3. Run npm run build in the root of the project once. You can also run npm test in the root, as that will trigger a build as well.
  4. 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 run npm run build before that if you want code changes to be tested.

VSCode environment configuration

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:

  1. On the left side, you can see all stryker projects and plugins. Open files from there.
  2. Use CTRL+B (or ⌘+B on OSX) to open up the Run build task menu. This can enable typescript watch for a plugin directory.
  3. 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 the stryker-api package.
  • You can run the tests with CTRL+F5 (or ⌃F5 on OSX).
  • You can debug the tests with F5 (also F5 on OSX). Setting breakpoints in your code and inspecting variables work as expected.

Have fun!

Running Stryker on Stryker

We support mutation testing Stryker with Stryker! After you got Stryker working locally, you can follow these steps to mutation test Stryker:

  1. Navigate to the root of the project
  2. Build all Stryker packages: npm run build
  3. Navigate to packages/stryker
  4. Run node bin/stryker run

Adding new features

New features are welcome! Either as requests or proposals.

  1. Please create an issue first or let us know via the Stryker gitter
  2. Create a fork on your github account.
  3. 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 in tslint.log file.
    • You can automatically fix a lot of lint issues using npm run lint-fix
  4. Please create or edit unit tests or integration tests.
  5. Run the tests using npm test
  6. 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.

Bug triage

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:

  1. Label the issue as bug
  2. Explain what the bug is in clear English
  3. Include reproduction steps This can be an example project, code snippit, etc
  4. Include the expected behaviour.
  5. Include actual behaviour.
  6. Add more details if required (e.g. which browser, which test runner, which versions, etc)

Community

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!