A test to see whether a truck or train can deliver goods to their destination the fastest has ended in a win for road transport over the track.