What is the full model number of your engine?
Onan made a couple different models, and the testing procedures are not the same.
There will be a small black wire coming out from under the shroud over the flywheel.
If the engine connector on your tractor is a 4-pin, this black wire will go to an inline connector before it gets to the 4-pin connector. Disconnect this single connector.
If your engine connector is a 6-pin, this black wire will go to a relay. Disconnect this wire from the relay.
Recheck for spark. If the engine happens to start while checking for spark, you will need to ground this black wire out to shut the engine off.
Do you get spark to either plug with the black wire disconnected?
Does your engine connector have a 4 or 6 pin plug?
That will be the 4-pin connector.
Mounted to the left side of the engine, right above the starter, you will see an aluminum box with 'fins' and 3 wires attached to it.
Just below the starter, there as another, smaller black or gray box with 3 wires going to it. 2 of those wires go under the shroud, and the other has a bullet connector. Disconnect this bullet connector and recheck for spark.
This black wire is the kill wire. If you have it disconnected, but still have no spark, there are only a few possibilities.
1. Both coils are bad. (Not very likely)
2. One of the 2 wires going under the shroud is shorted to ground under the shroud. (Most likely)
3. The magnet in the flywheel is either rusted, weak or missing.
You are going to need to pull the shroud off and inspect the wiring for damage and inspect the flywheel.