-
Notifications
You must be signed in to change notification settings - Fork 250
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(api): add new test runner api #2249
Merged
Merged
Conversation
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 adds a new test runner api to Stryker. Differences with the old API: 1. Explicit difference between a `dryRun` (initial test run) and a `mutantRun` 2. Code coverage interfaces are replaced with the simpler `MutantCoverage` interface. 3. The `MutantRunOptions` now has a `testFilter`, which replaces the old `TestFramework` api.
…stryker into epic/mutation-switching
nicojs
added a commit
that referenced
this pull request
Jun 17, 2020
Implement new test runner api in the jasmine-runner. See #2249
nicojs
added a commit
that referenced
this pull request
Jun 19, 2020
* Implement new v2 test runner API (see #2249 ) * Make sure to not report coverage when it isn't needed * Add a framework adapter file that adds mutant coverage to the karma result, to be picked up by the stryker reporter * Add test filtering capability when running with jasmine or mocha * Add integration tests on instrumented code. * Some more housekeeping.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a new test runner API to Stryker. Differences with the old API:
dryRun
(initial test run) and amutantRun
activeMutant
field indicating which mutant should be activated by the runnerMutantRunResult
now reports back the status asKilled
orSurvived
instead of letting Stryker make that decision.MutantCoverage
interface.MutantRunOptions
now has atestFilter
, which replaces the oldTestFramework
API.I also took the liberty of adding some improvements.
id
field to aTestResult
and using that id for the filtering instead of the cumbersomeTestSelection
interface we introduced to handle string identifiers (names)TestResult
,DryRunResult
andMutantRunResult
to be implemented using discrimitated unions. This removes a lot of the optional fields. For example,errorMessage
is now a required field on anErrorDryRunResult
.errorMessage
andfailureMessage
to be astring
, instead of astring[]
. If runners want to report more messages, they will have to concatenate themselves.MutantRunResult
no longer has to report back all tests that have run. Instead, it only reports the id of the test that killed the mutant (if the status is indeedkilled
).MutantRunResult
no longer has to report back all tests that have run. Instead, it only reports the id of the test that killed the mutant (if the status is indeedkilled
).toMutantRunResult
helper function that takes in adryRunResult
and can convert it to amutantRunResult
.I've added it as
TestRunner2
, as well as a separate plugin type. This way we can migrate test runner's one by one without breaking the build. Later we can then remove the old test runner API and rename this new one toTestRunner
proper.