<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    gr8vyguy@Blogjava

    Automated Unit Test

    The TDD cycle looks like this:

    1. Write a test for the next bit of functionality you have in mind. The test should succeed only when the functionality has been implemented correctly.

    2. Make the test compile by creating stubs for all the missing classes and methods referenced by the test.

    3. Run the test. It should fail.

    4. Implement just enough functionality to get the test to succeed.

    5. Clean up the implementation as much as possible, typically by removing duplication.

    這里最難的是第一點(diǎn)的第二句,"只有正確的程序才能通過(guò)測(cè)試"。 這幾乎是不可能的,即使可能,所耗的時(shí)間也不亞于編寫代碼的時(shí)間. 第四點(diǎn)的提法更有問(wèn)題,程序員在編程實(shí)現(xiàn)功能的時(shí)候應(yīng)該把注意力集中在所實(shí)現(xiàn)的代碼,而不是測(cè)試上。

    The Test/Code Cycle in XP

    • Write one test.
    • Compile the test. It should fail, as you haven't implemented anything yet.
    • Implement just enough to compile. (Refactor first if necessary.)
    • Run the test and see it fail.
    • Implement just enough to make the test pass.
    • Run the test and see it pass.
    • Refactor for clarity and "once and only once".
    • Repeat from the top.


     

    posted on 2007-04-21 23:33 gr8vyguy 閱讀(470) 評(píng)論(0)  編輯  收藏 所屬分類: Java

    <2007年4月>
    25262728293031
    1234567
    891011121314
    15161718192021
    22232425262728
    293012345

    導(dǎo)航

    統(tǒng)計(jì)

    公告

  • 轉(zhuǎn)載請(qǐng)注明出處.
  • msn: gr8vyguy at live.com
  • 常用鏈接

    留言簿(9)

    隨筆分類(68)

    隨筆檔案(80)

    文章分類(1)

    My Open Source Projects

    搜索

    積分與排名

    最新評(píng)論

    主站蜘蛛池模板: 亚洲人av高清无码| 亚洲av午夜精品无码专区| 麻豆69堂免费视频| 四虎成人精品在永久免费| 亚洲av最新在线观看网址| 日韩在线免费电影| 真正全免费视频a毛片| 亚洲AV无码乱码精品国产| 在线看亚洲十八禁网站| 亚洲Av无码国产情品久久 | 亚洲午夜在线一区| 国产2021精品视频免费播放| 亚洲国产日产无码精品| 青苹果乐园免费高清在线| 亚洲中文无码永久免| 国产又黄又爽又刺激的免费网址| 在线观看亚洲电影| 亚洲人成网77777亚洲色| 鲁丝片一区二区三区免费| 精品亚洲成a人片在线观看| 97在线观看永久免费视频| 久久久久亚洲国产AV麻豆| 亚洲黄黄黄网站在线观看| 免费人成激情视频在线观看冫| 99久久精品国产亚洲| 一个人免费高清在线观看| 极品美女一级毛片免费| 亚洲国产成人久久综合碰碰动漫3d | 亚洲AV成人片无码网站| 亚洲免费无码在线| 日日麻批免费40分钟无码| 亚洲精品无码久久久久YW| a级亚洲片精品久久久久久久| 久久免费的精品国产V∧| 亚洲精品一卡2卡3卡四卡乱码| 国产91精品一区二区麻豆亚洲| 色欲国产麻豆一精品一AV一免费 | 久久久婷婷五月亚洲97号色| 在线精品免费视频| 在线成人精品国产区免费| 亚洲av乱码一区二区三区|