Prolog Unit Tests
AllApplicationManualNameSummaryHelp

  • 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
        • Auto-generating tests
        • library(test_cover): Clause coverage analysis
        • Portability of the test-suite
        • Motivation of choices

1 Introduction

There is really no excuse not to write tests!

Automatic testing of software during development is probably the most important Quality Assurance measure. Tests can validate the final system, which is nice for your users. However, most (Prolog) developers forget that it is not just a burden during development.

  • Tests document how the code is supposed to be used.
  • Tests can validate claims you make on the Prolog implementation. Writing a test makes the claim explicit.
  • Tests avoid big applications saying‘No' after modifications. This saves time during development, and it saves a lot of time if you must return to the application a few years later or you must modify and debug someone else's application.