The answer to 'how to test dimmer switch' is to use a multimeter to check the voltage and continuity of the dimmer switch. First, turn off the power to the dimmer switch at the circuit breaker. Then, remove the dimmer switch cover and use the multimeter to test the voltage between the hot and neutral wires. The voltage should decrease as you turn the dimmer switch down. Next, test the continuity between the hot and load terminals on the dimmer switch - the resistance should vary as you turn the switch.
If the dimmer switch is not functioning properly, you may need to replace it. It's best to have a licensed electrician perform any electrical work, as working with live electrical circuits can be dangerous.