The IaC testing landscape
Native tests, InSpec, Checkov.
Terratest is the most popular IaC integration-testing tool, but it sits among several approaches worth knowing. Terraform now has native tests (.tftest.hcl files run by terraform test) — no Go required, good for plan- and apply-level assertions within Terraform itself. Kitchen-Terraform (Test Kitchen + InSpec) is the Ruby-based alternative, pairing deploys with InSpec assertions. And the static layer (Checkov, tfsec/Trivy, OPA/Conftest) is complementary, not competing — it answers different questions cheaply.
Choosing and combining
For teams already writing Go, Terratest’s rich module ecosystem (cloud SDK assertions, http/k8s/helm/ssh helpers) is hard to beat for real behavioral tests. Terraform native tests are attractive when you want tests in HCL without a second language, especially for plan-level checks. InSpec (its own course) shines for compliance-style “the running system meets this control” assertions. The mature answer is a pyramid: heavy static/policy at the base, native or plan tests in the middle, and a focused Terratest layer on top for the behavior that truly needs a deploy.