Popularity
8.6
Declining
Activity
0.0
Declining
39
7
17

Monthly Downloads: 88
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Tags: Web     Servant    

servant-quickcheck alternatives and similar packages

Based on the "servant" category.
Alternatively, view servant-quickcheck alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of servant-quickcheck or a related project?

Add another 'servant' Package

README

servant-quickcheck

servant-quickcheck provides tools to test properties across entire APIs. Rather than writing the same tests for each endpoint, with servant-quickcheck you can simply specify properties every endpoint must meet once and for all. For example:

followsBestPractices :: Spec
followsBestPractices = describe "my API" $ do

  it "follows best practices" $ do
    withServantServer myAPI myServer $ \burl ->
      serverSatisfies api burl stdArgs
           ( not500
         <%> onlyJsonObjects
         <%> getsHaveCacheControlHeader
         <%> headsHaveCacheControlHeader
         <%> mempty)

Additionally, servant-quickcheck provides a serversEqual function that generates arbitrary requests (that conform to the description of an API) and tests that two servers respond identically to them. This can be useful when refactoring or rewriting an API that should not change.