A laboratory test that includes culturing a sputum sample to identify the bacteria causing infection, and testing their sensitivity to various antibiotics.