spawn
A utility package that makes writing end-to-end tests for Go servers easier.
It essentially spawns your program from its TestMain, so that you can interact with it from your tests.
For usage instructions refer to the examples.
Rationale
Writing an end-to-end test for a server in Go typically involves:
- compiling the server
- spinning up the binary
- communicating with it somehow from the tests
- shut the server down
This package makes the above steps easy to do right from within the Go tests of the server.