Parallelizing a busted test suite

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Parallelizing a busted test suite

Hugo Musso Gualandi
I'm trying to speed up how long it takes for busted to run my test
suite. I'm getting the impression that it is running all the tests
sequentially, one after the other... Is there a way to ask busted to
run multiple tests in parallel, using more than one process or thread?
Or do I need to improvise by running multiple instances of busted in
parallel, one for each spec file?

-- Hugo
Reply | Threaded
Open this post in threaded view
|

Re: Parallelizing a busted test suite

Thijs Schreijer


> On 15 Aug 2020, at 20:15, Hugo Musso Gualandi <[hidden email]> wrote:
>
> I'm trying to speed up how long it takes for busted to run my test
> suite. I'm getting the impression that it is running all the tests
> sequentially, one after the other... Is there a way to ask busted to
> run multiple tests in parallel, using more than one process or thread?
> Or do I need to improvise by running multiple instances of busted in
> parallel, one for each spec file?
>
> — Hugo

No luck. You need to work around it for now.

There is a very old branch with some parallel support (using Lanes) but, as said, very, very old

Thijs


Reply | Threaded
Open this post in threaded view
|

Re: Parallelizing a busted test suite

Hugo Musso Gualandi

> > Or do I need to improvise by running multiple instances of busted
> > in parallel, one for each spec file?

> No luck. You need to work around it for now.

I'd still love to hear about what workarounds people have been using.
I'm trying to use GNU parallel for now:

    parallel busted -o utfTerminal ::: spec/*_spec.lua

One nice thing is that it buffers the output of each test file, so they
are still written in order, as if you had run them sequentially. Is
anyone else using a similar workaround? What works well for you?

-- Hugo
Reply | Threaded
Open this post in threaded view
|

Re: Parallelizing a busted test suite

Javier Guerra Giraldez
On Mon, 24 Aug 2020 at 09:13, Hugo Musso Gualandi
<[hidden email]> wrote:
> anyone else using a similar workaround? What works well for you?

GNU parallel would be my first choice too.  in fact, the only reason i
seldom use it is because most of my testsuites are either very fast
(when pure Lua) or too heavy to run more than one (I.E. running under
nginx and spawning several support servers).

i guess it could be possible to containerize them to avoid conflict
between concurrent servers, but... i don't want to be the one fixing
that.

of course, for CI/CD, you get containers/VMs whether you want them or
not, so it's usually better to split tests into several sets and push
all to the queue together.



--
Javier