All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
Prompting the deceased to say the testimony is not obligatory according to the scholarly consensus. Moreover, it was not the custom of the Muslims during the lifetime of the Messenger of Allaah, sallallaahu ‘alayhi wa sallam, and his successors.
It was the practice of a few Companions like Abu Umamah and Wathela ibn Al-Asqa' . However, some scholars gave a concession to do it like Imaam Ahmad . Some of his disciples, as well some Shafi‘is also recommended it.
Some scholars consider it an act of innovation. Therefore, the scholars disputed on three opinions: recommendation, disapproval and permissibility.
Allaah Knows best.