Continuous testing is the process of testing early, often, and in an automated way — usually triggered by any change to code. Continuous testing reduces the time to obtain feedback on code quality, thereby reducing business risk. To achieve continuous testing, we rely on automation, which is not to be confused with test automation that is focused on simple pass/fail hurdles. Instead, with continuous testing, we shift our thinking to focus on acceptable levels of business risk and whether or not code can be released given that lens.
We have been working with an R&D department at a global manufacturer to encapsulate its infrastructure as code (IaC). In doing so, we built several re-usable HashiCorp Terraform modules to deploy and provision infrastructure to its environments. While sharing these modules across multiple environments, it was difficult to make sure that a new change would not cause any issues for those entities. Should there be an issue, the first question is naturally, ‘what changed?’ To avoid this question and the resulting resources needed to identify, troubleshoot and resolve the issue, the infrastructure team spent a great deal of time debugging code before actually deploying it.
Interested in streamlining this process as well, the R&D team asked our DevOps consultants if we could help. The goals included:
- automating the process and ensuring that Terraform module code changes are compatible across all its environments;
- implementing quality assurance, and;
- saving time while learning how to manage and extend the solution moving forward.