We describe an algorithm for computing parameter-test-ideals in certain local Cohen–Macaulay rings. The algorithm is based on the study of a Frobenius map on the injective hull of the residue field of the ring and on the application of Sharp’s notion of ‘special ideals’. Our techniques also provide an algorithm for computing indices of nilpotency of Frobenius actions on top local cohomology modules of the ring and on the injective hull of its residue field. The study of nilpotent elements on injective hulls of residue fields also yields a great simplification of the proof of the celebrated result in the article Generators of D-modules in positive characteristic (J. Alvarez-Montaner, M. Blickle and G. Lyubeznik, Math. Res. Lett. 12 (2005), 459–473).