An optical method for slope measurement based on the reflection grating method is presented. By integration of the slope the out-of-plane deformation of the considered object surface can be determined. Applying picture processing to the image of the reflected grating lines, the method is suitable for automatic testing in labs and production environments. Two examples, delamination of multilayer tension specimen and quality control of lacquered surfaces, are described in detail.