Automate Testing on BitBucket for Golang CRUD App with Docker
Testing is a crucial aspect of software development, ensuring reliability, functionality, and performance before deployment. In this blog, we will explore how to test a Golang CRUD application on Bitbucket using Docker for database and dependencies. We will approach it from both a developer's and a DevOps perspective, covering unit tests, integration tests, CI/CD automation, and best practices. Overview of the Application We will use a Golang CRUD application that utilizes GraphQL , PostgreSQL , and the go-chi router . The app has two main entities: Author Post The application supports operations like creating, reading, updating, and deleting ( CRUD ) authors and posts. Key Technologies Used: Golang : The programming language. PostgreSQL : The database running via docker. GraphQL : The API query language. Docker & Docker Compose : For containerizing the application and dependencies. Bitbucket Pipelines : For automated testing and deployment. Step 1: Writing Unit Tests Un...