If your car has a check engine light illuminated it will not pass the visual inspection of the smog test. It may not be performing as well or giving the same gas mileage.
On ’96 and newer vehicles the onboard OBDII computer will store codes from sensors to help diagnose the problem then illuminate the check engine light to show it has recognized a problem. On these vehicles we can scan it on the computer for codes and test the components, connections and subsequent or supplying components until problem is isolated to a part.
If a problem is still apparent then further diagnostic is required to test the components, connections and subsequent or supplying components till problem is isolated to a part.