I am building a client-server chat application.
It has both a server and a client part.
Is it possible to test the application on the same machine or do i need really need two different computer to run the application.
Yes, it is possible to test your application on same machine.
IP Address of both client and server in this case would be same. Just open different ports for client and server.
Yes, it's possible.
Start your server up and it will listen to a specific port(The server application either has defined one or you have to provide one to it).
Start the client application and make it connect to your machine (127.0.0.1) with the port number your server application listens to.
You may have to modify the application to change the IP address or port number if the program you have does not provide you command line options to specify them.
You can test on the same machine. I am doing this right now as I type this note. :)
Of course normal things you would expect apply...you can't test two listeners on the same port which are on the same interface, for example. But a client connecting to a server on the same box should work no problem.
And of course before you release you should test on different machines as well. This could expose bugs that a single box config does not.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With