How do RCD Testers work?
They contain a current source that is able to generate a current of any waveform and polarity between neutral an earth.

Cheaper ones may contain an array of resistors, those can only test AC and rectified AC fault currents.

If you have access to both sides of the RCD, the equipment can become a bit less complicated. Since then you don't need earth.