Imagine two servers (each within an own jvm process) which communicate using some form of messages (e.g. simple producer/consumer)
I'd like to write unit tests that will test the behaviour of these two servers.
My questions are:
Are there some frameworks (or a junit addon) for this problem?
I'd like to run a junit test class (or even a single test) in a different process? It would be cool if one unit test can easily access the variables of the other test (in a different process) using some sort of inter-process communication.
E.g. I'd like to check if the producer really produced the things i expected, and afterwards, if the consumer consumed them. (and maybe do some fuzzing to detect some race-condition-related problems)Are there some best practice for this kind of testing?
If there isn't a unit-like testing approach, how would you test such things during continous integration?
Note:
I don't want to use threads, because this may alter the behaviour (if you think of thread-safety issues)