We describe the fundamental principle of operation of a vectorial shearing interferometer, featuring variable shear and tilt. They may be implemented along an arbitrary direction, in our experimental setup, by controlling the relative angle between a pair of wedge prisms. We show the simulated interferometric patterns of primary aberrations. We compare them with those exhibited by spherical and aspherical optical elements obtained experimentally. The number and orientation of fringes is controllable with the shear direction and its magnitude. The vectorial shearing interferometer is shown to be effective in testing optical elements and in aligning optical systems.