Test ofSerial connection without having an actual serial por

Is there a way to test ofSerial connection without actually having a physical serial port?

I was looking at com0com and other virtual serial port emulators but was unable to get ofSerial to detect the ports created by these software.

why do you need to do this?

you could get an arduino board, it has a built-in FTDI usb to serial convertor and with the arduino application you can open up a serial monitor…

I know this is an old topic but it shows up on Google’s search results page.
This is for people who end up here due to Google.

Answer:
With Windows, COM1-9 work fine with simple serial.setup(,);

If however, com0com is used and/or your port number is COM10 or higher, you need to use a different notation when opening the port. Else you get an “Unable to open com port” error.
The solution is:

  
serial.setup("\\\\.\\COM18", 9600); //eg for COM18, note the extra slash  

Sources:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q115831
and
http://stackoverflow.com/questions/11775185/open-a-com-port-in-c-with-number-higher-that-9