Testing…

by Mikael Henriksson 19. September 2009 13:37

I find myself drifting more and more towards something I believe is TDD. When I start with something new I go to my test project, write a test (spec) of what I want to accomplish and then try to produce code that tries to satisfy the spec (test).

I don’t care that much about what others say about patterns or whatever I just care about that things should work. It’s not like I can blame anyone except myself if I cause a stop in production. There for I like to follow some steps when I do testing.

  1. Simple unit tests
  2. Data verification tests
  3. Integration tests simulating a client
  4. Using a real client

If I get success on all these I don’t mind saying ooops if something goes wrong. Without knowing that my functions do what they are supposed to, that the data sanity is in check and that both simulation and real clients work as they should I don’t like to release things. Fortunately this is not very hard to achieve and even badly written, hard to use tests are much better than not testing at all and practice makes perfect :)

Tags:

Testing

blog comments powered by Disqus