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

Mutation test report showing zero mutation score #2686

Closed
LokeshGangaiah opened this issue Jan 5, 2021 · 6 comments
Closed

Mutation test report showing zero mutation score #2686

LokeshGangaiah opened this issue Jan 5, 2021 · 6 comments
Labels
⁉ Question Further information is requested ☠ stale Marked as stale by the stale bot, will be removed after a certain time.

Comments

@LokeshGangaiah
Copy link

LokeshGangaiah commented Jan 5, 2021

Question

Why would my report show the score has zero ? please see the attached screen shot

Screen Shot 2021-01-06 at 10 49 26 am

Stryker environment

npm ERR! peer dep missing: @angular/common@^8.0.0, required by @ng-idle/core@8.0.0-beta.4
npm ERR! peer dep missing: @angular/core@^8.0.0, required by @ng-idle/core@8.0.0-beta.4
npm ERR! peer dep missing: @ngrx/store@8.6.1, required by @ngrx/store-devtools@8.6.1
npm ERR! peer dep missing: node-sass@^4.0.0, required by sass-loader@8.0.2
npm ERR! peer dep missing: fibers@>= 3.1.0, required by sass-loader@8.0.2
npm ERR! peer dep missing: html-webpack-plugin@^2.21.0 || ~3 || >=4.0.0-alpha.2 <5, required by webpack-subresource-integrity@1.4.0
npm ERR! peer dep missing: bufferutil@^4.0.1, required by ws@7.4.2
npm ERR! peer dep missing: utf-8-validate@^5.0.2, required by ws@7.4.2
npm ERR! peer dep missing: bufferutil@^4.0.1, required by ws@7.4.2
npm ERR! peer dep missing: utf-8-validate@^5.0.2, required by ws@7.4.2
npm ERR! peer dep missing: bufferutil@^4.0.1, required by ws@7.4.2
npm ERR! peer dep missing: utf-8-validate@^5.0.2, required by ws@7.4.2
├─┬ @stryker-mutator/core@4.3.1
│ ├─┬ @stryker-mutator/api@4.3.1
│ ├─┬ @stryker-mutator/instrumenter@4.3.1
│ │ ├── @stryker-mutator/api@4.3.1 deduped
│ │ ├── @stryker-mutator/util@4.3.1 deduped
│ ├─┬ @stryker-mutator/util@4.3.1
├─┬ @stryker-mutator/karma-runner@4.3.1
│ ├── @stryker-mutator/api@4.3.1 deduped
│ ├── @stryker-mutator/util@4.3.1 deduped
├─┬ @stryker-mutator/typescript-checker@4.3.1
│ ├── @stryker-mutator/api@4.3.1 deduped
│ ├── @stryker-mutator/util@4.3.1 deduped
  "karma": "~5.1.0",

Additional context

this will not happen if i run or include more test scenarios or something like that i am not sure need to debug why

@LokeshGangaiah LokeshGangaiah added the ⁉ Question Further information is requested label Jan 5, 2021
@LokeshGangaiah LokeshGangaiah changed the title Mutation test report showing blank mutation score Mutation test report showing zero mutation score Jan 5, 2021
@simondel
Copy link
Member

simondel commented Jan 6, 2021

All the mutants have the state survived this means no test failed when they were put into your code. Because of this, you get a score of 0%. If you add (more) tests for the code that is being mutated, your score might increase because tests may fail when the mutant is inserted.

More info can be found here: https://stryker-mutator.io/docs/

@LokeshGangaiah
Copy link
Author

@simondel i ran it for a bigger piece of code/test, even this has the mutation scrore has zero,please see the screenshot attached, its even bigger than the screen shot but all of them are zero.
Screen Shot 2021-01-07 at 8 31 03 am

@nicojs
Copy link
Member

nicojs commented Jan 12, 2021

Are you using app-root-path or NODE_PATH to redefine imports? If so, Stryker might be running your un-mutated code, instead of running your code in the sandbox.

@LokeshGangaiah
Copy link
Author

Are you using app-root-path or NODE_PATH to redefine imports? If so, Stryker might be running your un-mutated code, instead of running your code in the sandbox.

@nicojs not using app-root-path/node_path, the stryker is running in the sandbox, see the logs from the run:


10:28:45 (70977) INFO ConcurrencyTokenProvider Creating 1 test runner process(es).
10:28:45 (70977) DEBUG Sandbox Creating a sandbox for files in /Users/lokesh/git/front-end-api/.stryker-tmp/sandbox8768767
10:28:45 (70977) INFO DryRunExecutor Starting initial test run. This may take a while.

@nicojs
Copy link
Member

nicojs commented Jan 25, 2021

I think I've found the cause while I was implementing --inPlace mode and fixed it, see #2706

@LokeshGangaiah please try again with @stryker-mutator/karma-runner@4.4.0

@stale
Copy link

stale bot commented Jan 28, 2022

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.

@stale stale bot added the ☠ stale Marked as stale by the stale bot, will be removed after a certain time. label Jan 28, 2022
@stale stale bot closed this as completed Feb 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⁉ Question Further information is requested ☠ stale Marked as stale by the stale bot, will be removed after a certain time.
Projects
None yet
Development

No branches or pull requests

3 participants