InSpec and ServerSpec are Infrastructure Testing tools based on Ruby. InSpec is newly added into ThoughtWorks Tech Radar.
RVM, Ruby (>2.2) and rubygems should be installed.
gem install inspec
Write and run the InSpec script according to its API document.
You can reference the script here.
inspec exec inspec.rbto run and check the result.
And there is another official article talking about the migration from ServerSpec to InSpec (we can also see the differences of resources between the two).
To generate a json file as the test result, we run
inspec exec sample_inspec.rb --format json >report.
And it will generate the test result named “report” every time the test runs.
InSpec has 98 types of resources but ServerSpec has only 41.
In general, I would suggest to use InSpec for Infrastructure Testing in new projects.