This module allows executing test cases. The test runner can be invoked via the predicate runner_batch/1. The test runner executes the test cases and summarizes the results. The test suite under consideration needs to be supplied to the runner by consulting Prolog texts that contain facts and rules for the data model of the runner.
The library shares the following data model with the test suite:
runner_folder(Folder, Descr).
runner_file(Folder, File, Descr).
runner_pred(Fun, Arity, Folder, File, Descr).
runner_case(Fun, Arity, Folder, File, Descr) :- Body.
The library shares the following data model with the test
harness:
measure_time(Dialect, Time)
The test steps and the test validation points need to be implemented in the body of the predicate test_case/5. The Ok count reflects the number of bodies that succeed once. The Nok count reflects the number of bodies that fail or that throw an error. The body is assumed to terminate, the test runner doesn't impose some timeout currently.
The library shares the following data model with the further tooling:
result_summary(Tag, Data).
result_suite(Folder, Tag, Data).
result_tests(Folder, File, Tag, Data).
result_pred(Fun, Arity, Folder, File, Tag, Data).
result(Fun, Arity, Folder, File, Descr, Tag, Data).
The following diagnose predicates are provided: