File "runner"

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:

runner_batch(T):
The predicate executes the test cases, collects and summarizes the success and failure results results under the tag T.
measure_batch(T):
The predicate executes the currently loaded test cases, collects and summarizes the time measurement results under the tag T.
diff_batch(L, T):
The predicate creates test results with tag T, that have pre-computed the difference in-dicator of the test results for the tag list L.
dump_batch(F, T):
The predicate writes the test results under the tag T to the file F. An already existing file F is silently overwritten.

Kommentare