On Sat, Apr 18, 2009 at 10:12 AM, Ram <[email protected]> wrote: > > @Andrew, >>Cucumber is not just for client documentation but does end-to-end or >>full-stack testing which is useful for getting >>as-close-as-the-client-experience testing > > That is actually a good point. But when do I start writing full stack > tests? or integration and functional tests too for that matter? > > Does one always start writing tests with unit tests and work through > functional, integration and then full-stack-tests? Isnt that like > going from backend to frontend? Would that be the right approach for > ANY kind of application? Even if its largely user centric and has got > very little magic going on in the models? >
Start writing integration tests immediately as the first step, then work down to view, controller and then unit tests You want to first cover the expectation and then drill down into the implementation detail. I found that when writing Cucumber scenarios on an existing project, it clarified my thinking around how I already expected features to work If I was only able to write one kind of test, it would be integration or full-stack tests. The rest of the tests are great because they document how you want various functionality to work at a technical level but the core of an app is to get it used (and working) for a customer and that is what the integration test covers Andrew Timberlake http://ramblingsonrails.com http://www.linkedin.com/in/andrewtimberlake "I have never let my schooling interfere with my education" - Mark Twain --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

