swat integration tests for httpd cookbook #59
Conversation
Here is couple successful and none successful verify examples with swat:
|
Hi! Any news here? |
Apologies for not responding sooner. When I go to look up swat from the link you've included it doesn't have a lot of information. Can you provide more info about this test suite? It looks pretty interesting, I've just never used sparrow before. |
Hi Jennifer! Thanks for answer. Ok, to make it more clear
This pull request is like example where one can see how swat could be used as blackbox testing toll in cookbook development process ( chef / test kitchen ) Let me know if you need some more information .... PS or else ... we could talk somewhere in chef-dev irc channel ... |
Hi @iennae - any updates on this? Thanks 😄 |
I'm sorta 👎 on this... Not because its a horrible idea in principle, but because this cookbook desperately needs a high level of maintenance going forwards, and its needs to be kept simple enough and use common enough chef tooling that anyone familiar with the Chef ecosystem can use it. Pulling in a tool like swat now means that maintainers need to be familiar with that tool in order to contribute and maintain these tests after you've gone off and gotten interested in something else, which is a barrier to entry. Its not a bad idea to show off using swat tests in a cookbook, but I don't think its a particularly good idea to put them in this cookbook.... |
Thank you so much for taking the time to show swat in use. As @lamont-granquist mentioned, this is not the right cookbook to commit this work though. I think if you could create a sample cookbook that uses swat that would be really useful for you to add to the supermarket as an example of how to use swat. We try not to create additional requirements for folks to learn in order to contribute. Jennifer |
Hi @lamont-granquist ! It sounds like you miss my point at all. I am not going to use swat with this cookbook , idea is to use swat as integration tests tool for cookbook developing, could you you see the difference ? Well to talk about chef Eco system , I am not going to make a flame here , but what wrong with using other tools together with chef ? Like for example some officially maintained opscose cookbooks use a bash as integration test tool , so what ? :) |
Hi @iennae , I already did it, an example of usage of swat like black box testing tool in test kitchen infrastructure for httpd cookbook, no need to create another examples, please take a look more carefully at the code I am trying to merge. :-) I am not trying to force you or something , but before you close this request ( well you already did it ) , I am just trying to help you understand clearly what I am talking about. |
Sorry, probably I missed a context of your phrase, as I can see you mean "that this idea is not horrible ... or it is not horrible in principle?", Am I right? Just please clear what you meant. Anyway see my other remarks on your previous comment. Thanks |
I'm saying this is a great idea for something you should blog about and put in other cookbooks first. The point is that without swat being used to integration test other cookbooks and being widely used in the Chef ecosystem already, it is bad idea to introduce it into cookbooks like this first. If it does not catch on, then it makes this cookbook harder to maintain with a larger barrier to entry for any novice out there, which ultimately makes this cookbook worse. If we had lots of examples of swat-tested cookbooks already and had a userbase that expected to see such tests and already knew how to maintain them, then it would make sense. That does create a catch-22 since without getting it into core cookbooks it is difficult to get it spread widely, but if its a good idea it'll eventually catch on and happen. Right now though these examples don't offer anything over serverspec or inspec testing, and we've already got those two methodologies are trying to train up our userbase to switch from serverspec to inspec. Adding another framework that they need to know won't help them learn to maintain better cookbooks. |
This is a blog - http://blogs.perl.org/users/melezhik/2016/01/testing-chef-coobooks-using-swat-and-test-kitchen.html
I read about inspec. Inspec is good, and I definitely see why opscode moves toward it, but swat still add extra value in compassion with inspec. It is not obvious at all in a such trivial example as for the httpd cookbook test suite and probably such a comparison is beyond this issue , but believe me swat does some extra value, so if you interested - I will gladly share details with you.
Which cookbooks do I need to start with then? :-) Can't see why not start httpd with? I have chosen it because it relates to web server configuration / installation. Swat is web test specific tool, it could be a great fit ... The only reasons that I can understand that swat is not that convenient for chef eco system as inspec is. BTW I have not seen inspec tests for httpd cookbook yet ... |
Your swat functionality is not going to be added to this cookbook at this time.
While to you this may seem like the next logical step, as maintainers for this cookbook, we have to consider the costs and benefits to the whole community who depend on this cookbook to just work. This is too costly of an addition to this cookbook at this time. I encourage you to continue blogging about it, and getting additional support from the community. I also encourage you to create and release quality cookbooks to the community on the supermarket: supermarket.chef.io that include your testing framework. As support grows for your cookbooks, this will lead to additional use. Once you are not the SPOK on this project, and there is more exposure to the project we can revisit this issue. Thanks for your understanding. Jennifer |
@iennae , thanks for reply. Ok, I do see your points. Keep in an eye on swat though 😃 , chef is a great tool, but I believe that other good tools have to go together to make synergy. |
I have just created an integration tests for httpd cookbook using swat - DSL for rapid web tests development.
To run them: