I have been trying to prove theorem 10.14 in Wasserman's All of Statisticts, which reads:
If the test statistic has a continuous distribution, then under $ H_0 : \theta = \theta_0 $, the $p$-value has a $ Uniform(0, 1) $ distribution.
Using the definition given for $p$-value and the size $\alpha$ of the test/power $\beta(\theta)$ of a test, this means that if there's a rejection region $ R_\alpha $ for each $ \alpha \in (0, 1) $, and a test statistic $T(X)$, we have:
$$ \text{p-value} = \inf \left\{ \mathbb{P} ( T(X) \in R_\alpha \right\} $$
Now, if we use the "usual" rejection region,
$$ R = \left\{ x : T(X) > c \right\} $$
for a scalar-valued $ T $, meaning the $R_\alpha$s are just open intervals $ (c, \infty) $. Then $ T $ has a CDF $ F $, and we use $ P = F(T) $ and the universality of the uniform.
However, for $ T $s that aren't scalar valued, or $ R_\alpha$s that don't amount to exceeding some critical value, I'm not sure if the result still holds, and if it does still hold, how to prove it.
EDIT: Upon further reflection, I know how to prove it if I can assume that $ R_\alpha \subset R_{\alpha'} $ when $ \alpha < \alpha' $, which seems like a desirable property for a test statistic, but is not obviously a requirement based on $ T $ being continuous (or anything else I can think of like the definition of a probability).