# Hspec

> A testing framework for Haskell with a friendly describe/it DSL

Source: https://talira.ai/catalog/hspec-w8wthgqq
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [developer tools / testing / frameworks](https://talira.ai/categories/developer-tools/testing/frameworks), [languages / haskell](https://talira.ai/categories/languages/haskell)
- Licence: MIT[^2]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [Simon Hengel](https://talira.ai/orgs/simon-hengel.md)

Hspec is a testing framework for Haskell. It has a friendly DSL for defining tests with describe, it and expectations such as shouldBe, integrates with [QuickCheck](https://talira.ai/catalog/quickcheck-ms7ypda7.md), SmallCheck and [HUnit](https://talira.ai/catalog/hunit-c6f4fsc5.md), runs spec items in parallel, and discovers test files automatically with hspec-discover. Its user's manual covers running individual spec items, speeding up the edit-compile-test cycle and writing custom formatters.

## Links

- Website: https://hspec.github.io/
- GitHub: https://github.com/hspec/hspec
- Docs: https://hspec.github.io/

## Problems it solves

- write readable unit tests for a Haskell project
- run Haskell property tests alongside example-based tests
- find and run all test files in a Haskell package automatically

## Features

- A friendly DSL for defining tests with describe, it and expectations
- Integration with QuickCheck, SmallCheck and HUnit
- Parallel spec execution
- Automatic discovery of test files
- Running individual spec items
- Custom formatters

## Trust

Overall: 0.42 out of 1.
Signals: maintenance 0.47, adoption 0.58, momentum 0.21, community 0.75, backing 0.30, extensibility 0.00.

- last commit 59 days ago
- 3 commits in the last 90 days
- 784 GitHub stars
- 73 contributors
- backed by Simon Hengel

## Related

- Works with [QuickCheck](https://talira.ai/catalog/quickcheck-ms7ypda7.md)
- Works with [HUnit](https://talira.ai/catalog/hunit-c6f4fsc5.md)

## Alternatives

- [HUnit](https://talira.ai/catalog/hunit-c6f4fsc5.md): A JUnit-style unit testing framework for Haskell
- [tasty](https://talira.ai/catalog/tasty-2v74vhch.md): A modern, extensible testing framework for Haskell

## Sources

[^1]: https://hspec.github.io/ (checked 28 Nov 2026)
[^2]: https://github.com/hspec/hspec/blob/main/LICENSE (checked 28 Nov 2026)
