The transport- of- intensity equation links the intensity and phase of an optical source to the longitudinal variation of its intensity in the presence of Fresnel diffraction. This equation can be used to provide a simple, accurate spatial- phase measurement for optical testing of flat surfaces. The properties of this approach are derived. The experimental demonstration is performed by quantifying the surface variations induced by the magnetorheological finishing process on laser rods. (c) 2007 Optical Society of America.