Sometimes my car doesn't start, the engine just turns over,

I have a 95 Buick Riviera and just had a 2003 3800 Monte Carlo engine and transmission put in it with 53,000 on the engine. It runs great, when it runs. Sometimes (at least once a day) I turn the key on to start, the engine turns over like it is going to start, but it doesn’t. The mechanic who put the motor in put it on some kind of machine and could not find a problem with it, he was baffled and suggested I get a new key made, that maybe it wasn’t connecting right. A friend (retired mechanic) told me to turn the key on without cranking it, and let the fuel get up to the engine, and turn the key off and turn it back on and try to crank it. That seemed to work for a couple of weeks, now it doesn’t. I had to have it towed to the mechanics, and they started it and drove it off the tow truck. It has not given them the problem since, so they cannot figure it out. Also, on two different occasions, the engine died while I was driving on the highway at 50-55 miles an hour. This all has been in a span of less than a month. There was no problem like this before the motor was changed out.

Any one have any ideas? The last mechanic (the one that has it now) feels it could be the fuel pump, but can’t be sure until they can get it not to start, but it has been starting since. I haven’t noticed if it had been hot or not for not starting. It has not started after sitting overnight, and also after I have been driving it as well, so that doesn’t seem to have an effect on it.

When the trouble happens the tech needs to know if the ignition is working along with the fuel delivery system. Spraying some starter fluid into the intake while the trouble is occuring is usually a fast way to see if the engine needs fuel and has spark. No fancy computer diagnostics needed with that test. My first suspect for this trouble would be an intermittent relay, like to the fuel pump, or other critical area for the engine operation.

Thanks, that is a start, and definitely something that hasn’t been addressed yet.
Thanks again for your time and input, I will pass it on.