はじめに Testcontainersとは Testcontainersのメリット ハンズオン 環境設定 goプロジェクトの作成 必要なパッケージのインストール テストコードの作成 コンテナリクエストの設定 コンテナの起動 コンテナのホストとポートの取得 結果の確認 まとめ はじめに こんにちは! エンジニア2年目のTKDSです! 前回はDaggerを紹介しました。 今回もコンテナ技術を活用して、テストを容易にするツールについて紹介します。 今回取り上げるのは、統合テストやエンドツーエンドテストのためにDockerコンテナを利用するライブラリ、Testcontainersです。 Testcontainersとは Testcontainersはさまざまなプログラミング言語(Java、Go、Python、Node.jsなど)向けに提供されており、Daggerと同様にテスト用のコンテナを簡単に作