Varies by state. In California, we put the car up on a dynonometer and run it through various speeds and engine RPMs, while measuring the tailpipe emissions. Gas cap is checked to ensure good seal, and the MIL (Check Engine light) is tested to make sure it both works, and is off.