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 test steps and the test validation points need to be
implemented in the body of the predicate test_case/5. The body is
assumed to terminate, the test runner doesn't impose some timeout
currently. While the predicate runner_batch/1 counts and
aggregates success, the predicate measure_batch/1 sums and
aggregates time spent.
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 results:
legend_column(Tag, Legend).
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 runner predicates are provided: