http://websocketd.com/#download or brew install websocketd
on macosx
websocketd --port=8080 ./websocket-stub.sh
(not necessary, only to troubleshoot the server)
Install NPM and nodejs
sudo npm install ws
nodejs websocket-client.js
Expected result: the service should always return the current date
Actual result: the service sometimes returns an incorrect date
--> Please write a test capable of catching this bug with the most appropriate tool.
Can you customize the server logic to test a different scenario of your choice?
Feel free to fork this repository and commit your own changes.