Small knowledge, big challenge! This article is participating in the creation activity of “Essential Tips for Programmers”.

Keep up with an article on the # Terraform | infrastructure as code testing process (a) “, this article about compliance testing and end-to-end testing.

Four, compliance test

Compliance testing is used to ensure that the configuration follows the policies you define for the project and that it should be integrated into the development cycle at the start of the project.

For example, for Terraform code, a compliance policy might have an example of “If you are creating an Azure resource, it must contain a tag”.

The Terraform-Compliance tool provides a testing framework that we can use to create policies and then run them according to the TerraForm execution plan.

Note: Terraform Sentinel can also be used to code policies, which is a paid feature available only in the Terraform Cloud or Enterprise version. Cloudrail is also a good choice.

Refer to the Official Azure documentation for Compliance Testing – Azure based compliance testing.

5. End-to-end testing

End-to-end testing, also known as “chain testing”, is to verify that all the components of a system work together before deployment to production. It is a complete test of the entire process link. End-to-end testing is usually a three-step process that includes:

  • The configuration is applied to the test environment
  • The code is then run to verify the results
  • The test environment was reinitialized or shut down (for example, unassigning virtual machines)

Similarly, Terratest can be used for end-to-end testing (as well as integration and unit testing).

See the Official Azure documentation for end-to-end Testing – Azure based end-to-end Testing.


Boy, haven’t you seen enough? Click on the stone’s home page and take a look at it casually. Maybe there will be a surprise? Welcome to support the likes/attention/comments, your support is my biggest motivation, thank you!