Watching – Creating Well-tested Applications in Go @ PluralSight
It was a great course which covers wide range of topics around testing in golang. I once saw some descriptions that golang has very simple verification syntax, and I was assuming that it only has limited testing functionalities. It was wrong and golang comes with various and extensive toolsets for testings.
Among the topics, what I found interesting are,
- Blackbox Testing
- “testing/quick” package (https://golang.org/pkg/testing/quick/) provides utility functions to help with black box testing. It’s kind of property-based testing, which verifies against randomly generated values.
- Example Testing
- Examples can be used for both documentation and behavior verification (https://golang.org/pkg/testing/). It’s kind of doctest with nice StdOut hooking.
- Performance Profiling
- pprof (https://golang.org/pkg/net/http/pprof/) tool can provide very detailed and graphical analysis of performance bottlenecks.
Other languages have similar functionalities, but these ones in golang sounds simple and solid, and I would like to try out.