In this paper, we introduce a family of robust statistics which allow to decide between a parametric model and a semiparametric one. More precisely, under a generalized partially linear model, i.e., when the observations satisfy y i | (x i , t i) ∼ F (•, µ i) with µ i = H η(t i) + x t i β and H a known link function, we want to test H 0 : η(t) = α + γt against H 1 : η is a nonlinear smooth function. A general approach which includes robust estimators based on a robustified deviance or a robustified quasilikelihood is considered. The asymptotic behavior of the test statistic under the null hypothesis is obtained.