Polynomial factorization (hence also irreducibility testing) over $\mathbb{F}_q[x]$ can be tested done eﬃciently using the Berlekamp or similar algorithms . For (for polynomial rings over other fields the situation is differentdifferent). See, e.g., herethis PDF for an elementary discussion.
Irreducibility over $\mathbb{F}_q[x]$ can be tested eﬃciently using the Berlekamp or similar algorithms. For polynomial rings over other fields the situation is different. See, e.g., here for an elementary discussion.