A total of 17 356 test-day milk yield (TDMY) records from 642 first lactations of Alpine goats were used to model variations in lactation curve using random regression models (RRM). Orthogonal Legendre polynomials and B-splines were evaluated to obtain adequate and parsimonious models for the estimation of genetic parameters. The analysis was performed using a single-trait RRM, including the additive genetic, permanent environmental, and residual effects. We estimated the mean trend of milk yield, and the additive genetic and permanent environmental covariance functions through random regression using different orders of orthogonal Legendre polynomial (three to six) and B-spline functions (linear, quadratic, and cubic, with three to six knots). This study further evaluated different number of classes of residual variances. The covariance components and the genetic parameters were estimated using the restricted maximum likelihood method. Heritability estimates presented similar trends for both functions. The RRM with a higher number of parameters better described the genetic variation of TDMY throughout the lactation. The most suitable RRM for genetic evaluation of TDMY of Alpine goats is a quadratic B-spline function with six knots, for the mean trend, curves of additive genetic and permanent environmental effects, and five classes of residual variance.