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

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

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

    導(dǎo)航

    統(tǒng)計(jì)

    公告

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

    留言簿(9)

    隨筆分類(68)

    隨筆檔案(80)

    文章分類(1)

    My Open Source Projects

    搜索

    積分與排名

    最新評論

    主站蜘蛛池模板: 久久亚洲AV无码精品色午夜| 免费v片在线观看品善网| 亚洲成色WWW久久网站| 一级毛片aa高清免费观看| 亚洲国产精品成人| 色吊丝性永久免费看码 | 国产成人精品久久免费动漫| 亚洲AV美女一区二区三区| 8x成人永久免费视频| 91亚洲自偷手机在线观看| 131美女爱做免费毛片| 亚洲av片不卡无码久久| 成人免费午夜无码视频| 亚洲精品av无码喷奶水糖心| 啊灬啊灬别停啊灬用力啊免费看| 精品一区二区三区无码免费直播| 亚洲国产婷婷香蕉久久久久久| 毛片基地看看成人免费| 亚洲福利在线观看| 欧美a级在线现免费观看| 国产亚洲精品美女久久久久久下载| 国产大片51精品免费观看| jyzzjyzz国产免费观看| 亚洲国产高清人在线| 免费电视剧在线观看| 免费一级全黄少妇性色生活片 | 在线观看肉片AV网站免费| 亚洲综合成人网在线观看| 好先生在线观看免费播放| 免费手机在线看片| 亚洲综合一区二区国产精品| 免费影院未满十八勿进网站| 亚洲av无码专区在线电影天堂| 中文字幕亚洲一区| 91九色精品国产免费| 青青草国产免费国产是公开| 亚洲五月激情综合图片区| 日本一道综合久久aⅴ免费| 国产成年无码久久久免费| 国内精品久久久久影院亚洲| 2048亚洲精品国产|