See page 37 of the service manual:
--
https://www.westerbeke.com/technical manual/38673_5bcd_bcda_bcdb_technical_manual.pdf
Basically, you should be able to remove 4 screws and take off a cover near the injector pump. With the cover off, you'll be able to watch the solenoid move. You should see it in one position (forward, I think) when you crank the engine and when it is running normally, and in a different position (retracted, I think), any time the generator is neither cranking nor running. I could have the positions backward. I don't really know which way this particular solenoid moves. I'm just guessing because it is called a "run" solenoid vs a "stop" solenoid. I didn't look to see the details of the solenoid or injector pump. And, there is good reason for it to work the other way, which I suspect is more common (not needing to be energized at all, except to stop).
But, in any case, there is one position for starting/running normally and another position for not running. By comparing (not-running and not-cranking) to (cranking or running), you should be able to see the difference. If you can't, there is a related problem.
Taking a quick look at the manual, it looks like that is a 3-wire solenoid dual coil solenoid with red, white, and black wires.
One wire is the common negative. Another wire is the higher current initial "pull" coil. And the remaining wire is the lower current "hold" coil. If I had to guess, I'd guess that the black wire is the common negative, the white is the "pull", and the red is the "hold".
Normally what happens is that the "hold" coil is tied to the ignition, so any time the generator is on, the "hold" coil is energized. It has enough "umph" to hold the solenoid pulled -- but only if it is already pulled. It doesn't have enough "umph" to move it, just to hold it. This ignition circuit normally passes through the safety switches, e.g. oil pressure, water temp, exhaust temp, generator output, etc, possibly through a time relay. So, if the hold coil isn't getting power when the ignition is on, it could be a problem with the power to that circuit -- or a problem with one of the safety switches.
The "pull" coil of the solenoid is tied to the starter. It is a higher current coil with enough "umph" to pull the solenoid, but will burn itself out if active continuously. It is just designed to be energized during starting. If the solenoid isn't moving when the starter is cranking, at least one possibility is that this coil is burned out. Another possibility is that the control rack on the injector pump that it moves is stuck. With everything off an not powered, you can usually get a flat head screwdriver in between the solenoid plunger and the button on the control rack to try to operate the rack by hand. If it won't move, the problem is problem on the injector pump -- but that is really rare as compared to a bad solenoid coil. Especially since excessive cranking can burn out that coil.
So, if the solenoid doesn't move when cranking, the next step is probable to turn the ignition on and check the red and white wires. The one with voltage to the black wire is the "hold" wire. The one without is the "pull" wire. If neither has power, that is curious. It could be a problem with the ignition circuit or a safety switch. But, hold that thought.
Get someone to crank the generator while monitoring the "pull" wire. Make sure voltage comes up while cranking and down otherwise. If you weren't able to figure out which was which, check both. If the solenoid isn't moving when the pull wire is energized -- it is probably a bad solenoid. You can unscrew it and bench test it, which will isolate it from a possibly stuck injector control rack button. You can also try to actuate the button on the injector pump with a screw drive or whatever. If the button moves freely and the solenoid can't push it while cranking and the solenoid is getting power -- the "pull" coil is likely bad. Replace the solenoid.
I know you said the generator won't start. But, if it actually sounds like it starts and then stops, the problem could be with the "hold" coil or wire. Check to see if it is getting power when the ignition is on. If not, the problem is probably with one of the safety switches. But, wherever the ignition power disappears is where the problem is -- trace it back.
As another test of the solenoid, you can also pull it out, hold it activated, and the power the hold wire. The hold coil should then be able to hold the solenoid activated. If it can't -- there is likely a problem with the hold coil. Replace the solenoid. I usually use a pair of pliers or a piece of wood to move the solenoid into position before testing this so a fast movement doesn't, for example, injure my finger. The plunger might be held on only by compression -- so make sure you have everything under control so you don't lose it.
If you don't mind diving right into pulling the solenoid out, you can also just dive right to the meat of it and pull the solenoid out and use a couple of batter wires (with a fuse) and power the "pull" coil to see if it works. And then, if it does, move and (safely) hold it in position, energize the "hold" coil, and see if it will hold it. Then, if either is bad -- replace the solenoid.
And, if neither is bad, check for power on the red and white wires to see which one isn't energizing, and debug the electrical from there.
I hope this helps.
-Greg