Almost all implementations of TCP/IP have a loopback address. This address is most commonly "localhost", or 127.0.0.1. Give it a try; ping localhost, and it should work fine. This is the best tool for testing on single machines. I don't know what the issues involving testing DirectPlay might be, but for those of us who write network applications, localhost works great. You can run the server, and then run multiple clients and connect to localhost:port, and it works fine. As for multi-player games that operate without a server, but open connections to each of the other players, you'd have to be able to set each instance of your program to be able to use a different port. It isn't hard. Don't forget though that the packet speed is going to be much slower in real-world implementations.
As an aside, the loopback mechanism was used (and still is) for inter-process communication in some applications.