The answer to 'how to test switch' is to use a multimeter to check if the switch is working properly. First, turn off the power to the switch at the circuit breaker. Then, remove the switch cover and use the multimeter to test the continuity of the switch. With the switch in the 'on' position, you should get a reading of 0 ohms, indicating that the switch is closed and allowing electricity to flow. With the switch in the 'off' position, you should get a reading of 'OL' or 'open,' indicating that the switch is open and blocking the flow of electricity.
If the switch is not functioning properly, you may need to replace it. It's important to turn off the power before working on any electrical components to prevent the risk of shock or electrocution.