A blood gas test measures oxygen and carbon dioxide levels in the blood. The test can also show blood pH levels and lung function. It is also called an arterial blood gas test or a blood gas analysis.