GithubHelp home page GithubHelp logo

gencheck's Introduction

GenCheck

Test.GenCheck is a Haskell library for generalized proposition-based testing. It simultaneously generalizes both QuickCheck and SmallCheck.

Its main novel features are:

  • introduces a number of testing strategies and strategy combinators
  • introduces a variety of test execution methods
  • guarantees uniform sampling (at each rank) for the random strategy
  • guarantees both uniqueness and coverage of all structures for the exhaustive strategy
  • introduces an extreme strategy for testing unbalanced structures
  • also introduces a uniform strategy which does uniform sampling along an enumeration
  • allows different strategies to be mixed; for example one can exhaustively test all binary trees up to a certain size, filled with random integers.
  • complete separation between properties, generators, testing strategies and test execution methods

The package is based on a lot of previous research in combinatorics (combinatorial enumeration of structures, as well as the theory of Species), as well as a number of established concepts in testing (from a software engineering perspective). In other words, further to the features already implemented in this first release, the package contains an extensible, general framework for generators, test case generation and management. It can also be very easily generalized to cover many more combinatorial structures unavailable as Haskell types.

The package also provides interfaces for different levels of usage. In other words, there is a 'simple' interface for dealing with straightforward testing, a 'medium' interface for those who want to explore different testing strategies, and an 'advanced' interface for access to the full power of GenCheck.

The file tutorial/reverse/TestReverseList.lhs shows the simplest kinds of tests (standard and deep for structures, or base for unstructured types) and reporting (checking, testing and full report) for the classical list reverse function. The files in tutorial/list_zipper show what can be done with the medium level interface (this tutorial is currently incomplete). The brave user can read the source code of the package for the advanced usage -- but we'll write a tutorial for this too, later.

gencheck's People

Contributors

aavogt avatar gordonuszkay avatar guszkay avatar jacquescarette avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.