The AI class code uses a Horn clause deductive retriever in Lisp which is tested with lisp-unit. My AI class in Lisp uses lisp-unit, a minimal unit tester I wrote that was open-sourced a while ago. There is a unit testing package for SWI Prolog but I've not used it.