Summary The need to consider in capture-recapture models random effects besides fixed effects such as those of environmental covariates has been widely recognized over the last years. However, formal approaches require involved likelihood integrations, and conceptual and technical difficulties have slowed down the spread of capture–recapture mixed models among biologists. In this article, we evaluate simple procedures to test for the effect of an environmental covariate on parameters such as time-varying survival probabilities in presence of a random effect corresponding to unexplained environmental variation. We show that the usual likelihood ratio test between fixed models is strongly biased, and tends to detect too often a covariate effect. Permutation and analysis of deviance tests are shown to behave properly and are recommended. Permutation tests are implemented in the latest version of program E-SURGE. Our approach also applies to generalized linear mixed models.