
Go testing
6.9#2 in unit testing frameworksFree planFree planiOSLinuxmacOSWindows
Visit

| Fact | Go testing | Hspec |
|---|---|---|
| Test discovery | The test framework runs test functions named `TestXXX` in files ending in `_test.go`. | The `hspec-discover` preprocessor scans for spec files and generates test driver boilerplate. |
Go testing suits Go developers who want command-line tests alongside fuzzing, benchmarks, profiling, and race detection. The broader Go toolchain also serves teams building cloud services, command-line tools, web applications, or DevOps systems.
It suits Haskell developers who want readable specification-style tests with property testing and compatibility with HUnit. Projects using Cabal, Stack, or GHCi can pass Hspec options through those tools.