# Go Test ## Library - Environment - [[LocalStack]] - [GitHub - dolthub/go-mysql-server: A MySQL-compatible relational database with a storage agnostic query engine. Implemented in pure Go.](https://github.com/dolthub/go-mysql-server) - Mock - [GitHub - golang/mock: GoMock is a mocking framework for the Go programming language.](https://github.com/golang/mock) - [GitHub - stretchr/testify: A toolkit with common assertions and mocks that plays nicely with the standard library](https://github.com/stretchr/testify) - Data - [GitHub - DATA-DOG/go-txdb: Immutable transaction isolated sql driver for golang](https://github.com/DATA-DOG/go-txdb) - [GitHub - bluele/factory-go: A library for setting up Golang objects inspired by factory\_bot.](https://github.com/bluele/factory-go) - [GitHub - go-testfixtures/testfixtures: Ruby on Rails like test fixtures for Go. Write tests against a real database](https://github.com/go-testfixtures/testfixtures) - Utility - [GitHub - google/go-cmp: Package for comparing Go values in tests](https://github.com/google/go-cmp) - `reflect.DeepEqual` -> `cmp.Diff` ## References - [これからのテストの話をしよう〜Goにおけるテストノウハウ〜 #Go - Qiita](https://qiita.com/mtskhs/items/c9f69b036f0ab47b617e) - [GoのWebアプリをテストするノウハウ](https://zenn.dev/media_engine/articles/testing-go-applications) - [複数のAPIエンドポイントをまたぐテストをgo testで実行するための仕組み - Pepabo Tech Portal](https://tech.pepabo.com/2022/06/07/scenario-testing-in-go/) - [Go統合テストにおけるコードカバレッジを翻訳する](https://zenn.dev/nii/articles/goblog-codecoverage-integrationtests) - [Goのdatabase周りのテストではinterfaceを最大限に活用しようという話 - nakamura244 blog](https://tsuyoshi-nakamura.hatenablog.com/entry/2019/07/01/094425)