zunit-zsh / zunit

A powerful testing framework for ZSH projects
https://zunit.xyz
MIT License
208 stars 23 forks source link

Add option to run tests asynchronously #87

Open molovo opened 7 years ago

molovo commented 7 years ago

We're already running tests sort of pseudo-asynchronously when time limits are enabled, by running the test function in an asynchronous subprocess and waiting for it to finish. It would be cool to extend that to launch multiple processes simultaneously (preferably with a defined thread limit) and then map the exit codes to tests names and output results on the main thread. I tried this a while ago and failed, so it might not be possible to do that since communication between processes is difficult, but i recently did something similar in PHP using socket pairs, so want to reinvestigate.