We present synthetic populations of massive stars that constrain the properties of the star formation episodes, predict the occurence, subtype distribution and evolution of WR star populations at solar and SMC metallicities. Instantaneous burst and continuous star formation rates have been considered. Our predictions have been tested on a sample of 17 galaxies. The evolution of the WR stars is qualitatively well reproduced. The IMF slope is flatter on average than in the solar vicinity and is not correlated with the metallicity. The extinction law is in general similar to that of the SMC, independently of metallicity.