Most of my tests are against pure code, with no side-effects. Then there are some tests that exercise the database, Elasticsearch and whatnot. I’ve designed these tests so that there are no dependencies between them, they operate on isolated entities etc. On other words: all my tests should now be ready for parallel execution. I know Lazytest doesn’t currently support this, but are there plans for it? Would there be interest in help towards the goal of supporting parallel tests (somehow)? The only prior art I know of in Clojure is this: • https://github.com/lambdaisland/kaocha/pull/234 • https://github.com/weavejester/eftest#multithreading
i've thought about it! it's a little complicated but i think overall doable
lazytest doesn't use any dynamic variables, so parallel execution could also be stateless in that way
but right now the runner is a series of recursive calls with nothing more special
you're the first person to ask about it, so let me spend some time thinking it through, and maybe i can set it up for you
Yeah, thanks! I’ll think about it some more too - it’ll probably help with a clear problem statement, and some use cases. I’ll write something and post an issue, probably tomorrow.
try looking at the shape of a test run before it is ran
the shape of the suites with children and test cases
i think a new runner function or multimethod could call into the existing one for the suites inside vars, and then you could either be parallel over all-ns suites or over the vars within namespaces
eftest is a really simple, robust example of how you'd actually implement the parallelization
but honestly the code is the easy part
you gotta make sure all of the hook and reporting calls are set up correctly
I’ve opened an issue at https://github.com/NoahTheDuke/lazytest/issues/40. Your point about hooks and reporting is well taken! I can see that’s going to be the most work during the design of this thing. We use Lazytest at work, and I can use work time to design and work on this thing, if you’re open to it.