joeljeske / karma-parallel

A Karma JS Framework to support sharding tests to run in parallel across multiple browsers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for custom shardStrategy

tomastrajan opened this issue · comments

It would be amazing if there would be a way to pass in function that follows the same API as currently existing round-robin and description-length strategy so that we can customize how we want to separate tests.

Eg in legacy Angular / AngularJS portal there are different types of tests:

  1. AngularJS javascript
  2. AngularJS typescript
  3. Angular typescript

Also there are tests for multiple applications so it would be great if I could run them together (eg based on regexp for the path /src/applications/app1)

Would this be possible?

I have added support for a custom shard strategy function that you can configure in the karma conf. It will run for each top-level describe block and it is expected to return true or false to determine if the describe block should run in the current executor instance. Please read the notes in the README for more info.

@joeljeske amazing! thank you very much!