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

Test runner blows up on first run: [ERROR] TestRunnerChildProcessAdapter #1034

Closed
NodeGuy opened this issue Jul 18, 2018 · 5 comments
Closed
Assignees

Comments

@NodeGuy
Copy link

NodeGuy commented Jul 18, 2018

Summary

I'm trying to use Stryker for the first time on https://gitlab.com/NodeGuy/channel and it appears to break when it hits a mutant (I'm guessing):

$ stryker run
[2018-07-18 18:00:11.550] [INFO] ConfigReader - Using stryker.conf.js in the current working directory.
[2018-07-18 18:00:11.952] [INFO] InputFileResolver - Found 1 of 20 file(s) to be mutated.
[2018-07-18 18:00:11.955] [INFO] InitialTestExecutor - Starting initial test run. This may take a while.
[2018-07-18 18:00:14.545] [INFO] InitialTestExecutor - Initial test run succeeded. Ran 49 tests in 2 seconds (net 100 ms, overhead 85 ms).
[2018-07-18 18:00:14.962] [INFO] Stryker - 252 Mutant(s) generated
[2018-07-18 18:00:15.055] [INFO] SandboxPool - Creating 8 test runners (based on CPU count)
Mutation testing  [======                                            ] 12% (ETC 30.1s) 31/252 tested (4 survived)[2018-07-18 18:00:21.788] [ERROR] TestRunnerChildProcessAdapter - /Users/david/Documents/projects/channel/.stryker-tmp/sandbox7828783/lib/index.js:85
      const { cancelled, resolve } = pushes[resolvedIndex];
              ^

TypeError: Cannot destructure property `cancelled` of 'undefined' or 'null'.
    at Immediate.processOrders (/Users/david/Documents/projects/channel/.stryker-tmp/sandbox7828783/lib/index.js:85:44)
    at runCallback (timers.js:763:18)
    at tryOnImmediate (timers.js:734:5)
    at processImmediate (timers.js:716:5)

[2018-07-18 18:00:21.797] [ERROR] TestRunnerChildProcessAdapter - Child process exited with non-zero exit code 1. Last 10 message from the child process were: 
	[2018-07-18 18:00:15.934] [DEBUG] PluginLoader - Loading stryker-* from /Users/david/Documents/projects/channel/node_modules
[2018-07-18 18:00:15.942] [DEBUG] PluginLoader - Loading plugins stryker-javascript-mutator (matched with expression stryker-*)
[2018-07-18 18:00:15.943] [DEBUG] PluginLoader - Loading plugins stryker-mocha-framework (matched with expression stryker-*)
[2018-07-18 18:00:15.943] [DEBUG] PluginLoader - Loading plugins stryker-mocha-runner (matched with expression stryker-*)

	[2018-07-18 18:00:15.943] [DEBUG] PluginLoader - Loading plugins stryker-javascript-mutator

	[2018-07-18 18:00:17.309] [DEBUG] PluginLoader - Loading plugins stryker-mocha-framework

	[2018-07-18 18:00:17.326] [DEBUG] PluginLoader - Loading plugins stryker-mocha-runner

	[2018-07-18 18:00:17.590] [DEBUG] IsolatedTestRunnerAdapterWorker - Changing current working directory for this process to /Users/david/Documents/projects/channel/.stryker-tmp/sandbox7828783

[2018-07-18 18:00:21.799] [ERROR] StrykerCli - an error occurred Test runner child process exited with non-zero exit code 1

Stryker config

module.exports = function(config) {
  config.set({
    testRunner: "mocha",
    mutator: "javascript",
    transpilers: [],
    reporter: ["clear-text", "progress"],
    testFramework: "mocha",
    coverageAnalysis: "perTest",
    mutate: ["lib/**/*.js"]
  });
};

Stryker environment

$ npm ls | grep stryker
├─┬ stryker@0.24.2
├─┬ stryker-api@0.17.3
├─┬ stryker-javascript-mutator@0.7.3
├─┬ stryker-mocha-framework@0.10.3
└─┬ stryker-mocha-runner@0.12.3

Your Environment

software version(s)
node v9.11.1
npm 5.6.0
Operating System macOS 10.13.4
@ghost ghost assigned simondel Jul 20, 2018
@ghost ghost added the 🛠 In progress label Jul 20, 2018
@simondel
Copy link
Member

simondel commented Jul 20, 2018

Thanks for opening this issue! I have created a branch on which I'll resolve this issue. I'll let you know once we've released a fix.

By the way, your mutation score is 93.44% 🥇

@simondel
Copy link
Member

Fixed with:
stryker@0.25.1
stryker-api@0.18.0
stryker-javascript-mutator@0.8.0
stryker-mocha-framework@0.11.0
stryker-mocha-runner@0.13.0

@NodeGuy
Copy link
Author

NodeGuy commented Jul 23, 2018

Wowee, that was fast! Thanks!

@simondel
Copy link
Member

During testing I noticed that Stryker does not shut down after it is done. This may be due to your tests still using some resources on your system.

@nicojs
Copy link
Member

nicojs commented Jul 23, 2018

Might be fixed on the latest branch I've been working on. 976-silent-testrunners

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants