Reductio

From HandWiki - Reading time: 2 min

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




Licensed under CC BY-SA 3.0 | Source: https://handwiki.org/wiki/Software:Reductio
20 views | Status: cached on July 16 2024 19:28:43
↧ Download this article as ZWI file
Encyclosphere.org EncycloReader is supported by the EncyclosphereKSF