A method of measuring performance of a spectroscopy system with respect to variations in at least one factor that affects a measurement by the spectroscopy system of component spectra of a plurality of components in a sample comprising a) obtaining with the spectroscopy system, for each component of a set of components that are to be identified by the system, a plurality of component spectra, the plurality of component spectra for each component being obtained by spectroscopy measurements for variations of at least one factor that affects the component spectrum, b) simulating sample spectra, each simulated sample spectrum being simulated for a corresponding potential sample comprising multiple components of the set of components by combining the component spectra of the respective components of the potential sample, the component spectra being obtained for variations of the at least one factor that affect the component spectrum, each simulated sample spectrum simulated for specified components and/or specified concentrations of the components in the corresponding potential sample and each simulated sample spectrum simulated using a different component spectrum for at least one of the components and/or a different amount of at least one of the component spectra to that used to simulate the other simulated sample spectra; c) analysing with an algorithm of the spectroscopy system the simulated sample spectra to obtain, for each simulated sample spectrum, a measure of the presence/absence of each component and/or concentration of each component in the corresponding potential sample, and d) generating a measure of performance based upon a comparison of each measure of presence/absence of each component and/or concentration of each component with the corresponding specified components and/or specified concentrations of the components for the corresponding potential sample. a) obtaining with the spectroscopy system, for each component of a set of components that are to be identified by the system, a plurality of component spectra, the plurality of component spectra for each component being obtained by spectroscopy measurements for variations of at least one factor that affects the component spectrum, b) simulating sample spectra, each simulated sample spectrum being simulated for a corresponding potential sample comprising multiple components of the set of components by combining the component spectra of the respective components of the potential sample, the component spectra being obtained for variations of the at least one factor that affect the component spectrum, each simulated sample spectrum simulated for specified components and/or specified concentrations of the components in the corresponding potential sample and each simulated sample spectrum simulated using a different component spectrum for at least one of the components and/or a different amount of at least one of the component spectra to that used to simulate the other simulated sample spectra; c) analysing with an algorithm of the spectroscopy system the simulated sample spectra to obtain, for each simulated sample spectrum, a measure of the presence/absence of each component and/or concentration of each component in the corresponding potential sample, and d) generating a measure of performance based upon a comparison of each measure of presence/absence of each component and/or concentration of each component with the corresponding specified components and/or specified concentrations of the components for the corresponding potential sample.