For a hypothesis test of the form
$\begin{align}
H_0 : \theta = \theta_0 && H_1 : \theta \ne \theta_0
\end{align}
$
the general form of the test statistic is
$s(x) = \frac{\hat \theta - \theta_0}{\hat {s.e.}(\hat \theta)}$
Typically we want to find a test statistic for which we know the distribution.