A Clojure testing framework using a state monad for composing reusable integration test steps.
StateFlow is a Clojure testing framework designed for integration testing by using a state monad to build and compose test flows. It allows developers to create reusable test steps and bindings, making it easier to write and maintain complex integration tests. The framework integrates with clojure.test and matcher-combinators, providing a structured approach to testing backend systems.
Clojure developers building backend services who need a robust framework for integration testing with composable test steps and state management.
Developers choose StateFlow for its state monad foundation, which enables predictable test composition and reuse, reducing boilerplate and improving test clarity. Its integration with clojure.test and support for asynchronous testing make it a powerful tool for backend integration tests.
Integration testing framework using a state monad in the backend for building and composing flows
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses a state monad to pass and manage state between test steps, enabling predictable and composable data flow, as described in the README where steps are functions of state.
Allows building complex integration tests by combining primitive steps and nested flows, following the Composite Pattern for modular and reusable test code.
Seamlessly integrates with clojure.test and matcher-combinators via defflow and match? macros, providing powerful assertions with retry logic for asynchronous testing.
Supports concurrency with :times-to-try and :sleep-time options in match?, enabling robust testing of operations like database updates or message processing.
Requires understanding of monadic concepts and the funcool.cats library, which can be a barrier for developers new to functional programming in Clojure.
Setting up the initial state, especially with systems using Component libraries, adds configuration overhead that may be cumbersome for simple test suites.
Upgrades like state-flow-2.2.4 introduced signature changes for match?, requiring refactoring with provided scripts, which can disrupt existing test code.