In TDD, every body talks about creation of unit tests and how development is done. I know whole cycle but no body talks about the creation of these unit tests from requirements?
I have read somewhere in the literature that it is always good to create a test-list before developing these unit tests. My question is:
What exactly the procedure (steps) being followed before writing unit tests in TDD? means that whether the Unit tests are written directly from the requirements without using any formal standard or test-lists are created before developing them?
In TDD, every body talks about creation of unit tests and how development is
Share
The test list only is a temporary repository for the next test cases. It is totally informal.
The main role of the test-list is here to free your mind. When you think about a new test, just write it down at the end of your list, then you can and forget it, and focus on the problem at hand.
There is no procedure to write the tests and the list, it’s just as when you create an UML model from the requirements. You think about the problem and produce a design. Once the design is complete, you start the implementation. With TDD, you think about the problem from a testing perspective, you write down some tests on the list and you start with the simpler test in the list. You can add (or remove) a test to the list at any time.
The bowling game episode is a short read that illustrates the transition from requirements to unit tests. It does not mention any test-list though.
I maintain my test-list as comments at the bottom of my unit tests source file.