The answer to 'how to test electrical wiring' is to use a multimeter, a tool that measures electrical current, voltage, and resistance. First, turn off the power to the circuit you want to test at the circuit breaker or fuse box. Then, use the multimeter to check for live voltage, test for continuity, and measure resistance.
To test for live voltage, set the multimeter to the voltage setting and touch the probes to the hot and neutral wires. If you get a reading, the circuit is live. To test for continuity, set the multimeter to the continuity setting and touch the probes to the wires. If you get a beep, the circuit is complete. Finally, you can measure the resistance of the wires to ensure they are not damaged.