to test any petrol fired engine, check for 3 things.
fuel
spark
compression
to test for diesel check
fuel
timing of the fuel
compression
glow plugs (if installed)
to test an old EFI that you suspect is not firing due to lack of fuel, put some in the intake manifold, it should sputter and try to start on that little fuel confirming you have compression and spark and just need fuel. (usually the fuel pump)
if you fail at that, then check for spark - if you dont have spark - you find out why (usually a bad timing sensor - crank sensor)
this is done after you have verified the ECU is actually online when you key the ignition to ON.