# Two procedures for hypothesis testing

I would like to know if these two procedures for hypothesis testing are equivalent.

First, build a test statistic. Then with the data calculate it. And then compare it with the value of the distribution for a given level of significance. And so reject or accept the null hypothesis.

Second, calculate the p-value. Then reject or accept the null hypothesis if the p-value is greater or less than the given significance level.

The two procedures are the same but expressed in different ways? Can in any case the null hypothesis be rejected with one procedure and accepted with the other?

[Your p value method (i) is exactly backward (implying you reject if p is large by listing both first), and (ii) doesn't identify what happens if p is exactly $$\alpha$$ - which is reject. Some books have this border case wrong]