-
Notifications
You must be signed in to change notification settings - Fork 68
Description
I'm using SimpleCov and had some time making it work with test-queue.
SimpleCov does support merging results of multiple tests (processes or threads or another test frameworks).
how it work is
- Keep different name on each processes (in
SimpleCov.command_name) - Each processes records it's result to a json file on exit, with it's stored name as key
(SimpleCov.resultdoes recording and return merged result) - Then at the end (or could be at each end), call
Simple.cov.result.format!to
create merged result in html (or in other format)
It relies heavily on Kernel.at_exit, which will be invoked on Kerenl.exit but not on Kernel.exit!.
(how they do it)
The problem is test-queue is killing master with exit!, thus at_exit is not executed at the very end.
Currently I'm using hacky way of killing master by kill inside TestQueue::Runner#summarize,
just before TestQueue::Runner#summarize kill! it.
(An example of my configuration)
If master process exits with exit, it is so much easier to play nicely with simplecov.
While killing forked processes by kill! is a safe idea, killing master with kill! is not really necessary IMHO.