It is of fundamental importance to infer how the conditional mean of the response varies with the predictors. Sufficient dimension reduction techniques reduce the dimension by identifying a minimal set of linear combinations of the original predictors without loss of information. This paper is concerned with testing whether a given small number of linear combinations of the original ultrahigh dimensional covariates is sufficient to characterize the conditional mean of the response. We first introduce a novel consistent lack-of-fit test statistic when the dimensionality of covariates is moderate. The proposed test is shown to be $n$-consistent under the null hypothesis and root-$n$-consistent under the alternative hypothesis. A bootstrap procedure is developed to approximate p-values and its consistency has been theoretically studied. To deal with ultrahigh dimensionality, we introduce a two-stage lack-of-fit test with screening (LOFTS) procedure based on data splitting strategy. In the first stage, we apply the martingale difference correlation based screening to one half of the data and select a moderate set of covariates. In the second stage, we perform the proposed test based on the selected covariates using the second half of the data. The data splitting strategy is crucial to eliminate the effect of spurious correlations and avoid the inflation of Type-I error rates.