stryker-mutator / stryker-js

Mutation testing for JavaScript and friends
https://stryker-mutator.io
Apache License 2.0
2.58k stars 246 forks source link

StrykerJS showing 800 hours estimated time of completion. #4000

Open lucky135 opened 1 year ago

lucky135 commented 1 year ago

Question

StrykerJS showing 800 hours estimated time of completion.

Stryker environment

+-- @stryker-mutator/core@6.4.1
+-- @stryker-mutator/jest-runner@6.4.1
+-- jest@26.6.3

Additional context

Here is my Stryker config file.

{
    "$schema": "./node_modules/@stryker-mutator/core/schema/stryker-schema.json",
    "comment": "This config was generated using 'stryker init'.",
    "testrunner": "jest",
    "reporters": [
        "progress",
        "clear-text",
        "html"
    ],
    "coverageAnalysis": "perTest",
    "jest": {
        "projectType": "custom"
        "configFile": "./config/jest/jest.config.js",
        "config": {}
    },
    "tempDirName": "stryker-tmp",
    "dryRunTimeoutMinutes": 120,
    "IgnoreStatic": true,
    "concurrency": 4
}

On my project, it has mutated 2608 files and found about 94k mutation operations. It usually takes me about 30 minutes to run my unit test cases. StrykerJS is taking about 1 hour for dry run execution. For mutation testing it shows about 800 hours and then after 2 3 hours runs out of memory or the Test Runner crashes.

Is there any way to make StrykerJS faster? Am I missing something? Please help.

ArnaudBuchholz commented 1 year ago

It really depends on the structure of your project. I was able to achieve significant optimization by limiting specs that are executed. Please see https://github.com/stryker-mutator/stryker-js/issues/4142#event-9136562433