← back to backlog: veritas

Native Property-Based Testing (PBT)

veritas-362
statusWork in ProgresstypeTask
description

Now it's clear that data-driven (table) testing is easy using map and apply. The next logical evolutionary step for a Lisp-powered framework is Property-Based Testing inspired by QuickCheck.

The Improvement: Add a property macro alongside test and suite.

(property "Reverse of reverse is the original list"
          #:generators (list gen-list)
          #:thunk (lambda (xs)
                    (assert-equal #:expect xs #:got (reverse (reverse xs)))))

Veritas could automatically generate 100 random inputs, execute the assertion, and--if it fails--attempt to "shrink" the failing input to its smallest reproducible form.

plan (0)

sprint: none
milestone: none

time logged (0)

no time logged yet

discussion (0)

no comments yet

attachments (0)

no attachments yet

activity (0)

nothing recorded yet

versions (0)

no versions yet