You have fallen into the fix first-diagnose latter trap that so may get caught in .
So you need to start by breaking up the individual sections to see where the failure is .
Easy way to start is to pull the kill wires off the magnetos .
As you have confirmed the fuel solenoid works it is safe to mow without the kill wires ONLY FOR THE PURPOSE OF DIAGNOSTICS .
Sorry for shouting but it is important not to permanently dissable the shut down system
If the problem goes away then there are gremlins in the wiring .
If the problem does not go away then get a substitute fuel tank and hook it up directly to the carb as a gravity feed .
Problem goes away then you have a fuel supply problem
Problem remains then either the carb is bad , one or both magnetos are bad , the solenoid is bad or the wiring to the solenoid is bad .
I am off for a week or two tonight / tomorrow night so will not be around to walk you through more specific diagnostics but if you do as requested and post the results then there are plenty of people here who can walk you through pin pointing your problems