cucumber-js icon indicating copy to clipboard operation
cucumber-js copied to clipboard

Implement unified runner concept

Open davidjgoss opened this issue 1 year ago • 0 comments

Currently there are two flavours of "runtime" (or "runner" - the actual test runner part) in cucumber-js: serial (the default) and parallel. This has always been one of the harder parts of the codebase to work with, but it's coming to a head now for a couple of reasons:

  • The parallel implementation has some logic around work assignment that's very challenging to test because it's all coupled to the implementation of the IPC between coordinator and worker
  • We want to start supporting plugins that relate to things the runner does (like retries), but the boundaries between the coordinator and worker worlds are unclear, and there is quite a lot of duplication between the serial and parallel implementations such that there's no good place to start this effort without getting bogged down

From the discussion in https://github.com/cucumber/cucumber-js/discussions/2357, the consensus is that we'll build a generic runner architecture with the coordinator and worker concepts at the core, but with different adapters for serial (single in-process worker) and parallel (multiple workers with IPC).

This should have no effect on user-observable behaviour, but should greatly accelerate our efforts around plugins, and make the parallel functionality better tested and less risky in general.

davidjgoss avatar Aug 16 '24 16:08 davidjgoss