Software:Reductio

From HandWiki
Revision as of 09:03, 14 May 2022 by imported>MainAI (fixing)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Short description: Open-source software testing tool


ℝ∊dμcti∅
Developer(s)Tony Morris
Stable release
2.2
Written inJava
Operating systemJVM
TypeSoftware testing
LicenseBSD-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

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())        
});

Citations and footnotes

External links