5 Ways to Test Applications that Access a Database in Haskell At work I often write REST JSON APIs that access a SQL database in Haskell. Recently, I've been using Servant to define the API and Persistent for database access. One problem I've been trying to solve is how to elegantly test application code that accesses a database. Like any other language, there is no straightforward way in Haskell