As a side note, the "repeated test identifier found" errors must be fixed for accurate test results. Test identifiers must be unique as documented.
There's not enough information in your question for diagnosing the issue. The use of the {}/1
control construct in the definition of the test to wrap the test goal means that the goal is called as-is. My suggestion is for you to cd to a student directory where you see the issue, and run the tests manually and then also call the test goal at the top-level. Something like:
$ cd student_id_xyz
$ swilgt
...
?- {tester}.
...
?- no_duplicates(..., ...).
...
Do this without restarting so that we guarantee that both tests (from the tests file and typed at the top-level) occur with the same exact context. Let us know if you get the same results.
The solution I suggested for your student grading task assumes that the student Prolog files are plain Prolog files (i.e. no module definitions). If that's not the case for some of the student submissions, try changing the loading of the student Prolog files in the tester.lgt
driver files from using the logtalk_load/1
predicate (which was selected for portability) by the Prolog backend specific predicate (e.g. consult/1
).