Here I am just sharing about my first experience with TDD approach, the writing is an opinon, if you have different, no issues, I would love to hear.
Prior to TDD approach to developing software application was like looking no backward, thinking positively while running on code marathon track. The confidence on application was solely dependent on developer’s manual testing. Later this confidence gets sealed by QA team testing.
TDD changes your thought process to good extent. It enables you to think or more specifically it demands you to think of test cases before writing your code. It asks you “what it should do” before you actually start doing it.
It seems to be good thing, you should start doing. Initially I found it difficult to adapt, as I was writing lot of code which did not direct contribute to output. I thought writing this code is redundent effort and it is not that worth. I also had problems is estimating the time required. And “which things to test” was a mind blocking question.
I started with writing unit tests for important functions in app, this gave me on ground knowledge of how to write tests, how to run them. I think this is least you can do to dive into TDD i.e. write unit tests for imp functions, execute them, have fun with them. But there is much more yet to do to adapt TDD.
I think one should not loose hope while begining into TDD style. Start small, which will give you idea of environment and it also introduce you to the thought process.
Few weeks after starting the TDD, we had requirement to change one of our core modules functionality. at this particular time already written tests helped me a lot to be ensured that everything is still working fine.
This was about how I have started into TDD approach. Concluding line I can draw from this is it takes patience and some effort to get familiar with it.
I have plans to write more when I will get good experience, but I think that will be more on technical side of things.