Go Testing

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

External

Internal

Overview

Go comes with a lightweight test framework that includes the go test command and the testing package. The tests live in *_test.go files, located in the package directory.

Packages

Test Types in Go

Unit Tests

Integration Tests

System Tests

Integration Tests

Go Integration Tests

System Tests

Go System Tests

Benchmarks

Process this: https://pkg.go.dev/testing#hdr-Benchmarks.

Fuzzing

Process this: https://pkg.go.dev/testing#hdr-Fuzzing.

Skipping

Process this: https://pkg.go.dev/testing#hdr-Skipping.

Subtests and Sub-benchmarks

Process this: https://pkg.go.dev/testing#hdr-Subtests_and_Sub_benchmarks.

Main

Process this: https://pkg.go.dev/testing#hdr-Main.

Mocks

Mock support: github.com/golang/mock/mockgen

TO DO