quickcheck-state-machine-distributed: Test monadic programs using state machine based models

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain]

Please see the README on Github at https://github.com/advancedtelematic/quickcheck-state-machine-distributed#readme


[Skip to ReadMe]

Properties

Versions0.0.0, 0.0.1, 0.0.1
Change logCHANGELOG.md
Dependenciesbase (>=4.7 && <5), binary, containers, distributed-process (>=0.7.3), mtl, network-transport (>=0.5.2), network-transport-tcp (>=0.6.0), QuickCheck (>=2.10), random, stm [details]
LicenseBSD-2-Clause
CopyrightCopyright (C) 2018, HERE Europe B.V.
AuthorStevan Andjelkovic
Maintainerstevan.andjelkovic@here.com
CategoryTesting
Home pagehttps://github.com/advancedtelematic/quickcheck-state-machine-distributed#readme
Bug trackerhttps://github.com/advancedtelematic/quickcheck-state-machine-distributed/issues
Source repositoryhead: git clone https://github.com/advancedtelematic/quickcheck-state-machine-distributed
UploadedThu May 3 14:59:50 UTC 2018 by stevana

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees


Readme for quickcheck-state-machine-distributed-0.0.1

[back to package description]

quickcheck-state-machine-distributed

Hackage Stackage Nightly Stackage LTS Build Status

quickcheck-state-machine-distributed is Haskell library for testing stateful, possibly distributed, programs. It's based on QuickCheck, but differs from the Test.QuickCheck.Monadic approach in that it lets the user specify the correctness by means of a state machine based model using pre- and post-conditions. The advantage of the state machine approach is twofold: 1) specifying the correctness of your programs becomes less adhoc, and 2) you get testing for race conditions for free.

The combination of state machine based model specification and property based testing first appeared in Erlang's proprietary QuickCheck. The quickcheck-state-machine-distributed library can be seen as an attempt to provide similar functionality to Haskell's QuickCheck library.

The quickcheck-state-machine-distributed library builds upon ideas from the quickcheck-state-machine sister library. The most significant difference is that the former is based on the distributed-process library, hence the name. A more detailed comparison follows below.

Example

See test/TicketDispenser.hs for a full example of how to implement and test a ticket dispenser -- think of one of those machines in the pharmacy which gives you a piece of paper with your number in line on it.

This example also appears in the Testing a Database for Race Conditions with QuickCheck and Testing the Hard Stuff and Staying Sane [PDF, video] papers.

quickcheck-state-machine-distributed vs quickcheck-state-machine

Apart from the already mentioned difference that -distributed is based on distributed-processes, it's also different in that it:

Contributing

The quickcheck-state-machine-distributed library is still very experimental.

We would like to encourage users to try it out, and join the discussion of how we can improve it on the issue tracker!

See also

The README of the sister library quickcheck-state-machine library contains many links and examples that could be useful for a better understanding of this library and the underlying principles.

License

BSD-style (see the file LICENSE).