Skip to content

adetokunbo/tmp-proc

Repository files navigation

tmp-proc

GitHub CI BSD-3.0 license

tmp-proc is a testing library designed to simplify integration tests that use services running on docker.

Goals

While it is already possible to write integration tests that use dockerized services using the various haskell testing frameworks, tmp-proc aims to make doing so easier by providing useful types and combinators that take care of various things that contribute to the boilerplate involved while coding integration tests.

It provides useful combinators that simplify

  • launching multiple services on docker during test setup
  • connecting to those services from a WAI server in the integration test
  • getting connections to the launched services to query their state

tmp-proc's combinators allow for easy integration with many of Haskell's popular testing frameworks.

Quick Start

To get started, please read through this quick HOWTO.

After that, you can learn more through a detailed example available as a separate package. It's a working example of testing a simple postgresql/redis servant-based API service, with examples of usage from both hspec and tasty.

Similar libraries

tmp-proc provides a similar set of features as testcontainers library. If tmp-proc interests you, you might want to check that out too.