In-reply-to » Writing and running full e2e integration tests using Go and for Go CLI applications. Lookingo into one of: Yeah I agree errors should be tested too. That’s why Main() has the func Main(w io.Writer, args []string) error πŸ˜… So you can actually assert on the error returned. For a CLI however, I’m not particularly a fan of logging errors to stderr too much (if at all). And re go-cmdtest FWIW a Terminal combines stdout and stderr too by default when displaying the output of a program πŸ˜… – However I filed an issue against the cmdtest project and now I’m not so sure I want to continue using it, I may as well just figure out how to run the test binary under coverage and write the tests myself in Go.

​ Read More