servant-quickcheck-0.0.3.1: QuickCheck entire APIs

Servant.QuickCheck

Description

Servant.QuickCheck provides utilities related to using QuickCheck over an API. Rather than specifying properties that individual handlers must satisfy, you can state properties that ought to hold true of the entire API.

While the API must be described with servant types, the server being tested itself need not be implemented with servant-server (or indeed, written in Haskell).

The documentation of the Useful predicates sections is meant to serve as a set of helpful pointers for learning more about best practices concerning REST APIs.

Synopsis

# Property testing

Check that a server satisfies the set of properties specified.

Note that, rather than having separate tests for each property you'd like to test, you should generally prefer to combine all properties into a single test. This enables a more parsimonious generation of requests and responses with the same testing depth.

Example usage:

goodAPISpec = describe "my server" $do it "follows best practices"$ do