How to Perform Integration Testing on Go Applications with Docker
Get familiar with the benefits of using Docker for integration tests, and learn how Docker can help you perform integration testing on Go applications.
Introduction
One of the reasons behind the popularity of Go is its testing story. Go comes with a lightweight test framework that makes it trivial to write different kinds of tests.
In this tutorial, you will learn how to perform integration testing with Go. We will create a sample application, which will make use of another microservice written in Go. The integration tests will test the interaction between the application and the microservice.
Goals
By the end of this tutorial, you will:
- Understand the utility of Docker in testing,
- Learn how to test the interaction between two applications, and
- Know how to incorporate integration testing in your build process using Semaphore.
Prerequisites
For this tutorial, you will need:
- Docker installed on your machine and
- Go installed on your machine.