  Envelope tests are a popular tool in spatial statistics, where they are used
in goodness-of-fit testing. These tests graphically compare an empirical
function $T(r)$ with its simulated counterparts from the null model. However,
the type I error probability $\alpha$ is conventionally controlled for a fixed
distance $r$ only, whereas the functions are inspected on an interval of
distances $I$. In this study, we propose two approaches related to Barnard's
Monte Carlo test for building global envelope tests on $I$:(1) ordering the
empirical and simulated functions based on their $r$-wise ranks among each
other, and (2) the construction of envelopes for a deviation test. These new
tests allow the a priori selection of the global $\alpha$ and they yield
$p$-values. We illustrate these tests using simulated and real point pattern
data.
