Résumé : This paper provides pseudo-Gaussian and locally optimal rank-based tests for the cointegration rank in linear cointegrated error-correction models with common trends and i.i.d. elliptical innovations. The proposed tests are asymptotically distribution-free, hence their validity does not depend on the actual distribution of the innovations. The proposed rank-based tests depend on the choice of scores, associated with a reference density that can freely be chosen. Under appropriate choices they are achieving the semiparametric efficiency bounds; when based on Gaussian scores, they moreover uniformly dominate their pseudo-Gaussian counterparts. Simulations show that the asymptotic analysis provides an accurate approximation to finite-sample behavior. The theoretical results are based on a complete picture of the asymptotic statistical structure of the model under consideration.