Being given so much unwanted opportunity of looking at bad, hurriedly written code recently, I can’t stop evangelising about unit tests. But don’t worry, today I’m going to write about something you problably haven’t seen yet. Behavior Driven Development.
- to maintain them properly they need to be perfectly clear about what they do -> each test should represent a functional scenario case and all tested scenario cases together should cover full functional domain
- the more detailed they get (and more complex actual functionality is) the less readable they become
- even if you have 100% unit test code coverage, your code should be accepted tested at the end (by your client’s people) - to sleep in a calm way you should be convinced that your unit tests cover business scenarios (as those are tested by end-users)
Just to make things a little bit more complex - BDD tools come in 2 flavors - "xBehave" and "xSpec". The best description of differences between those can be found here: http://stackoverflow.com/questions/307895/what-is-the-most-mature-bdd-framework-for-net