Most of the time, to do hypothesis tests is to follow the tedious processes given on statistics textbooks. But recently I find that there are, in general, more than several test statistics that can be used to test the same hypothesis. To give an example consider the following test.
$n$ samples of the random variable $X$ are given. Null Hypothesis $H_0:X\sim N(\mu,\sigma_0^2)$. Alternative Hypothesis $H_1:X\sim N(\mu,\sigma_1^2)$. $\mu$ and $\sigma_i$ are known. $\sigma_0<\sigma_1$.
If we follow the textbooks, then we should use the $\chi$-square distribution, and the test statistic is the variance of the sample(times $n$ divided by $\sigma_0$). But the following test is also appropriate.
Let $\bar{X}$ be the sample mean. If $|\bar{X}-\mu|<c$ then accept $H_0$. Otherwise accept $H_1$. $c$ is chosen according to the level of significance of the test, $\alpha$.
This is an appropriate test because the condition $|\bar{X}-\mu|<c$ is more likely to be satisfied under $H_0$ than under $H_1$. (Many other test statistics are also appropriate for the same reason.) The test, however, has one shortcoming: the probability of making a type II error, $\beta$, is independent of $n$, which means it doesn't decrease as sample size increases.
Therefore I wonder which test statistic is the best in this situation. There is some simple criteria of how good a test statistic is. In this case, for example, we can say that for $n=100$ and $\alpha=0.05$, the smaller the minimum value of $\sigma_1/\sigma_0$ required to make $\beta\leq 0.05$, the better the test statistic.
Also, how can we make sure that the test given on the textbook is the best test, and there are no better alternatives?
Since this question might be too broad, I would be glad if anyone could give a specific example(like the one above) to illustrate the general idea. Also, are there any books or articles that discuss this topic in detail?