You can but there could be the possibility of the pipe rusting if the water is drained out of it. IF you are worried about freezing then yes, drain the entire system. But most people just shut the water off.
The electricity should be shut off before directly testing the system. The system works like the heating elements in ovens, toasters, and the stove top.
There isn’t necessarily a precise way to know what a water heater needs to be replaced. A leak in a puddle of water of the heater requires immediate replacement. If you completely lose your hot water, leaking around plumbing, or appearance has excessive corrosion on the heater body itself, or if the unit is over 8 years old, replacement is preferred or repair (if possible).
Plumbing systems are designed to prevent foul odors from entering the house by means of the trap attached to fixtures. Traps contain water to seal out foul odors; if the water seal evaporates, the odors enter the house. To solve this problem, pour a bucket of water in each trap, sink, shower and floor drain. This will prevent plumbing odors from entering the house.
There should be specific instructions for lighting the pilot light somewhere on the unit, but if not, here is the generic procedure. First, turn the manual gas control knob to “pilot”. This position allows gas to flow to the pilot so you can light it. You will notice that the knob is spring loaded and turns off as soon as you release it. Once the pilot flame ignites, hold the knob in the pilot position for about 30 seconds so that the flame thoroughly heats the thermocouple. If the thermocouple is working properly, when you release the manual valve, the pilot will remain lit. Turn the knob to the “on” position so that gas can now flow to the main heating elements.