I would like some debate that the following post has provoked me to ask some questions of my own devlopment process:
http://weblogs.asp.net/rosherove/archive/2008/09/20/goodbye-mocks-farewell-stubs.aspx
I get the impression that a lot of people in the community have been stating and reiterating that TDD, BDD, whatever is just fantastic and we should all do it and anybody who is not, is obviously doing something wrong.
I do practice TDD for the design merits but it has taken me a long time to get up to speed with it.
I made countless (and still do) mistakes at the start and the learning curve has been steep.
My first experience was that all the developers started with the best intentions but our initial tests were un-maintainable as they were affectively integration tests.
Using a mocking framework helped to write maintainable, fast running tests. but took a period of adjustment to get up to speed.
I do love the test first paradigm but I often wonder if I have actually got the return that my outlay warrants.
I use NHibernate and I rarely mock out ISession, ISessionFactory or ICriteria etc.
If I was after high code coverage (and I am not saying everyone is), I would have to mock out these for no other reason than to get high code coverage. I use layering to hide this code behind its own abstracted dependency.
What if I have a WCF or asmx proxy, then should I write tests just to keep my code coverage high (if you are a code coverage zealot)
A side effect of test first is you get unit tests to test your logic but if you are expecting unit tests to catch bugs and keep QA to a minimum then you are approaching the methodology wrong.
I also have a problem with new people coming onto the project who are inexperienced with TDD. They naturally write unmaintainable bad tests.
Maybe it is different where you are geographically but I struggle to find resource with the relevant skills. I find myself writing the tests or fixing the broken tests a lot.
TDD is a massive outlay and we should and I am questioning its return or how we could get a quicker return.
I agree refactoring does not make sense without TDD but what about the extra time involved in "getting things out the door".
dagda1@...
Win £3000 to spend on whatever you want at Uni! Click here to WIN!
http://weblogs.asp.net/rosherove/archive/2008/09/20/goodbye-mocks-farewell-stubs.aspx
I get the impression that a lot of people in the community have been stating and reiterating that TDD, BDD, whatever is just fantastic and we should all do it and anybody who is not, is obviously doing something wrong.
I do practice TDD for the design merits but it has taken me a long time to get up to speed with it.
I made countless (and still do) mistakes at the start and the learning curve has been steep.
My first experience was that all the developers started with the best intentions but our initial tests were un-maintainable as they were affectively integration tests.
Using a mocking framework helped to write maintainable, fast running tests. but took a period of adjustment to get up to speed.
I do love the test first paradigm but I often wonder if I have actually got the return that my outlay warrants.
I use NHibernate and I rarely mock out ISession, ISessionFactory or ICriteria etc.
If I was after high code coverage (and I am not saying everyone is), I would have to mock out these for no other reason than to get high code coverage. I use layering to hide this code behind its own abstracted dependency.
What if I have a WCF or asmx proxy, then should I write tests just to keep my code coverage high (if you are a code coverage zealot)
A side effect of test first is you get unit tests to test your logic but if you are expecting unit tests to catch bugs and keep QA to a minimum then you are approaching the methodology wrong.
I also have a problem with new people coming onto the project who are inexperienced with TDD. They naturally write unmaintainable bad tests.
Maybe it is different where you are geographically but I struggle to find resource with the relevant skills. I find myself writing the tests or fixing the broken tests a lot.
TDD is a massive outlay and we should and I am questioning its return or how we could get a quicker return.
I agree refactoring does not make sense without TDD but what about the extra time involved in "getting things out the door".
dagda1@...
Win £3000 to spend on whatever you want at Uni! Click here to WIN!