Search code examples
socketstestingsocketserver

best practice to test socket server?


I'm developing a socket server game using java. I want to test if server works properly (how it handles received messages, process and response in right way...) without using game client(heavy and not completed). Messages from client maybe raw binary and encrypted.

Is there a framework, or testing tool for this case?


Solution

  • If you want to do it by hand, I would suggest telnet or, if you're using Linux, you can use netcat command nc.

    If you want something that can be automated, e.g. a unit test, and you're familiar with Python, I would recommend using Twisted: Twisted Examples

    Hope this helps