-
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
Latest version reports mutants as killed when they haven't run because of a runner error #131
Comments
@Kimpossibru Thanks for your extensive issue Could you please provide me with version information on your stryker dependencies? This command should do the trick:
The reporting of errors as killed was a recent, but deliberate, addition (#120). When creating mutants right now, we might create type errors. @simondel maybe we should change this behavior? Can we make sure we are not creating type errors when creating mutants? |
@nicojs thanks for your quick response. I've run the command and this is the output:
I've uploaded the workspace as well: bart-stryker.zip To run it:
Output will say:
Whereas one mutation should be killed and one should not.
|
Awesome, I tried it locally and that fixes it. Thanks! |
New release done, v0.4.1 Basically what happens is that we send the This initialization step was a new addition. Now we wait for initialization to be fully completed before we start to run tests. It should result in less false positives. Btw: you can also enable test output with |
@simondel Do you think we should add an issue to handle errors during mutation run differently? Seems a lot safer. |
@nicojs How would you know the difference between a 'good' error (one caused by a mutation) and a bad one? (like in this case) |
I've installed the latest version and have a simple function:
And the unit test:
If I understand correctly, this mutant should not be marked killed since the mutation a - b still will be truthy, so the unit test doesn't fail (and a good unit test should fail).
I found the issue after messing about in the code. If I change IsolatedTestRunnerAdapter.js and change "silent: false" to "silent: true" I can see a lot more useful output that isn't displayed even with logLevel all.
The initial unit tests are run correctly. If I make a failing unit test, it will report that the initial run failed.
FYI I faked the cpu count to 1 for less output, but it also doesn't work with 8 cpu's.
I see something like this:
But then after generating the mutants and trying to run the mutants, I see this:
I messed around a little with ports and such to try to get it to work, but no such luck.
Then I tried changing KarmaTestRunner.js to use Chrome instead of PhantomJS. The initial test run will then run in Chrome and that still works correctly, but then I still get "No captured browser".
So the issue is twofold.
First of all, "No captured browser" basically results in all mutants being killed because the unit test itself isn't actually running, but some other error occurs, namely:
[TypeError: Cannot read property 'error' of null]
No clue where this error occurs. Anyway, when running the test fails like this, it should not report the mutants as killed.
But I would like to solve this issue as well of course. Does anyone have any clue why the initial test run goes fine, but running the mutants returns "No captured browser"? Could be an issue with Karma, but I just don't understand why the initial run is fine and then it fails. Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: