Integration testing in Go
goint is an integration testing framework written in Go. It was written for use in applications developed in Go. While the implementation of an integration test using the framework must be written in Go, much of the functionality can be used for applications written in other languages as well. Some of the functionality could be used in contexts other than integration testing (e.g., verifying deployments or health checks).
goint implements several capabilities which can be called verbs.
goint supports the following verbs:
Exec- executes an arbitrary process. This can be anything that can be launched from a shell command line. One field in the
Tokenwhich can be referenced in the
Kill- used to kill an
Exec'd process. The process to be killed is identified by the
Tokenfield value in the corresponding
Delay- does just that, it delays for a given amount of time and then continues
Wait- waits for a process
Exec'd with the matching
Tokenvalue to exit
Curl- will run an aribtrary curl request
DelayHealthCheck- pings an arbitrary URL for a given number of times waiting a given number of sections between polls. It will complete with either an error or success.
GoFunc- will run an arbitrary Go function.
Comp- combines an arbitrary set of the above verbs into a composite action.
Compverbs can be nested to create arbitrarily complex hierarchies of arbitrarily complex steps.