This site is the archived OWASP Foundation Wiki and is no longer accepting Account Requests.
To view the new OWASP Foundation website, please visit https://owasp.org
Difference between revisions of "OWASP Secure TDD Project"
From OWASP
Lauren Tabak (talk | contribs) m |
Lauren Tabak (talk | contribs) m |
||
Line 15: | Line 15: | ||
− | + | '''About TDD''' | |
TDD is about writing a test which will fail, then writing the minimum amount of code required to make it run, then refactoring the code to make it clean. <br> This is done in cycles, fail -> pass -> refactor, adding a new test for each known requirement for the code.<br> | TDD is about writing a test which will fail, then writing the minimum amount of code required to make it run, then refactoring the code to make it clean. <br> This is done in cycles, fail -> pass -> refactor, adding a new test for each known requirement for the code.<br> | ||
Line 25: | Line 25: | ||
The tests tell you what to do, what to do next, when you are done. They tell you what the API is going to be, what the design is. <br> | The tests tell you what to do, what to do next, when you are done. They tell you what the API is going to be, what the design is. <br> | ||
− | The tests permit you to refactor safely, ensuring that the desired behavior continues to work while you adjust your design. The tests also guide you to testable code, promoting smaller methods, shorter parameter lists, and overall much simpler design than other methodologies lead you to. | + | The tests permit you to refactor safely, ensuring that the desired behavior continues to work while you adjust your design. The tests also guide you to testable code, promoting smaller methods, shorter parameter lists, and overall much simpler design than other methodologies lead you to.<br> |
+ | |||
'''Difference between TDD and Unit Tests''' | '''Difference between TDD and Unit Tests''' |
Revision as of 18:06, 12 March 2014