Testing

suggest change

Go comes with its own testing facilities that has everything needed to run tests and benchmarks. Unlike in most other programming languages, there is often no need for a separate testing framework, although some exist.

Basic Test

Table-driven unit tests

Testing using setUp and tearDown function

Benchmarks

Example tests (self documenting tests)

Testing HTTP requests

Set/Reset mock function in tests

View code coverage in HTML format

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents