Galaxy models predict a tight relation between the clustering of galaxies and dark matter on cosmological scales, but predictions differ notably in the details. We used this opportunity and tested two semi-analytic models by the Munich and Durham groups with data from the Canada-France-Hawaii Telescope Lensing Survey (CFHTLenS). For the test we measured the scale-dependent galaxy bias factor $b(k)$ and correlation factor $r(k)$ from linear to non-linear scales of $kapprox10,h,rm Mpc^{-1}$ at two redshifts $bar{z}=0.35,0.51$ for galaxies with stellar mass between $5times10^9$ and $3times10^{11},h_{rm 70}^{-2},{rm M}_odot$. Our improved gravitational lensing technique accounts for the intrinsic alignment of sources and the magnification of lens galaxies for better constraints for the galaxy-matter correlation $r(k)$. Galaxy bias in CFHTLenS increases with $k$ and stellar mass, it is colour-dependent, revealing the individual footprints of galaxy types. Despite a reasonable model agreement for the relative change with both scale and galaxy properties, there is a clear conflict for $b(k)$ with no model preference: the model galaxies are too weakly clustered. This may flag a model problem at $zgtrsim0.3$ for all stellar masses. As in the models, however, there is a high correlation $r(k)$ between matter and galaxy density on all scales, and galaxy bias is typically consistent with a deterministic bias on linear scales. Only our blue and low-mass galaxies of about $7times10^9,h_{rm 70}^{-2},{rm M}_odot$ at $bar{z}=0.51$ show, contrary to the models, a weak tendency towards a stochastic bias on linear scales where $r_{rm ls}=0.75pm0.14,{rm(stat.)}pm0.06,{rm(sys.)}$. This result is of interest for cosmological probes, such as $E_{rm G}$, that rely on a deterministic galaxy bias.