/usr/lib/swipl/library/ext/plunit/plunit.pl
All Application Manual Name SummaryHelp

  • ext
    • plunit
      • plunit.pl -- Unit Testing
        • set_test_options/1
        • begin_tests/1
        • begin_tests/2
        • end_tests/1
        • run_tests/0
        • run_tests/1
        • run_tests/2
        • running_tests/0
        • current_test/5
        • current_test_unit/2
        • test_report/1
        • load_test_files/1
        • message_hook/3
      • test_wizard.pl -- Test Generation Wizard
 run_tests is semidet
 run_tests(+TestSet) is semidet
 run_tests(+TestSet, +Options) is semidet
Run tests and report about the results. The predicate run_tests/0 runs all known tests that are not blocked. The predicate run_tests/1 takes a specification of tests to run.

The predicate run_tests/2 is synchronized. Concurrent testing may be achieved using the relevant options. See set_test_options/1. Options are passed to set_test_options/1. In addition the following options are processed:

summary(-Summary)
Unify Summary do a dict holding the keys below. The value of these keys is an integer describing the number of tests. If this option is given, run_tests/2 does not fail if some tests failed.
  • total
  • passed
  • failed
  • timeout
  • blocked
Arguments:
TestSet- is either a single specification or a list of specifications. Each single specification is either the name of a test-unit or a term <test-unit>:<test>, denoting a single test within a unit. If TestSet is all, all known tests are executed.