If you are talking about a standard serial interface, the answer is "it depends." If you for some reason need a syncronous interface, this will probably not work. You could try a ribbon cable(s) in such a case but you will need to have the appropriate physical DTE/DCE transition.
In the case of back to back serial interfaces for lab environment, I usually set the interfaces up as physical-layer async. Now you just have tx and rx data to wory about. Easily extended using cat 5 with any number of adapters. For example, if your serial cable is DB25, put in DB-25 to DB-9 adapter, then DB-9 to CAT 5. Either set up one of your adapters to do roll over or use rollover (RS-232 rollover NOT ethernet rollover) cable.