  Goodness-of-fit tests based on the empirical Wasserstein distance are
proposed for simple and composite null hypotheses involving general
multivariate distributions. For group families, the procedure is to be
implemented after preliminary reduction of the data via invariance.This
property allows for calculation of exact critical values and p-values at finite
sample sizes. Applications include testing for location--scale families and
testing for families arising from affine transformations, such as elliptical
distributions with given standard radial density and unspecified location
vector and scatter matrix. A novel test for multivariate normality with
unspecified mean vector and covariance matrix arises as a special case. For
more general parametric families, we propose a parametric bootstrap procedure
to calculate critical values. The lack of asymptotic distribution theory for
the empirical Wasserstein distance means that the validity of the parametric
bootstrap under the null hypothesis remains a conjecture. Nevertheless, we show
that the test is consistent against fixed alternatives. To this end, we prove a
uniform law of large numbers for the empirical distribution in Wasserstein
distance, where the uniformity is over any class of underlying distributions
satisfying a uniform integrability condition but no additional moment
assumptions. The calculation of test statistics boils down to solving the
well-studied semi-discrete optimal transport problem. Extensive numerical
experiments demonstrate the practical feasibility and the excellent performance
of the proposed tests for the Wasserstein distance of order p = 1 and p = 2 and
for dimensions at least up to d = 5. The simulations also lend support to the
conjecture of the asymptotic validity of the parametric bootstrap.
