-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): simple mutation switching process (#2269)
Implement a simple mutation testing process using mutation switching. It represents a new way of running mutation testing, where we place all mutants in the code at the same time. This is only the first step and lacks support for more advanced use cases. This is a non-exhaustive list of changes: * Add `Location` to the `Mutant` API, for ease of reporting * Implement `TestRunner2` factory * Revamped the way the main Stryker class works. All of the internals are moved to separate `Executor` classes. An `Executor` is responsible for _managing_ a part of the process. I think this helps enormously to understand the general process of mutation testing. * `PrepareExecutor`: Responsible to read configuration and input files from disk. * `MutantInstrumenterExecutor`: Responsible for instrumenting the source code and generating mutants * `DryRunExecutor`: Responsible for performing the initial test run. * `MutationTestExecutor`: Responsible for running actual mutation testing. * Revamped the `Sandbox` class. It is now only responsible for filling a sandbox with files. It no longer manages mutants inside the sandbox or the test runner instance. * Revamped the `SandboxPool` -> `TestRunnerPool`, which now manages only test runner instances. * An improvement I've managed to sneak in, is that the test runner process from the dry run is now reused in the mutation test run. Not a huge deal, but a nice bonus. * Removed a bunch of dead code related to the `TestFramework` and `Mutator` plugins, see breaking changes * Re-enabled 2 simple e2e tests 🎉 BREAKING CHANGES: Most of these changes are related to internals of Stryker plugins. * Transpilers plugins are no longer supported. Transpiler-like functionality will be possible with a build command and checker API. More on those in future PR's * Custom mutators are no longer supported, Stryker now brings its own mutator in the form of `@stryker-mutator/instrumenter`. It uses babel and an HTML parser under the hood so it has support for all the usual suspects. * Test Framework plugins are no longer supported. Test runners are supposed to bring their own support for test frameworks they might want to support. This has no consequences for the list of officially supported test runners. * Test runner v1 API is no longer supported. Please move to the new Test Runner API.
- Loading branch information
Showing
116 changed files
with
2,977 additions
and
3,532 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/api/src/test_runner2/RunStatus.ts → ...ages/api/src/test_runner2/DryRunStatus.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.