Assuming an ATmega328P based Arduino, any sketch that outputs text to the serial console will do. e.g. Examples: 04.Communication: ASCIITable
Probe D1 (TX). Note the output will be a logic level serial signal, which is inverted with respect to a true RS232 serial signal