Haskell testing workflow

前端 未结 4 1286
萌比男神i
萌比男神i 2020-12-07 06:55

I just started a new Haskell project and wanted to set up a good testing workflow from the beginning. It seems like Haskell has a lot of excellent and unique testing tools

4条回答
  •  遥遥无期
    2020-12-07 07:40

    The approach is advocate in RWH ch 11 and in XMonad is approximately:

    • State all properties of the system in QuickCheck
    • Show test coverage with HPC.
    • Confirm space behavior with heap profiling.
    • Confirm thread/parallel behavior with ThreadScope.
    • Confirm microbenchmark behavior with Criterion.

    Once your major invariants are established via QuickCheck, you can start refactoring, moving those tests into type invariants.

    Practices to support your efforts:

    • Run a simplified QuickCheck regression on every commit.
    • Publish HPC coverage details.

提交回复
热议问题