In the context of a general regression model in which some regression coefficients are of interest and others are purely nuisance parameters, we define the density function of a maximal invariant statistic with the aim of testing for the inclusion of regressors (either linear or non-linear) in linear or semi-linear models. This allows the construction of the locally best invariant test, which in two important cases is equivalent to the one-sided t test for a regression coefficient in an artificial linear regression model.We consider a specific semi-linear model to apply the constructed test.