<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

    搜索

    積分與排名

    最新評論

    主站蜘蛛池模板: 亚洲中文字幕乱码AV波多JI| 亚洲精品国产免费| 亚洲av无码成人精品区一本二本| 国产人成免费视频网站| 亚洲精品在线网站| 成视频年人黄网站免费视频| 亚洲AV无码乱码麻豆精品国产| ww4545四虎永久免费地址| 亚洲国产成a人v在线| 国产啪精品视频网免费| 亚洲一卡一卡二新区无人区| 日韩成人在线免费视频| 少妇亚洲免费精品| 激情97综合亚洲色婷婷五| 一区二区三区无码视频免费福利| 亚洲国产精品一区二区久久| 亚洲网站在线免费观看| 亚洲日本成本人观看| 免费国产人做人视频在线观看| 黄色网址大全免费| 国产v亚洲v天堂无码网站| 18以下岁毛片在免费播放| 亚洲人成网站999久久久综合| 免费va人成视频网站全| 久久青青草原国产精品免费| 亚洲日产2021三区在线| 日韩免费视频网站| 久久久久久久99精品免费观看| 亚洲伊人久久大香线蕉| 免费大香伊蕉在人线国产| 免费无码又爽又刺激网站| 精品亚洲成a人片在线观看| 大香人蕉免费视频75| 久久精品无码免费不卡| 亚洲日本在线免费观看| 亚洲国产精品无码久久久久久曰| 久久亚洲免费视频| 国产精品久久久久久亚洲小说| 亚洲成AV人片在| 成人黄动漫画免费网站视频| 怡红院免费全部视频在线视频|