We describe the logic approach to pattern recognition; its key notion is a test. Analyzing the tests allows us to construct functionals characterizing the pattern, as well as procedures to compute them. We present qualitative and quantitative properties of tests, functionals, and recognition procedures. Solutions of a series of known problems are also given.