Is there a way to handle Karma - Angular block tests in batches?

We are faced with a problem when our tests begin to fail or run very slowly after a certain point. I saw articles on the Internet where others also run into problems. The main reason for these crashes is the memory consumed by browsers when we are dealing with the DOM. We are using a seed project that builds our application using SystemJS. The current version of Angular is 2.2.3.

So, I'm thinking of working around, where I can either process our test runs in parallel (i.e. work with several karma servers, I tried it, but it starts to consume 100% processor) or batch processing. So, lots of small test runs that ensure that karma is stopped and starts again.

Is there any way?

Also, if we can achieve this, how do we get consistent coverage? We use istanbul.

Please let me know if you have more questions.

eg. our tests related to maintenance and model are completed in 3 seconds (more than 500 tests), but our component tests (900+) take 15 minutes .

+4
source share
1 answer

Karma, - https://www.npmjs.com/package/karma-parallel AngularJS Angular 4 5. 2000 .

0

Source: https://habr.com/ru/post/1676280/


All Articles