Pulse oximetry measures how much oxygen is in your blood.Blood tests , such as a complete blood count (CBC) see whether your immune system is fighting an infection.A chest X-ray is often used to diagnose pneumonia. A chest X-ray looks for inflammation in your lungs.If your provider thinks you have pneumonia, he or she may do one or more of the following tests.