Reductio
Encyclopedia
Reductio is open source
Open source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...

 software written using the Java Programming Language
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

 from an idea that originated in a research paper called QuickCheck: A Lightweight Tool for Random Testing of Haskell Programs. Reductio and QuickCheck
QuickCheck
QuickCheck is a combinator library written in Haskell, designed to assist in software testing by generating test cases for test suites. It is compatible with the GHC compiler and the Hugs interpreter....

 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 .

Example

The following example uses Java 7 BGGA
Closure
Closure may refer to:* Closure used to seal a bottle, jug, jar, can, or other container** Closure , a stopper* Closure , the process by which an organization ceases operations...

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 x, LinkedList y =>
prop(append(x, y).size

x.size + y.size)
});

External links
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK