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

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

    導航

    統計

    公告

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

    留言簿(9)

    隨筆分類(68)

    隨筆檔案(80)

    文章分類(1)

    My Open Source Projects

    搜索

    積分與排名

    最新評論

    主站蜘蛛池模板: 久久不见久久见免费影院www日本| 亚洲乱色伦图片区小说| 国产免费人成视频尤勿视频 | 日韩免费无码一区二区三区| 亚洲人成色7777在线观看不卡| 亚洲AV无码专区在线厂| 国产一级高清视频免费看| 国产亚洲精品成人久久网站| 亚洲av无码不卡私人影院| 免费无码又爽又刺激网站直播| 久久久久亚洲av成人无码电影| 七次郎成人免费线路视频| 超清首页国产亚洲丝袜| 免费网站观看WWW在线观看| 久久亚洲精品成人| 四虎免费影院ww4164h| 亚洲熟妇无码AV| 免费播放春色aⅴ视频| 精品熟女少妇aⅴ免费久久| 亚洲AV无码不卡无码| a拍拍男女免费看全片| 国产成人亚洲综合一区| 免费大学生国产在线观看p| fc2成年免费共享视频18| 久久青青成人亚洲精品| 国产精品无码免费播放| 老湿机一区午夜精品免费福利| 亚洲日产韩国一二三四区| 日本zzzzwww大片免费| 蜜桃传媒一区二区亚洲AV| 亚洲亚洲人成综合网络| 中文字幕免费在线看线人| 老子影院午夜伦不卡亚洲| 亚洲成色WWW久久网站| 皇色在线视频免费网站| 尤物视频在线免费观看| 亚洲色偷偷av男人的天堂| 免费**毛片在线播放直播| 久久这里只精品99re免费| 亚洲国产成人无码AV在线| 亚洲大成色www永久网站|