Brian Mcardle wrote: > I'm still a relative newbie to RoR, but I'm finding it a very powerful > tool. We have a couple of RoR applications up and in production, and > we're making good use of the automatic testing to make sure they're bug > free. > > What I would like to do is to test using the MySQL data our users have > entered. Either using that data to create fixtures, or copying the > production db into the test db on every test run. With the test db > recreated on every run, obviously a standard outside dump won't work. > > This would be a far more comprehensive test than the few fixtures we've > manually created. Is there an easy way to do this?
Personally, I disagree with this assessment. If you're finding problems with the data users are entering you've already failed them, and possibly lost their business. I believe that it is our responsibility, as developers, to consider all possible conditions that could make something fail. Obviously this is an impossible task. There will be some edge cases that get overlooked. The reason I disagree with your proposed approach is that it could very easily lead to developer complacency. Plan for zero failures by writing examples to test every edge case you can imagine. Some will be missed, however, I would deal with these on a case-by-case basis by ensuring you back your testing with excellent failure notification. Also, plan for a comprehensive beta testing phase. For any notifications you receive, write an example to cover whatever was missed. If you fulfilled your part of the "contract" as a developer, by creating exhaustive tests, then these reports should be relatively rare by the time you go into production. If you still have a lot of failures in production, then you simply haven't done your job. P.S. This response is very much an opinion, and you know what opinions are often compared with. And, I really don't mean to be one. -- Posted via http://www.ruby-forum.com/. -- 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.

