Tim,
On 6/1/12 12:54 PM, Tim Walker wrote:
> We are on a journey to find the best way to develop software. I've been
> at it since 1976 and like The Big Muddy, the way we do it just keeps
> moving along. Executable Specification is a concept that I personally
> believe strongly in: there is no reason for there to be a difference
> between a requirement and a test that proves it. Further, I feel, it is
> the very salvation for agile and lean software development.
>
> Cargo cult? Maybe, but certainly not for me. I developed and delivered
> the class "Executable Requirements with FitNesse: to many, many teams
> small and very large. It was while teaching a class in North Carolina
> that the architect asked me if I'd seen what the Ruby on Rails guys were
> doing (the state of the art in FitNesse was the Domain Fixture) with
> Story Runner. I was very intrigued by the thought: *What if you could
> simply execute a User Story directly?* In terms of "maximizing the
> amount of work not done", this is huge: No duplicated or out of date
> requirements, tests, documentation and code (to say nothing of
> specificity of examples, know requirements are met - and stay met). I
> wanted this badly: so, I learned Ruby on Rails, went to the pragmatic
> camps, developed some apps and learned the pedigree of Cucumber, FIT,
> JBehave, RBehave, Story Runner. A long history of excellence.
>
> Then, four years ago or so I decided to leave education and coaching on
> the opportunity to apply BDD to a greenfield, mission critical,
> application. I've lived, breathed and suffered the worst of it using
> Cucumber. It's been /extremely/ hard and has taken a long time but, when
> we see some problem, like a business rule that is not documented, a
> mis-understood requirement, managing manual testing with automated
> testing, defining precise acceptance and many, many other things too
> numerous to name the answer is always "this is solved by Cucumber, we
> just need to do it better". So the BA's and product owners ARE getting
> up to speed on Gherkin and Cucumber. Manual testers ARE generating test
> cases in Cucumber and no longer in a separate system. Test cases that
> are checked right in along with the code that it tests.
>
> Something that this article completely fails to mention is the use of
> Cucumber for non-capybara based acceptance testing. Capybara is just one
> part: Testing through the UI. Keeping in mind the testing pyramid, and
> how *vital* it is to understand: *you do not want most of you business
> rules tested through the UI!* I feel this article missed that pretty
> important and basic point.
>
> Saying that Gherkin is just comments is baffling to me and seems to
> ignore completely the power inherent in the approaches and the speed and
> accuracy we get by the reuse of tested steps, especially around building
> up of a known state. Stating that Gherkin is "executable comments" would
> be closer. Still makes no sense. Comments go out of date when the code
> changes. A class of problem removed by Gherkin.
>
> We can (and should) use Rspec (keeping in mind that there are RSpec
> haters too!), and we should, but that is a developer facing language and
> does not serve the needs of testing in Quadrant 2 and best used as part
> of the outside in approach.As a way of /driving that last point home/
> I'll offer only this link:
>
https://www.relishapp.com/rspec/rspec-mocks/docs Please do read between
> the lines.
>
> I could go on and on like this, mostly about critical and subtle points
> and second-orders the author just seems to ignore. For example, I am a
> huge fan of Eric Evans and managing complexity in our projects by
> addressing a consistency or our domain and the language that expresses
> it and feel Cucumber tackles that head on. I do not understand why
> comments in Capybara are better for testing in quadrant 2 or why this is
> preferable to Gherkin for a product owner or business analyst? Just
> makes no sense.
>
> About the only thing I agree with the author on is that this is hard and
> that developers balk at ATDD driven by Cucumber or FIT but, as I have
> seen over and over and over, this is only because (in my opinion) they
> have not broken through to that place where the lights go on and not
> seeing the benefits to people outside of development.
>
> Just my opinion.
What a great post! This should be published somewhere.
- George
--
----------------------------------------------------------------------
* George Dinwiddie *
http://blog.gdinwiddie.com
Software Development
http://www.idiacomputing.com
Consultant and Coach
http://www.agilemaryland.org
----------------------------------------------------------------------