Stryker: The tests take too long to run

Created on 30 Sep 2020  ·  4Comments  ·  Source: stryker-mutator/stryker

Hello guys, I need your help.

I have a project in Angular 8 with about 400 unit tests implemented with Karma / Jasmine.

My computer has 8 cores and in the maxConcurrentTestRunners property I tested both by placing 2 and 4 - on the Striker website it is said for Angular applications to use half the number of cores.

When I run the styker run command it is said that approximately 3600 mutants have been generated and that the estimated execution time is 40 hours.

Is there anything to be done to reduce this time of execution? 40 hours becomes impracticable.

Unfortunately I can't publish code because it is all in a business environment.

For installing the Styker in the Angular project I followed the basic tutorial available on the website:

  1. $ npm install -g stryker-cli
  2. $ npm install --save-dev @ stryker-mutator / core
  3. $ stryker init (at this stage I made the appropriate selection of Angular and Karma projects)
  4. $ stryker run

Does anyone have any idea what it is or is it really?

⁉ Question

Most helpful comment

Angular component tests are slow. A few things to try:

  1. Enable Ivy, there seems to be performance improvements (2x)
  2. Migrate to Jest to run suites in parallel (>2x)

All 4 comments

Well... if we somehow could add all mutants to the code at the same time, that might save some time... 🤔

Oh wait. We're doing that right now 😅

Please try out the latest beta. You can read more about it here: https://stryker-mutator.io/blog/2020-07-13/announcing-stryker-4-beta-mutation-switching

We've found a > 50% performance improvement in our angular performance test.

nico 50% of 40h is still 20h :x

@belmirofss we've released v4 yesterday with this improvement. Would you mind checking it out? https://stryker-mutator.io/blog/2020-10-07/announcing-stryker-4-mutation-switching

Angular component tests are slow. A few things to try:

  1. Enable Ivy, there seems to be performance improvements (2x)
  2. Migrate to Jest to run suites in parallel (>2x)
Was this page helpful?
0 / 5 - 0 ratings

Related issues

Chowarmaan picture Chowarmaan  ·  18Comments

j-truax picture j-truax  ·  20Comments

Zorin95670 picture Zorin95670  ·  18Comments

VincentLanglet picture VincentLanglet  ·  31Comments

Lakitna picture Lakitna  ·  42Comments