I think the way to do it, is in closed systems, the closest thing to the original ecosystem of the soil, in order to capture the gases and calculate their mass, by difference in soil weight.
There are so many methods for collection of these gasses from soil by employing closed system capture. After this the gasses may be analysed by respective gas analyser available in the market, mainly by I R spectroscopy for CO2 and gas chromatography for methane.