Wiktionary
n. The study of heresy.
Wikipedia
In theology or the history of religion heresiology is the study of heresy. Heresiographical works were common in both Medieval Christianity and Islam.
Heresiology developed as a part of the development of orthodoxy in the Roman/Byzantine Church. Church scholars studied and documented the teachings of various Christian sects in order to clearly distinguish between those they accepted as orthodox and those they rejected as heretical. Other Christian communions developed their own competing heresiological traditions as well.
In Islam heresiology surveyed both the various Muslim sects, and also other religions such as Christianity and Judaism. Some like Abu Mansur al-Baghdadi and Ibn Hazm wrote polemical works, arguing the falseness of sects and religions other than their own. Others like Al-Shahrastani's Al-Milal wa al-Nihal took a more impartial approach closer to modern religious studies works.