If the car shuts off while running then the battery is most likely not the problem. Your car runs off the alternator when the engine is running, not the battery. The first thing I would do is call the dealer with your VIN because there was a recall issued some years back for the ignition switch in 6th gen civics. The contacts wear down causing it to stall out and fail intermittently. It is possible that your car never had the recall service performed. Next thing to do would be to have the battery and alternator tested with a VAT machine. (voltage-amp tester) Just measuring the voltage of the battery does nothing but tell you the static charge under no load. Again, I highly doubt the battery is the problem in your case, because from what i gathered from your description, the car starts just fine.