On 20 Jul 2013, at 01:29, Graham Ashton <gra...@effectif.com> wrote:
> Can you elaborate on these ways? I'm genuinely interested in what it is that > people feel it gives 'em that they haven't already got from a decent story > and a good integration test. One benefit I get from Cucumber that I don't easily get from any other tool is that it makes it easier to express the tests in a way that's independent of the implementation. I'm now on my third re-implementation of some steps, where I haven't changed the wording of the Gherkin once. For my current side project (a simple online game), I started writing Gherkin scenarios directly against the domain model. When I'd got all the domain rules implemented to a satisfactory level, I introduced a "game client" abstraction into the steps, and implemented a client to exercise the exact same Gherkin against a JSON hypermedia API. When I'd got a full HTTP API working, I started the third implementation of the Cucumber client to drive a browser and play the game through a rich browser client written in CoffeeScript. This is where I'm at now. I did the implementation in this order because the design patterns I used for the domain model were what I saw as most unknown and most risky. I'm also building a lot of the infrastructure from scratch as another exercise (I'm not using Rails or Rack), so I didn't want to delay feedback on the domain model for want of a web server etc. Cucumber gives me a way to describe the app that lets me step out of the code and ask about the interactions I care about, then drop back down and express them in as many technical ways as I want. Especially as I'm working on my own on this, it's the next best thing I have to a pair. They are a specification for me, and they are my acceptance tests. But they are not inherently unit or integration (or functional, or whatever) tests: when I plug in my domain client, they are essentially unit tests; when I plug in my browser client, they are a full-stack end-to-end test. Given the amount of uncertainty in such an experimental project, I've found this freedom of thought completely invaluable. Ash -- http://www.patchspace.co.uk/ http://www.linkedin.com/in/ashmoran -- You received this message because you are subscribed to the Google Groups "NWRUG" group. To unsubscribe from this group and stop receiving emails from it, send an email to nwrug-members+unsubscr...@googlegroups.com. To post to this group, send email to nwrug-members@googlegroups.com. Visit this group at http://groups.google.com/group/nwrug-members. For more options, visit https://groups.google.com/groups/opt_out.