Stryker初始运行超时



简单运行"stryker run";,突变正在被创建,一切似乎都运行得很顺利,直到我收到干运行失败的错误:

22:19:29 (12628) DEBUG JestTestRunner Running jest with --findRelatedTests flag. Set jest.enableFindRelatedTests to false to run all tests on every mutant.
22:24:17 (9652) DEBUG TimeoutDecorator Timeout expired, restarting the process and reporting timeout
22:24:19 (9652) DEBUG ChildProcessProxy Disposing of worker process 12952
22:24:21 (9652) DEBUG ChildProcessProxy Kill 12952
22:24:26 (9652) DEBUG ChildProcessProxy Started ChildProcessTestRunnerWorker in child process 20336
22:24:38 (9652) ERROR DryRunExecutor Initial test run timed out!
22:24:38 (9652) DEBUG Stryker Not removing the temp dir because an error occurred
22:24:38 (9652) ERROR Stryker Unexpected error occurred while running Stryker Error: Something went wrong in the initial test run
at DryRunExecutor.validateResultCompleted (C:UsersavalchevIdeaProjectsprojectnode_modules@stryker-mutatorcoredistsrcprocess3-dry-run-executor.js:61:15)
at DryRunExecutor.timeDryRun (C:UsersavalchevIdeaProjectsprojectnode_modules@stryker-mutatorcoredistsrcprocess3-dry-run-executor.js:71:14)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async C:UsersavalchevIdeaProjectsprojectnode_modules@stryker-mutatorcoredistsrcconcurrentpool.js:62:28

请记住,当我的配置为true时,我会将jest.enableFindRelatedTests设置为false。如果我把它设置为false,调试器会说set jest.enableFindRelatedTests为true。所以这就是为什么我一起删除

这是我的配置:

/**
* @type {import('@stryker-mutator/api/core').StrykerOptions}
*/
module.exports = {
_comment:
"This config was generated using 'stryker init'. Please see the guide for more information: https://stryker-mutator.io/docs/stryker-js/guides/angular",
mutate: [
"*/.ts",
"!**/*.spec.ts",
"!**/*test.ts"
],
testRunner: "jest",
"jest": {
"projectType": "custom",
"configFile": "jest.config.js",
"config": {
"testEnvironment": "jest-environment-jsdom-sixteen"
}
},
tempDirName: "stryker-tmp",
reporters: ["progress", "clear-text", "html"],
concurrency: 4,
concurrency_comment:
"Recommended to use about half of your available cores when running stryker with angular",
coverageAnalysis: "perTest",
};

在Stryker配置文件中,我添加了timeoutMS设置,以增加每次测试使用的时间。我把它设置为30秒(30000(。

timeoutMS: 30000   // Use extended timeoutMs for test run to remove Time Out Results

对于有角度的用户在文档中,您可以看到两个安装选项。请使用npm安装-保存dev@stryker mutator/core

然后它将工作

最新更新