DO NOT DISCONNECT ANY CABLE WITH THE ENGINE RUNNING!!!!
Every year I did a demonstration on the alternator test bench for my students to show what can happen when you do that. It was real easy for the voltage to reach over 35 volts. That WILL destroy any computer on the vehicle, the generator's internal diodes and built-in voltage regulator, and any light bulbs that are turned on.
The thinking is that if you disconnect either cable and the engine stays running, the generator must be working but a lot of them will stop working due to the voltage regulator responding to the dips in the "ripple" voltage being produced. That will make a perfectly good generator appear to be bad so that test is not valid.
Some generators respond to the high points in the ripple. That momentary higher voltage goes right back to the field winding and creates a stronger magnetic field. That stronger electromagnet creates a higher output voltage which again creates a stronger electromagnet. It's a vicious circle and voltage can keep on rising until something gives out. The main thing that smoothes out that ripple so it doesn't affect the voltage regulator or the generator is the battery.
Three things are needed to generate the output current. They are a magnet, (electromagnet, in this case), a coil of wire, and most importantly, movement between them. That's why the belt needs to make it spin. One thing that can save you from doing damage by removing a battery cable is not raising engine speed. Generators are relatively inefficient at low engine speeds and their output voltage is less likely to rise to dangerous levels, . . . as long as you don't raise engine speed.
Ripple is not something that comes up in conversations very often and it's rather hard to explain. You can go here if you care to know more:
but for the average do-it-yourselfer this isn't going to help you fix your truck.
One other thing to keep in mind is batteries give off explosive hydrogen gas. Regardless if your generator is working or not there is going to be a big spark when you remove a battery cable with the engine running. Either the generator's current will be recharging the battery, and that can be up to 20 amps, or the battery is going to be supplying the truck's electrical systems, and that can easily be over 30 amps. That kind of current is going to create a big spark when a connection is broken or reconnected. Small arc welders run as low as 40 - 60 amps and look at the sparks they create. The reason we don't hear about more battery explosions is because people are careful to not disconnect the cables when there is current flowing through them. It's also why there are huge warning labels on all battery chargers to be sure they are turned off before connecting or disconnecting them from the battery.
Another common generator problem is one defective diode out of the six. You will lose exactly two thirds of the generator's capacity but system voltage will remain normal or it could even be just a little high from the voltage regulator responding to the greatly increased dips in the ripple voltage. The last section on that web page explains excessive ripple.
It's always a good idea to wear safety glasses when working around car batteries, but if you still insist on removing a cable while the engine is running, a face shield makes more sense, and have plenty of water on hand to wash any acid off the vehicle's paint.
To diagnose your system, you can get an idea of how they work here:
Sunday, July 8th, 2012 AT 11:22 PM