Car dies while driving

We have a 1994 grand prix pontiac. 3.1 engine. While we are driving the engine just stops running. What is the problem?

the battery is 2 months old, is it a bad battery? Took the alternater off , tested at a parts store, they ran for about 30 sec and said it was good?

I think your headed in the wrong direction. Even if the alternator went bad, it would not cause the car to instantly shut off. Same for battery. I think your looking at an ignition problem. When was the last time you changed spark plugs? Is the Check Engine light on?

The problem might be with either the crankshaft position sensor or the ignition module. Either of these components can become heat sensitive to where they fail to function as they’re exposed to engine heat.

Tester

Not likely the battery. CEL? If so have the codes read.

the last time the plugs were changed was about a year ago or so the check engine light comes on but my bother had it fixed but it still comes on and only somes on when the cars goes over 55 mph