• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

Prolog Unit Tests
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • Prolog Unit Tests
        • Introduction
        • A Unit Test box
        • Using separate test files
        • Running the test-suite
        • Tests and production systems
        • Controlling the test suite
          • set_test_options/1
          • load_test_files/1
          • running_tests/0
          • test_report/1
        • Auto-generating tests
        • Portability of the test-suite
        • Motivation of choices

6 Controlling the test suite

set_test_options(+Options)
Defined options are:
load(+Load)
Determines whether or not tests are loaded. When never, everything between begin_tests/1 and end_tests/1 is simply ignored. When always, tests are always loaded. Finally, when using the default value normal, tests are loaded if the code is not compiled with optimisation turned on.
run(+Run)
Specifies when tests are run. Using manual, tests can only be run using run_tests/0 or run_tests/1. Using make, tests will be run for reloaded files, but not for files loaded the first time. Using make(all) make/0 will run all test-suites, not only those that belong to files that are reloaded.
format(+Format)
Currently one of tty (default if there is a console) or log. tty uses terminal control to overwrite successful tests, allowing the user to see the currently running tests and output from failed tests. This is the default of the output is a tty. log prints a full log of the executed tests and their result and is intended for non-interactive usage.
output(+When)
If always, emit all output as it is produced, if never, suppress all output and if on_failure, emit the output if the test fails.
show_blocked(+Bool)
Show individual blocked tests during the report.
occurs_check(+Mode)
Defines the default for the occurs_check flag during testing.
cleanup(+Bool)
If true (default false), cleanup report at the end of run_tests/1. Used to improve cooperation with memory debuggers such as dmalloc.
jobs(Num)
Number of jobs to use for concurrent testing. Default is one, implying sequential testing.
timeout(+Seconds)
Set timeout for each individual test. This acts as a default that may be overuled at the level of units or individual tests. A timeout of 0 or negative is handled as inifinite.
load_test_files(+Options)
Load .plt test-files that belong to the currently loaded sources.
running_tests
Print all currently running tests to the terminal. It can be used to find running thread in multi-threaded test operation or find the currently running test if a test appears to be blocking.
test_report(+What)
Print report on the executed tests. What defines the type of report. Currently this only supports fixme, providing details on how the fixme-flagged tests proceeded.

ClioPatria (version V3.1.1-51-ga0b30a5)