Learn the basics of testing web services and applications in Go.
- The standard library has a package named httptest with good support.
- There are several ways to create unit and integration tests in Go.
https://golang.org/pkg/net/http/
https://golang.org/doc/articles/wiki/
Basic Unit Testing
Using a http.Handler
Testing Routes
Mocking Servers
Write tests that exercise the different endpoints of the "Hello world" language
exercise from the basics. Do this by combining the mux
with the defined routes with a httptest.NewServer
.
All material is licensed under the Apache License Version 2.0, January 2004.