The half-sample method has been introduced by Stephens (1978) for testing parametric models of distribution functions. In this paper, we present a similar method for testing the goodness-of-fit of linear or nonlinear regression or autoregression functions for parametric models of order 1, under minimal stationarity and ergodicity assumptions. Our procedure is based on a measure of the cumulated deviation process A^n between a weighted marked process of residuals and a parametric estimator of the cumulated conditional mean function (i.e.\ cumulated regression or autoregression function), under the null hypothesis H0. We establish a functional limit theorem under H0 for a variant A^n(κ), 0<κ≤1, of the process A^n. The half-sample method corresponds to κ=1/2. We show that the limiting distribution of A^n(1/2) under H0 takes a very simple form. Several easily implemented goodness-of-fit tests can be based on this result. We provide simple conditions under which their power converges to 1 as the sample size goes to ∞. Finally, we investigate the asymptotic behavior of A^n(κ) as n→∞ under sequences of O(n−1/2) local alternatives. This allows us to compare the corresponding local powers of tests based on A^n(1/2) and on A^(1)n