if they engine and catalytic converter aren`t fully warmed up it will fail.
as you wait in line for the test turn off all accessories,ac,etc. bring rpm up to 2000-2250 a couple minutes before the test.if the engine is in good working
order,ie tune -up,drives and idles good,you may have a failed catalytic converter.