Integration Testing Suite

  • Score Awaiting client review
  • Date Published
  • Reading Time 2-Minute Read
Case study devops

Integration Testing Suite.

Client: Global retail company with event-driven infrastructure

Industry: Retail

Project Duration: 2 months

Goal: Build a dockerized testing suite which will treat system as blackbox and verify business scenarios against the whole pipeline of applications

Tech: Docker, Docker Compose, Java, Spring, Cucumber, WireMock

The Challenge

Build a testing suite which will verify business functionality against near production like infrastructure, both on a local infrastructure (to help developers verify features before the commit), and on a staging environment (to continuously verify the functionality of new increments of the product). The infrastructure consists of many moving parts, from distributed messaging and storage, to many microservice containers in one big pipeline which makes this problem both really important and challenging.

The Approach

Since the whole application is developed with containers in mind and in Java programming language we decided to use a combination of Spring Framework and Cucumber. The plan was to create one application skeleton, and use it as an integration test while developers develop code on a local station and as a smoke test which is running continuously on the staging environment. In this way, both developers are confident that their code would not break functionality, and the whole team is confident that the latest code on staging is ready for production deployment.

The Solution

We have developed a Spring Java application with Cucumber integration and leveraged Cucumber scenarios as documentation for integration tests. This application uses HTTP APIs as entry and exit points to pipeline. External services are mocked with WireMock to avoid external dependencies. The whole integration suite is dockerized, and on staging Jenkins is starting the whole suite against the staging infrastructure. We have created a docker-compose file for developers so they can start a production like environment in docker containers on a local station.

The Results

A fully automated continuous integration testing suite which is always running on staging environment and gives us confidence that functionality is not broken with each code increment. The same tests are used by developers before they commit the new code to verify that the functionality is still in place as before their change.