The patch test uses a partial differential equation on a domain consisting from several elements set up so that the exact solution is known and can be reproduced, in principle, with zero error.
Typically, in mechanics, the prescribed exact solution consists of displacements that vary as piecewise linear functions in space (called a constant strain solution).
[1] It was long conjectured by engineers that passing the patch test is sufficient for the convergence of the finite element, that is, to ensure that the solutions from the finite element method converge to the exact solution of the partial differential equation as the finite element mesh is refined.
[2] A broader definition of patch test (applicable to any numerical method, including and beyond finite elements) is any test problem having an exact solution that can, in principle, be exactly reproduced by the numerical approximation.
Therefore, a finite-element simulation that uses linear shape functions has patch tests for which the exact solution must be piecewise linear, while higher-order finite elements have correspondingly higher-order patch tests.