-
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
Support only run the initial test run (dry run) #3088
Comments
My hopes are that running unit tests normally is enough. You generally want to share the test runner configuration with stryker using That being said, there are still slight differences for Stryker vs your test runner. I think this will work: We might want to add a |
Ok, i just checked what As a side note: maybe it's worth documenting this behavior of the option? Something like
Update: I can confirm that it works nicely and the cli output it already properly indicating what is going on and the exit code is 0:
|
Dryrun works by passing a glob that matches no file. Additionally we reduce the reporters since there is nothing to report anyways. I decided to go for a CLI approach instead of a separate config file, since there is no way to extend config files, and I would like to avoid that we need to keep the two files in sync. stryker-mutator/stryker-js#3088
Dryrun works by passing a glob that matches no file. Additionally we reduce the reporters since there is nothing to report anyways. I decided to go for a CLI approach instead of a separate config file, since there is no way to extend config files, and I would like to avoid that we need to keep the two files in sync. stryker-mutator/stryker-js#3088
Using brodybits@brodybits-mini-mac-book xmldom % npx stryker run -m '' --reporters progress
16:34:07 (19982) INFO ConfigReader Using stryker.conf.json
16:34:07 (19982) WARN InputFileResolver Glob pattern "" did not result in any files.
16:34:07 (19982) WARN InputFileResolver No files marked to be mutated, Stryker will perform a dry-run without actually mutating anything. You can configure the `mutate` property in your config file (or use `--mutate` via command line).
16:34:07 (19982) INFO Instrumenter Instrumented 0 source file(s) with 0 mutant(s)
16:34:08 (19982) INFO ConcurrencyTokenProvider Creating 4 test runner process(es).
16:34:08 (19982) INFO DryRunExecutor Starting initial test run (command test runner with "off" coverage analysis). This may take a while.
16:34:37 (19982) INFO DryRunExecutor Initial test run succeeded. Ran 1 tests in 28 seconds (net 28741 ms, overhead 2 ms).
16:34:37 (19982) INFO MutationTestExecutor Done in 30 seconds. +1 (+100) for getting this dry run only behavior more explicitly documented in case it may help any others. P.S. Getting rid of the |
I thought about this approach, and it is not a "true dry run". Using With all of that being said, I think we should support a |
We are currently having an update of @stryker/core in our pipeline that we needed to revert because the initial test run failed on master. After reading your comment I will check if the dryrun would actually fail or only the "instrumented" run fails. I will update this comment when I know the result. (I'm not trying to talk about why it fails here, if required I will file a new issue for that. It's just to support the case for a proper dry-run.) |
Dryrun works by passing a glob that matches no file. Additionally we reduce the reporters since there is nothing to report anyways. I decided to go for a CLI approach instead of a separate config file, since there is no way to extend config files, and I would like to avoid that we need to keep the two files in sync. stryker-mutator/stryker-js#3088 revert updates to .github/workflows/stryker.yml
Dry run works by passing a glob that matches no file. Additionally we reduce the reporters since there is nothing to report anyways. We decided to go for a CLI approach instead of a separate config file, since there is no way to extend config files, and we would like to avoid any need to keep the two files in sync. stryker-mutator/stryker-js#3088 Co-authored-by: Christian Bewernitz <coder@karfau.de> Co-authored-by: Christopher J. Brody <chris.brody+brodybits@gmail.com>
I can confirm: (It's caused by stryker adding |
Great, that's what I was afraid of. Please open an issue for the instrumentation error, we'll use this issue to track progress on the dry-run feature |
(This will be the last off topic message, feel free to hide after reading!) I would not file an issue about it, since I'm not sure what to request as a "fix". I think it's fine for Stryker to throw an Error as part of the instrumentation if it needs to. Our test setup was just very special. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
We probably still want this feature. |
Question
Since our stryker run takes around 2 hours to complete we currently only run it on the default branch.
It would be nice if we could still execute just the initial test run in branches to avoid that it fails on master and we need to figure out why it broke/revert...
Stryker environment
Additional context
The text was updated successfully, but these errors were encountered: