Mathematical simulation of a thermal shock method for reliability testing of functionally graded material (FGM) is performed with the end to determine operating parameters of the testing device (power of a laser, laser beam radius, duration of heating) and to investigate the effect of the composition of FGM on a magnitude of thermal stresses in a coating. An analytical method for solution of the thermal elasticity problem is developed whereby the approach of a multilayer plate is used for determining temperature and thermal stresses distributions in a coating. We considered the limiting case of the obtained solution when the thickness of a layer is infinitesimally small and the number of layers tends to infinity. This procedure allowed us to obtain the thermal stresses distribution in a FGM coating. The results for the FGM coating composed of WC (tungsten carbide) ceramics and HS-steel are presented. It is showed that variation of the volume content of ceramics strongly affects thermal stresses in a coating and they decrease significantly in the case of the uniform spatial distribution of ceramics.