Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ChefSpec and Test Kitchen

I am investigating if ChefSpec report (with coverage) and Test Kitchen report can be generated as junit format so they can be parsed then by Jenkins to publish results. Or if there is some other friendly way those results could be published by Jenkins.

Thanks.

Edit 1: Sorry if I explain incorrectly, but I know that chefspec is for unittest and test kitchen is for integration test. What I meant in this question is how to get test result reports (for both, chefspec and in another hand test kitchen) in a format that can be parsed by Jenkins (such as junit format).

like image 738
user2620348 Avatar asked May 08 '14 18:05

user2620348


1 Answers

You are confusing unit testing and integration testing. ChefSpec is a unit testing framework. It does not perform a real converge and runs everything in memory. Test Kitchen is an integration framework. It uses VMs to actually run Chef on a real machine.

They are different parts of your build. You don't run ChefSpec from Test Kitchen or visa versa.

As far as getting machine-parseable output from the ChefSpec report, that's on my list of things to do. I want something that is more flexible than just JSON though, and I would like users to be able to supply their own templates as well.

Sources:

  • I wrote ChefSpec
  • I'm on Test Kitchen core
like image 92
sethvargo Avatar answered Oct 21 '22 16:10

sethvargo