Considering the need for extra equipment to do this and the potential complications, the NOAA Diving Program recommends having a service technician for your particular brand of compressor test the relief valves and calibrate the gauges during routine compressor servicing. Some pressure relief valves, most likely very high pressure ones, may need to be sent to the manufacturer for testing.
Interestingly, not all valves can be tested. Some spring activated valves will reset upon release; these valves may be tested. Other valves are one-use only and when activated will not reset; these valves cannot be tested. The manufacturer will know which valves are installed on the compressor.