How can I properly test compatibility of a replacement led on a pcb?
If this is just a indicator LED, you can probably replace it with any LED of the same color.  Just about any LED, unless in a very tiny case, can handle 20 mA.  Circuits that light indicator LEDs generally run them at less than that, especially if the LED isn't intended to be seen in sunlight.

LED forward voltage depends on the color, so as long as the replacement LED has the same color, the circuit shouldn't care.

Basically, replace with the same package and color, and you'll probably be fine if this is a indicator LED.