The process begins with gas chromatography, where the test sample is vaporized and carried by an inert gas through a column packed with a stationary phase. Different components of the sample separate based on their volatility and interaction with the stationary phase. These separated compounds then enter the mass spectrometer, where they are ionized, fragmented, and detected. The mass spectrometer provides a mass spectrum for each compound, which can be used to identify and quantify the substances.