1

I'm writing a JUnit Integration test that tests our networking protocols. I was initially using Threads and creating a Server on one thread and the Client on the other. I've been told this isn't the best way to test the networking system in place due to possible synchronization issues.

I was instructed that I should use Processes instead. I'm assuming this would mean running the Application on one process as a Server, and another process as a Client. This is easy enough to do manually; just start the application and set it as a server or a client then start the application again and run that as the opposite. But how would I create these two processes from within the JUnit test I'm writing? In multithreading, it's new Thread(new Runnable()).start(), then I'd continue from there.

Thank you!

0 Answers0