The error-invariant hypothesis is central to the literature on instrumental variables. This means that the model error term is the same for all potential outcomes. This assumption means that the treatment effect is constant across all subjects. This allows the instrumental variable estimates to be interpreted as the average treatment effect across the study population. If this assumption does not hold, the bias of the instrumental variable estimator can be greater than that of the simple estimator that ignores endogeneity. In this paper, he develops two tests for the assumption of error invariance when treatments are endogenous, instrumental variables are available, and models are separable. The first test assumes that the potential result is regressor, linear, and simple to compute. The second test is nonparametric and relies on Tikhonov regularization. Treatment can be either discrete or continuous. Show that the test has asymptotically correct levels and asymptotic power equal to 1 for a range of choices. Simulations show that the proposed test achieves excellent finite-sample performance. This methodology is also applied to the evaluation of returns to schooling and the effect of price on demand in fish markets.