Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): add support for checker plugins #2285

Merged
merged 34 commits into from
Jul 3, 2020

Conversation

nicojs
Copy link
Member

@nicojs nicojs commented Jul 3, 2020

Note: should be merged after #2269

Add support for Checker plugins. Checker plugins take the place of the transpiler in a way. When a checker plugin is configured, every mutant is checked before a test runner picks it up. This will allow typescript type checking to take place.

Since checking a mutant can take a long time (~2 sec/mutant on Stryker's core project), we use concurrent processes. These are entirely managed by Stryker core, plugin creators don't need to worry about this.

The algorithm used to determine the number of checkers is ceil(--concurrency / 2). This allows room for floor(--concurrency / 2) test runners. Once the check process is done, all check processes are closed and more test runner processes are spun up to speed up the mutation testing process.

Add --concurrency (or -c) option which set the number of concurrent worker processes to be used by Stryker. A worker can be a checker process or a test runner process.

BREAKING CHANGE:

  • --maxConcurrentTestRunners is now deprecated. Please use --concurrency instead.

nicojs added 30 commits June 19, 2020 17:29
Implement a simple mutation testing process using mutation switching.

BREAKING CHANGE:
* Transpilers are no longer supported, please use build command instead
* Custom mutators are no longer supported, Stryker now brings it's own mutator
* Remove test runner v1 stuff
* Remove mutator plugin stuff
* Remove test framework plugin stuff
* Remove `SandboxPool` (was reimagined as `TestRunnerPool`)
* Remove `MutantTestMatcher` (was reimagined as `findMutantTestCoverage`)
Add --concurrency (or -c) option which set the number of concurrent worker processes to be used by Stryker. A worker can be a checker process, or a test runner process.

BREAKING CHANGE:
* --maxConcurrentTestRunners is now deprecated. Plesae use `--concurrency` instead.
Require `init()` and `dispose()` of the new test runner api to return a `Promise<void>`.
Add support for Checker plugins. Checker plugins take the place of the transpiler in a way. When a checker plugin is configured, every mutant is checked before a test runner pickes it up. This will allow typescript type checking to take place.

Since checking a mutant can take a long time (~2 sec/mutant on Stryker's core project), we use concurrent processes. These are entirely managed by Stryker core, plugin creators don't need to worry about this.

The algoritm used to determine the number of checkers is `ceil(--concurrency / 2)`. This allows room for `floor(--concurrency / 2)` test runners. Once the check process is done, all check processes are closed and more test runner processes are spinned up to speed up the mutation testing process.
@nicojs nicojs merged commit 69358e1 into epic/mutation-switching Jul 3, 2020
@nicojs nicojs deleted the feat/use-checkers branch July 3, 2020 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant