Solution (source code)

= Solution

If $X\sim N(0,\theta^2)$, then $Y=|X|$ has a scaled <half-normal distribution> with
$$
G_\theta(y)=2\Phi(y/\theta)-1,
\qquad
g_\theta(y)=\frac2\theta\phi(y/\theta),
\qquad y>0.
$$
Put $c=\Phi^{-1}(3/4)$. The population median is $t_0=\theta c$, and the <asymptotic distribution of a sample median> gives
$$
\boxed{
\sqrt n(T_n-\theta c)
\Longrightarrow
N\left(0,\frac{\theta^2}{16\phi(c)^2}\right)}.
$$

Under $H_0:\theta^2=1$, positivity of the scale means $\theta=1$. If $z_{1-\alpha}$ is the $(1-\alpha)$-quantile of the <standard normal distribution>, an asymptotically level-$\alpha$ test rejects for
$$
\boxed{
T_n>c+\frac{z_{1-\alpha}}{4\phi(c)\sqrt n}}.
$$
Larger scale makes the population median $\theta c$ larger, so this is the appropriate one-sided rejection region.