Is it really reasonable to write tests at the early stage?

Viewed 100

I used to write the tests while developing my software, but I stopped it because I noticed that, almost always, the first api and structures I thought great turn out to be clumsy after some progress. I would need to rewrite the entire main program and the entire test every time.

I believe this situation is common in reality. So my questions are:

  • Is it really common to write tests at first, like so said in TDD? I'm just an amateur programmer so I don't know the real development world.
  • If so, do people rewrite the tests again (and again) when they revamp the software api/structure? (unless they're smart enough to think up the best one at first, unlike me.)
6 Answers
Related