We report on the laboratory experiments of a densified pupil spectrograph designed for mid-infrared transit spectroscopy of exoplanets. We developed a testbed consisting of a blackbody infrared light source, a densified pupil spectrograph, and a prototype JWST Si:As Impurity Band Conduction (IBC) detector array to simulate observations of a planet’s host star. In order to thermally stabilize the measurement system, we installed all of the components in a large cryogenic dewar and controlled the temperatures of the thermal source and the Si:As IBC detector. The characteristics of the spectrum formed on the detector were consistent with the designed values. The photometric precision of the densified pupil spectrograph was 14 ppm on average over the whole observing wavelength range of 8.5 to 10.5 μm. The systematic noise component of the spectrograph hidden behind the transit spectrograph was 11 ppm.