I have several modules that listen on determinate port to communicate with each other using UDP with protocol buffers (C++).
I need to automatize tests for each one of them.
Which is the best strategy to do the testing?
I mean I could write a C++ program that emulates each component using determined commands, for example in xml:
<commands>
<send cmd="blahblah" from="module1" to="module2">
<expect cmd="ack" from="module2" to="module1">
</commands>
but I was told that Expect/Tcl/Tk could be used. After some research, I think serialized protobuf's commands can't be done with static text, besides from what I have investigated, Expect works with output stream, and to test those components I need something that works with TCP/UDP sockets. Correct me if I am wrong. So is there some other tool to achieve this behavior (I mean sockets)?
I have no experience either with protobuf nor with expect. I would like to hear some opinions, maybe use some other tools to perform this type of testing.