Multithreading support for parallel and distributed testing