Step 2: Check out the Schematic
Not to complicated right? basically electricity is constantly flowing from the tip of one side of the cable to the tip of the other side and lighting the "tip" light.
If the switch is off and only the tip light is on, that's good.
The ring or ground light should turn on also when the switch is flipped toward one or the other, or both will turn on either way if it's a mono cable. If they don't, one of them is disconnected, and that's a bad cable.
With the switch off, if the tip is shorting to ground or the ring, one or both of those lights will come on with the tip light when you wiggle the cable, even though the switch is in the middle. you know then that it's shorting inside and that's a broken cable.
No lights, or no tip light even if the other two come on with the switch, and it's obviously a bad cable too.
Note: two simple adapters can be made really easily to make this test XLR cables as well, or XLR jacks can be added. it doesn't necessarily matter which conductors you connect to which light, as long as they are the same on both sides and you know which is which. In this case you may even want a SP3T switch instead. If you used a three way switch you could test just one of the three conductors at a time and any two lights lighting would mean a short between them. These are harder to find and not really necessary, but would make the thing a little less confusing to use.