A car will fail CA Emission test if the Check Engine Light bulb doesn't illuminate when the ignition key is turned on, or if it stays on when the engine is running.
A car will also fail if the car's computer has not run all emission monitors. The "monitors" are a test to see emission components are all present and have past a performance test.
I may have replied to one of your posts already... Just to let you know (if I didn't mention previously). My car failed its smog test. My engine light has never been on. There are 3 monitors that are not ready. I've gone & got a Drive Cycle and tired that, but it is hard to do. I need to know where to go (where there are experienced techs) to get these monitors 'ready' so that my car will pass smog. I don't want to pay lots of $$ at a dealership. Advice if you know. I live in the San Francisco Bay Area, and I'm willing to drive 2 hours in any direction. Thx.