<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.

    這里最難的是第一點的第二句,"只有正確的程序才能通過測試"。 這幾乎是不可能的,即使可能,所耗的時間也不亞于編寫代碼的時間. 第四點的提法更有問題,程序員在編程實現功能的時候應該把注意力集中在所實現的代碼,而不是測試上。

    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 閱讀(471) 評論(0)  編輯  收藏 所屬分類: Java

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

    導航

    統計

    公告

  • 轉載請注明出處.
  • msn: gr8vyguy at live.com
  • 常用鏈接

    留言簿(9)

    隨筆分類(68)

    隨筆檔案(80)

    文章分類(1)

    My Open Source Projects

    搜索

    積分與排名

    最新評論

    主站蜘蛛池模板: 久久亚洲国产伦理| 暖暖日本免费中文字幕| 99久久人妻精品免费二区| 亚洲一区二区三区免费| 国产成人亚洲综合a∨| 亚洲乱码国产一区三区| 野花香高清在线观看视频播放免费| 亚洲午夜无码AV毛片久久| 人妻无码一区二区三区免费| 亚洲乱码国产乱码精华| 亚洲性猛交XXXX| 免费无码又爽又刺激高潮| 久久精品免费观看| 亚洲乱色熟女一区二区三区蜜臀| 青青草原亚洲视频| 午夜私人影院免费体验区| 精品免费视在线观看| 午夜亚洲WWW湿好爽| 免费一级毛片不卡不收费| 特级精品毛片免费观看| 一本久久免费视频| 亚洲中文字幕一二三四区苍井空| 国产亚洲欧洲Aⅴ综合一区| 精品国产免费一区二区| 最近免费最新高清中文字幕韩国| 免费无码又爽又黄又刺激网站 | 久久精品国产亚洲香蕉| 最近2019中文字幕免费大全5| 最新亚洲人成无码网站| 亚洲人成电影在线观看青青| 亚洲国产精品特色大片观看完整版 | 四虎影视在线永久免费看黄 | 亚洲国产精品特色大片观看完整版| 免费网站看v片在线香蕉| 午夜无码A级毛片免费视频| 一区二区三区免费看| 亚洲av永久无码制服河南实里 | 久久亚洲AV成人无码软件| 亚洲精品亚洲人成在线观看下载| 国产一级淫片a免费播放口| 猫咪免费人成网站在线观看入口|