{"id":741,"date":"2011-07-12T13:08:48","date_gmt":"2011-07-12T17:08:48","guid":{"rendered":"https:\/\/2011.boston.wordcamp.org\/?p=741"},"modified":"2011-10-09T20:06:36","modified_gmt":"2011-10-10T00:06:36","slug":"behavior-driven-development-and-wordpress-plugins","status":"publish","type":"post","link":"https:\/\/boston.wordcamp.org\/2011\/behavior-driven-development-and-wordpress-plugins\/","title":{"rendered":"Behavior Driven Development and WordPress Plugins"},"content":{"rendered":"<p>In my day-to-day work at the <a href=\"http:\/\/cyber.law.harvard.edu\/\" rel=\"nofollow\">Berkman Center<\/a> I don&#8217;t have the luxury of working primarily in one language or framework &#8211; this is a blessing and a curse. \u00a0That&#8217;s not the point of this post, though.<\/p>\n<p>A specific blessing that fell out of the multi-language, multi-platform monstrosity that is my workload is a love of\u00a0<a href=\"http:\/\/cukes.info\" rel=\"nofollow\">Cucumber<\/a>, the excellent <a href=\"http:\/\/en.wikipedia.org\/wiki\/Behavior_Driven_Development\">Behavior Driven Development<\/a> testing framework gaining major traction in the ruby community.<\/p>\n<p>BDD is a client-centric &#8220;outside in&#8221; agile development methodology that emphasizes &#8220;Scenarios&#8221; that implement valuable business logic. Your scenarios might read something like:<\/p>\n<pre><code>Scenario: Activate the plugin without errors. Given a \"Deactivated\" plugin in the row with the id \"category-subscriptions\" And a logged in user of type \"administrator\" When I visit \"\/wp-admin\/plugins.php\" And I click \"Activate\" within the row with the id \"category-subscriptions\" Then I should see \"Plugin activated\"<\/code><\/pre>\n<p>That is an actual testing scenario that Cucumber can execute and run, using <a href=\"http:\/\/seleniumhq.org\" rel=\"nofollow\">Selenium<\/a> to drive a browser like Google Chrome or Firefox. Look at it! You can read it! You could probably run this by a client and they&#8217;d understand most of it.<\/p>\n<p>The promise of cucumber is that you&#8217;ll spend less time working on stuff that doesn&#8217;t actually provide specific business value to your clients, and end up with an app that provably does what it says on the can because your testing suite says so.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my day-to-day work at the Berkman Center I don&#8217;t have the luxury of working primarily in one language or framework &#8211; this is a blessing and a curse. \u00a0That&#8217;s not the point of this post, though. A specific blessing &hellip; <a href=\"https:\/\/boston.wordcamp.org\/2011\/behavior-driven-development-and-wordpress-plugins\/\">Continue reading <span class=\"screen-reader-text\">Behavior Driven Development and WordPress Plugins<\/span>  <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":7694169,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":""},"categories":[6846],"tags":[],"class_list":["post-741","post","type-post","status-publish","format-standard","hentry","category-speaker-feature"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1tTIn-bX","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/boston.wordcamp.org\/2011\/wp-json\/wp\/v2\/posts\/741","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/boston.wordcamp.org\/2011\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/boston.wordcamp.org\/2011\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/boston.wordcamp.org\/2011\/wp-json\/wp\/v2\/users\/7694169"}],"replies":[{"embeddable":true,"href":"https:\/\/boston.wordcamp.org\/2011\/wp-json\/wp\/v2\/comments?post=741"}],"version-history":[{"count":8,"href":"https:\/\/boston.wordcamp.org\/2011\/wp-json\/wp\/v2\/posts\/741\/revisions"}],"predecessor-version":[{"id":1579,"href":"https:\/\/boston.wordcamp.org\/2011\/wp-json\/wp\/v2\/posts\/741\/revisions\/1579"}],"wp:attachment":[{"href":"https:\/\/boston.wordcamp.org\/2011\/wp-json\/wp\/v2\/media?parent=741"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/boston.wordcamp.org\/2011\/wp-json\/wp\/v2\/categories?post=741"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/boston.wordcamp.org\/2011\/wp-json\/wp\/v2\/tags?post=741"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}