We consider the problem of sparsity testing in the high-dimensional linear regression model. The problem is to test whether the number of non-zero components (aka the sparsity) of the regression parameter θ * is less than or equal to k 0 . We pinpoint the minimax separation distances for this problem, which amounts to quantifying how far a k 1 -sparse vector θ * has to be from the set of k 0 -sparse vectors so that a test is able to reject the null hypothesis with high probability. Two scenarios are considered. In the independent scenario, the covariates are i.i.d. normally distributed and the noise level is known. In the general scenario, both the covariance matrix of the covariates and the noise level are unknown. Although the minimax separation distances differ in these two scenarios, both of them actually depend on k 0 and k 1 illustrating that for this composite-composite testing problem both the size of the null and of the alternative hypotheses play a key role. Along the way, we introduce a new variable selection procedure, which can be of independent interest. Property P1. A test φ satisfies (P1[α]) if its type I error probability is less than or equal to α, that is sup θ∈B 0) on a set Θ if its type II error probability is uniformly less than or equal to β, uniformly on Θ, that is inf θ∈Θ P θ,σ [φ = 1] ≥ 1 − β