The answer to 'how to test dimmer switch' is to use a multimeter to check the voltage and resistance of the dimmer switch. First, turn off the power to the dimmer switch at the circuit breaker. Then, use the multimeter to test the voltage at the input terminals of the switch when it is in the 'on' position. The voltage should match the circuit's voltage, typically 120V. Next, test the resistance of the dimmer switch by setting the multimeter to the ohms setting and checking the resistance between the input and output terminals. The resistance should change as you adjust the dimmer knob or slider.
If the voltage or resistance readings are not as expected, the dimmer switch may need to be replaced. It's important to turn off power before testing to avoid electric shock hazards. If you are not comfortable working with electrical components, it's best to consult a licensed electrician.