<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人中文字幕亚洲区| 亚洲AV无码专区在线观看成人 | 最刺激黄a大片免费网站| 亚洲AV无码专区在线播放中文| 国产乱子伦精品免费视频| 亚洲综合亚洲综合网成人| 高h视频在线免费观看| 亚洲高清免费视频| 一级大黄美女免费播放| 精品亚洲综合在线第一区| 毛片免费在线观看| 亚洲人成在线电影| 中文毛片无遮挡高潮免费| 亚洲中文字幕人成乱码| 性感美女视频免费网站午夜| 久久精品熟女亚洲av麻豆| 亚洲精品无码专区久久同性男| 99久久99这里只有免费的精品| 亚洲AV无码专区电影在线观看| 日日麻批免费40分钟日本的| 亚洲高清有码中文字| 在线观看91精品国产不卡免费| 成人精品综合免费视频| 亚洲国产精品无码久久SM| 亚洲香蕉免费有线视频| 亚洲人成网站在线播放2019| 亚洲精品高清一二区久久| av永久免费网站在线观看 | 久艹视频在线免费观看| 亚洲免费观看在线视频| 永久免费无码网站在线观看| 一边摸一边桶一边脱免费视频 | 亚洲一卡2卡3卡4卡5卡6卡| 国产gav成人免费播放视频| 成人免费av一区二区三区| 亚洲国产精品午夜电影| 免费v片视频在线观看视频| 成人无码WWW免费视频| 亚洲情A成黄在线观看动漫软件 | 亚洲高清无码专区视频|