Sadek Drobi’s Blog

September 22, 2007

I always write tests before code, but I don’t do Test Driven Development

Filed under: Architecture, Domain Driven Design — Sadache @ 11:35 pm

I am not driven by tests, my code neither. Actually my code is rather driven by design. I do use a test first approach, but I use for a contract first discipline in order to test that my decoupling works. Yes, I think about decoupling first, and then I write tests. I design, and then I write tests. Of course I don’t take a lot of time in my design reflection. But I am not driven by any  force other than my experience and the context at hand. I do abstractions and I validate them with tests. Actually, I use test first approach to specify my design. I don’t write any piece of code without a failed test waiting for it, but still I prefer to call that a test-first approach than the confusing “test-driven development”!

More about this approach to testing in my newer post Design Driven Testing: Using tests as specifications of system’s invariants and contracts design

1 Comment »

  1. [...] I posted about the fact that I always write tests before code, but I don’t do Test Driven Development where I discussed the way I view testing. Yet I don’t guess I’ve been clear enough, so [...]

    Pingback by Sadek Drobi’s Blog » Draft: Design Driven Testing: Using tests as specifications of system’s invariants and contracts design — September 29, 2007 @ 4:44 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress