Test driven sounds like a good idea, but it is very hard to get used to it. When we get an idea, we could not help to realize it. We often forget to find out a way to prove what we're going to do is right. Even Nate sometimes forgets. So he often asks us don't hesitate to kick him when he forgets to write a test before writing any production code. It's not good to see a test always passes, Nate always says, that means what we do makes no difference. Every time we have to see a test fails before writing any code. So that it is our code that makes that test pass. That is test driven: writing code against a failing test.
Ruby on Rails provides so many facilities and tools to practice test driven development. There're different types of tests: unit test, functional test, acceptance test. There is a strong belief amongst Agile practitioners that every thing could be tested. So they develop lots of tools to do this. From user interface to database, there are tools to test them.
没有评论:
发表评论