We describe design guidelines for soft x-ray wavefront sensors and experimentally demonstrate their performance, comparing grating-based lateral shearing interferometry and Hartmann wavefront sensing. We created a compact shearing interferometer concept with a dense array of binary amplitude gratings in a single membrane to support one-dimensional wavefront measurements across a wide wavelength range without the need for longitudinal position adjustment. We find that a common scaling parameter based on wavelength and the distance to the measurement plane guides the design of both systems toward optimal sensitivity. We show preliminary results from recent experiments demonstrating one and two-dimensional wavefront sensing below the Marechal criterion