I don't think it's easily possible, because `cocaine-runtime` is a server-like application, which blocks the shell until explicitly terminated or killed.
But if you provide me an example how to test such class of applications, I'll gladly write this code.