purebred-mua / tasty-tmux

Terminal user acceptance testing via tmux
GNU Affero General Public License v3.0
6 stars 0 forks source link

Run all tests in parallel #18

Closed romanofski closed 3 years ago

romanofski commented 4 years ago

Is your feature request related to a problem? Please describe. With a growing amount of tests, there will at some point the need to optimize those. One optimization technique could be to run all tests in parallel. I'm currently not sure whether it already happens automatically, since I remember vaguely that tasty does by default.

Describe the solution you'd like It should be possible to run all tests in parallel with minimal effort.

Describe alternatives you've considered I think it'll be fine for them to run congruently as a start. Perhaps real parallelism would be better of in a separate card if it turns out there is state or whatever which we keep track of.

Additional context None

frasertweedale commented 3 years ago

This can be achieved by running the test program with -j <n> for number of desired threads, or use the TASTY_NUM_THREADS=<n> environment variable.

If we want to set it in the purebred test suite, we can either define the environment variable in the CI config, or use System.Environment.setEnv in the test program before handing control to tasty. In the latter case, we can even decide the number of threads dynamically (e.g. based on the number of tests).

(I will create a purebred change to do this).