Bruce Jay Mack - iCIS Knowledge base and Collaboration WikiWiki
Welcome
Guest
, you are in:
<root>
iCIS
PTC
•
Login
Test Wiki
Navigation
¶
Main Page
Random Page
Create a new Page
All Pages
Categories
Navigation Paths
Administration
File Management
Create Account
Search the wiki
»
Back
Test Driven Development
Modified on 06/03/2013 23:58
by
Administrator
Categorized as
Test Type
'''What is test driven development?'''{br} Simple put,it is writing unit tests first then write the code that can pass the test. It was discovered by Kent Beck, a good friend of Ward Cunningham, so again we can go to [http://c2.com/|Wards Wiki] to see multiple points of view. It get's a bit technical at times and the bullet list below is an excerpt from [http://c2.com/cgi/wiki?TestDrivenDevelopment|Test Driven Development on Ward's Wiki].{br}{br} * Think about what you want to do. * Think about how to test it. * Write a small test. Think about the desired API. * Write just enough code to fail the test. * Run and watch the test fail. (The test-runner, if you're using something like JUnit, shows the "Red Bar"). Now you know that your test is going to be executed. * Write just enough code to pass the test (and pass all your previous tests). * Run and watch all of the tests pass. (The test-runner, if you're using JUnit, etc., shows the "Green Bar"). If it doesn't pass, you did something wrong, fix it now since it's got to be something you just wrote. * If you have any duplicate logic, or inexpressive code, refactor to remove duplication and increase expressiveness -- this includes reducing coupling and increasing cohesion. * Run the tests again, you should still have the Green Bar. If you get the Red Bar, then you made a mistake in your refactoring. Fix it now and re-run. * Repeat the steps above until you can't find any more tests that drive writing new code.{br}
Meta Keywords:
Meta Description:
Change Comment:
ScrewTurn Wiki
version 3.0.5.600. Some of the icons created by
FamFamFam
.