Did you get the car "Hot" before the test?
Meaning did you drive it for around 30 minutes before you took the test?
You need to get the cat hot for it to work correctly.
If you do a search you'll find many threads about what to do and what not to do, to have your car ready for a smog test.