Recommended thing for a TDD newbie -
I am very new to the TDD world. I have some questions about TDD.
-
Do I have to test in TDD? I have heard that TDD is not about testing. It's about design, I agree that testing is best, but what do I want to know if it is still TDD if we follow the trial-final approach?
-
Would we like to use BDD on TDD? I used to first list the details of my work and I tried to write a test case based on my specification. Is this the wrong way? Do you like using BDD or TDD for your development?
-
Fun? Some people from my team used to say that they keep TDD in mind. But they do not follow the pre-trial approach, they do not duplicate the data. Do we have to duplicate the data in TDD?
-
"Use the mock library" vs "Creating mock class with data manually" Do you want to use fake libraries or make fake classes with some fake data Are you
-
Any recommended book for TDD or BDD? I read the classic test-induced development of Kent Beck - by example I found that this book is published in very early stages of TDD, so some things in this book are not old enough.
1). Do I have to test in TDD? I have heard that TDD is not about testing. This is about the design. I agree that testing is the best but I have to know whether it is still TDD if we follow the trial-final approach?
Yes! Strictly speaking TDD is test-induced development. Then the development is conducted by the test. So first you test, then develop the program to pass all the tests.
2). Would we like to use BDD on TDD? I used to first list the details of my work and I tried to write a test case based on my specification. Is this the wrong way? Do you like using BDD or TDD for your development?
I think you should balance them. Firstly, use other techniques to provide overall design, which provide the best time (manage risks to find the appropriate time to spend on designing) (find a paper about "". There is a great idea about the balance of the tightness). Identify the most important parts then the exam is prepared and the exam passes.
3) Mocking? Some people from my team used to say that they keep TDD in mind. But they do not follow the pre-trial approach, they do not duplicate the data. Do we have to duplicate the data in TDD?
Test-first and joke are not the same thing. Allows the mocking code to be more testable as well as testable when the second part (which is based on this code) does not exist. So if there is no such dependency (if !!), then you can not duplicate them. (Read about the seam point for more information).
4) "Use of mock library" vs. "Manually making duplicate class with data". Do you want to use fake libraries or make fake classes with some fake data?
I think it's just like using someone else's library or building your own house. Completely depends on the situation and many factors. For example, if you have a large project and you can find the appropriate mock library, use it.
5). Any recommended book for TDD or BDD? I read the classic test-induced development of Kent Beck - by example I found that this book is published in the early stages of TDD, so some things in this book are not a little old.
There is a list in it.
Hope this helps.
Comments
Post a Comment