Skip to content

Sharing resources (like a database pool) between tests #49

@seagreen

Description

@seagreen

I have some tests that each need a database pool, but I'd rather not create an individual database pool within each test for performance reasons.

I'd like to write my tests like prop_foo :: a -> Property, and have some way to feed the result of my pool creation function mkPool :: IO a into each test.

Does HTF provide a way to do that and still use its TH test discovery? Even if one has to do discovery manually, is there a way to at least keep the same test settings and pretty results printing code as the rest of one's HTF tests?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions