Ritabrita Mandal

The 9th edition of the Global Testing Retreat 2024!

About Speaker

Ritabrita Mandal

Cognizant Technology Solutions

Ritabrita is an experienced Azure Cloud Engineer and Automation Tester with over four years of expertise in Infrastructure as Code (IaC), DevOps, and cloud automation. She specializes in creating custom frameworks for testing cloud infrastructures, integrating tools like Terraform and Terratest to enhance Quality Assurance processes. Passionate about automation and improving CI/CD pipelines, she focuses on delivering scalable, secure, and reliable cloud solutions. She has also recently contributed a paper on Terratest to advance infrastructure testing automation.

Interactive Talk - IaC automation testing, customization and framework with Terratest

Nowadays, Cloud computing is adopted by almost every organization, whether it is an MNC or a startup many are still migrating towards it because of the cost-cutting, lesser maintenance, and the increased capacity of the data with the help of servers maintained by the cloud providers.

With the extensive adaption of Cloud computing across various organizations the next big challenge involved was provisioning these systems on cloud across environments.

Team would individually configure the infrastructure (servers, databases, load balancers, containers, etc.) for each deployment. Over time, environments that were intended to be identical, become inconsistent (they are often called “snowflakes”), which makes them harder to configure and subsequently slows down deployments.

Manual provisioning and infrastructure management is slow and cumbersome. Provisioning infrastructure through point-and-click GUIs is error-prone, inefficient, and doesn’t scale.

Hence to make infrastructure scaling efficient, faster and fail-safe Infrastructure as code (IaC) came into picture. Infrastructure as code (IaC) builds on software-defined technologies to bring more speed and consistency to IT infrastructure provisioning and configuration.

So, IaC uses software tools to automate administrative tasks by describing infrastructure in code.
It’s implemented like this:

  • The team writes infrastructure configurations in a required programming language.
  • The code files are sent to a code repository.
  • An IaC tool runs the code and performs the required activities.

Although IaC enables an enterprise to quickly invoke infrastructure to support an application deployment at almost any scale, it relies on code, just as any other software development project — which means testing is essential.

The goal of IaC testing is identical to that of testing any other software: Ensure that the code delivers expected results. However, IaC testing takes place on the environment before the application is ever deployed. Once an IaC file version is created, it receives an array of static tests to validate the IaC file before it’s ever executed, but testing often employs tools that are familiar to developers. Terratest is an open-source testing framework for infrastructure defined as code using Terraform. It performs unit tests, integration tests, and end-to-end tests for the cloud-based infrastructure and helps identify security vulnerabilities early on. It is possible to automate and integrate Terratest with Terraform CI/CD workflow, making it convenient for developers to receive early feedback during development.

A custom automation framework to be designed using Go Programming language to support IAC automation testing. This would involve creating templates, utilities to cater for all the various cloud and infrastructure components.

Some of the benefits are described below.

  1. Infrastructure testing automation: Automates testing for Terraform, enabling efficient and consistent validation of cloud resources and configurations.
  2. Multi-cloud support: It offers compatibility with various cloud providers, including AWS, Azure, and Google Cloud, allowing users to test across different platforms.
  3. Programmatic test definition: Developers can write tests in Go programming language, enabling expressive and code-based test cases that interact with Terraform-managed resources.
  4. Testing levels: Terratest supports a range of testing levels, from unit and integration tests to end-to-end scenarios, ensuring comprehensive coverage of infrastructure code behaviour.
  5. Early issue detection: By catching problems before deployment, Terratest enhances the reliability of infrastructure code, reducing risks and promoting more stable cloud environments.
Proud to Be Speaking at #ATAGTR2024

Scroll to Top