We are facing an issue where our tests will start failing or running extremely slow after a certain point. I have seen articles online where others too are facing issues. The primary reason for those failures are memory consumed by browsers while we deal with DOM. We are using seed project which builds our application using SystemJS. Our Current version of Angular is 2.2.3.
So, I am thinking of a work around where I can either parallel process our test runs (i.e. multiple karma server running, I did try that but it starts to consume 100% CPU) or batch processing. So, batches of small test runs which will ensure that karma is stopped and started again.
Is there a way?
Also, if we are able to achieve that, how to get a consistent coverage? We are using istanbul.
Please let me know if you have any more questions.
e.g. our service and model related tests run in 3 seconds (500+ tests) but our component tests (900+) take 15 mins.