-
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
Stryker runs are not consistent #291
Comments
@jeznag thanks for reporting this issue. Unfortunately i have issues reproducing this on my windows machine. Could you explain to me what it is exactly that you modify in
I will also try it on a linux environment later today or tomorrow. |
Ah Windows probably doesn't pay attention to the shebang. You can do:
|
I can now run it on my windows machine. The command i use is:
However, i always get exactly 60 errors. A ran it about 10 times or so. I've printed the errors to console using debug logging and the clear text reporter and it seems that they all have to do with stryker mutating a regex string. All is working as expected as far as i can see...
An example of an errored mutant:
Indeed, if you subtract this string, i would expect there to be an error. |
@nicojs I tried it on my other macbook and I still get inconsistent results. Could this relate to an issue with the operating system? |
I feel like it must have something to do with that, maybe in combination with your project. I can't debug this further without repoducing it. |
I'm facing the same issue (on the same OS). It's not that extreme as with @jeznag and it took me a dozen of test runs to reproduce this: I expect 10 mutants to survive. They are all the same on typescript-generated code:
But sometimes that mutant get killed spontaneously in CustomCss.js:
Or all of a sudden in Highlight.js
Sometimes mutants are not generated. Looks like concurrency related? I had to do multiple test runs to get these results. The issue becomes prevalent when using my stryker-baseline-reporter because all of a sudden you get different baseline outputs on subsequent runs. |
I have the same issue running Stryker on MacOS. The mutation score is different with every run of Stryker. The results are consistent when running Stryker on Windows. |
@khujo Thanks for telling us! Would you be able to create a repository to reproduce this issue? Then we can find some MacBooks to test this on :) |
@simondel Sure, here you go: https://github.com/khujo/stryker-on-mac Running Stryker in this project should produce 5 surviving mutants. Running this on my Mac always produces more mutants (6-8 most of the time). |
@simondel did you ever find the guy with the MacBook? |
@nicojs unfortunately not :( I'm closing this issue for now. We've recently released Stryker v1 and made a lot of changes. If we see this issue with v1 as well. We'll look at it. |
I see this issue on my Mac book as well. |
I've got the same problem on my mac. Has someone tried to run it inside a linux docker container? The results look pretty stable on my Travis CI page: https://travis-ci.org/SockTrader/SockTrader. Edit: SockTrader github |
Thanks for the reactions and the demo repo. @simondel do you think you could test it out on mac hardware using SockTrader? |
@nicojs , can we reopen this issue or create a new one? |
Thanks for the protip. I tried to apply it to SockTrader, but unfortunately build fails immediately. Seems to be Jest related instead of Stryker. See Azure pipeline build. (<= open the "npm install and test" task on Azure to see the details) |
I tried replicating stryker-mutator/stryker-tape-runner#3 with Mocha and found that I had the same issues with the mocha runner. I get different mutant kill scores each time:
Steps to replicate
The text was updated successfully, but these errors were encountered: