Reductio
Developer(s) | Tony Morris |
---|---|
Stable release | 2.2
|
Written in | Java |
Operating system | JVM |
Type | Software testing |
License | BSD-style |
Website | [1] |
Reductio is open source software written using the Java Programming Language from an idea that originated in a research paper called QuickCheck: A Lightweight Tool for Random Testing of Haskell Programs.[1] Reductio and QuickCheck utilise a testing technique called Automated Specification-based Testing.
The primary objective of Reductio is to make testing as rigorous as possible, while alleviating developer effort through automation of many common testing tasks. Reductio includes usage examples that demonstrate how this objective has been met using both traditional Java 1.5 and Java 7 BGGA syntax as well as Scala programming language examples.[2]
Example
[edit]The following example uses Java 7 BGGA syntax to execute 100 unit tests on java.util.LinkedList
. It asserts that when a list (x
) is appended to another list (y
), then the size()
of the resulting list (xy
) is equivalent to the sum of the size()
of the two original lists.
Property p = property(arbLinkedList(arbInteger), arbLinkedList(arbInteger), {
LinkedList<Integer> x, LinkedList<Integer> y =>
prop(append(x, y).size() == x.size() + y.size())
});