in reply to automatically killing all child processes created in a script
The easiest way might be to run your tests on a virtual server and shut down the virtual server when you are done.