Why don Google Test run the tests in different threads to speed things up?
It’s difficult to write thread-safe code. Most tests are not written with thread-safety in mind, and thus may not work correctly in a multi-threaded setting. If you think about it, it’s already hard to make your code work when you know what other threads are doing. It’s much harder, and sometimes even impossible, to make your code work when you don’t know what other threads are doing (remember that test methods can be added, deleted, or modified after your test was written). If you want to run the tests in parallel, you’d better run them in different processes.