Testing tools?

What do you use for your unit and integration tests? I’m looking at Serverspec and Inspec–what are the popular options?

We use a library we created call Terratest. It’s written in Go and has lots of helpers for common operations we use at test time: running terraform apply, terraform destroy, SSHing to servers, running Packer builds, etc.

We are hoping to open source it some time in the future.

I’ve actually played with Inspec (and previously Serverspec) and I think there’s a lot of goodness there for asserting that your server state is as expected. Building on top of RSpec gives it a very powerful set of assertions and easy to use test structure.
The nuance is that setting up the test environment to test terraform modules and other infrastructure tools is tricky. That’s the reason we wrote our own framework. Nothing we found out of the box do a lot of the things that are necessary to setup the necessary environments to do testing: running terraform, parsing its output, setting up base infrastructure in AWS, etc.

I wish hashicorp started to pay attention to this issue. Excellent tool, zero testing frameworks - not a good combination for the long run.

We do testing using bunch of tools and it’s a huge headache
Serverspec and inspec for server config tests
wata727/tflint for syntax and logic check
k1LoW/awspec for tests of aws resources
python package terraform_validate for some “unit testing”

There is also kitchen-terraform…