The last time I took my car in for a (California) smog check, they definitely stuck a sensor up the tailpipe. Also run the engine for fixed duration at several set speeds to get a variety of readings, on a dynomometer (a treadmill, basically) to simulate actual driving speeds.