Testing gamma-ray models of blazars in the extragalactic sky