Get it out on a highway where you can cruise at 65 at a steady speed for about 30 minutes. That would be about 35 miles. Try to get it to the testing station as soon as possible without shutting the engine off. If you have to wait a while, idle the engine to keep the cat(s) warm. The technician should do a pretest run on the treadmill to verify that the emissions system is going into closed loop (unless he/she wants to charge you a restest fee later).
Another thing that helps pass emissions is to get a fresh oil and filter change just before the taking it to the test station. Have the shop look over the air filter, gas cap, and vacuum hoses to see if any need renewing. Also they can scan the Engine Control Module for any trouble codes that may not have set the MIL (engine light). Do not erase any codes or disconnect the battery as that would require you to drive long enough to reset all the system monitors.
In Calif., some “Smog Test Only” stations use anything in their bag of tricks to fail you because it justifies their existence to the State and generates more income.
Good Luck on this.