<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    J2EE之巔

     

    TDD Tips

    How to design the testable software? You may always find some best practices about designing for scalable, extensible or maintainable. To be testable, the best way should be TDD. Followings are some tips from my real practices on TDD.

    1 TDD is design process; it let you design for testing, naturally

    Write the test firstly, it does not only help you find the bugs; but the most important point is to let you design for test naturally.

    Also you should keep in mind, tests not only help you find bugs, but also protect your codes; when some changes impact on your existing codes, the tests will be broken.

     

    2 Keep the implementation simple

    Keep your implementation simple, just let the test pass. The complex implementation may introduce the logics or codes not covered by the tests, even leads some codes not testable.

     

    3 TDD in each scope.

    You may get to know the concept ATDD (acceptance test driven development). TDD could be used in every phase of the development and by the different granularity.

    To ATDD, you could consider on using some existing framework such as FIT, these frameworks will be bridge between business logic and implementation logic.

    Recently, the concept BDD (behavior driven development) is introduced to the ATDD process, so the BDD frameworks such as JBehave is also the good choice.

     


    Different TDD process could be nested and should be nested don’t let your step too large.

     

    4 keep each step small enough

    Always keep each step small to avoid introducing the untestable codes or logics and pass each test quickly.

     

     

    6 Always refactor

    This step is always overlooked in TDD process; however it is the very important step. Also, never forget refactor should involve all your tests.

     

    Why can't write test firstly?

     1.not think how to meature the codes

    2. The current step maybe too large, should separate into small ones

    3. The codes with ugly dependencies


     http://blog.csdn.net/chaocai2004/archive/2011/01/09/6125479.aspx


    Chao Cai (蔡超)

    Sr. SDE

    Amazon.com

     

    posted on 2011-01-09 16:55 超越巔峰 閱讀(3420) 評論(1)  編輯  收藏 所屬分類: Computer Science

    評論

    # re: TDD Tips 2011-01-12 13:37 xylz

    難得見你上來露個臉  回復(fù)  更多評論   


    只有注冊用戶登錄后才能發(fā)表評論。


    網(wǎng)站導(dǎo)航:
     

    導(dǎo)航

    統(tǒng)計(jì)

    常用鏈接

    留言簿(12)

    隨筆分類(54)

    隨筆檔案(59)

    文章分類(2)

    文章檔案(1)

    相冊

    搜索

    積分與排名

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 久久亚洲色一区二区三区| 国产精品无码素人福利免费| 国产成人A亚洲精V品无码| 成人奭片免费观看| 亚洲综合亚洲综合网成人| 久久精品亚洲视频| 亚洲一区二区三区高清视频| 日本免费人成在线网站| 亚洲无圣光一区二区| 国产成人精品久久免费动漫 | 免费**毛片在线播放直播| 精品久久久久久亚洲| 亚洲日产无码中文字幕| 亚洲一级毛片中文字幕| 日韩不卡免费视频| 色五月五月丁香亚洲综合网| 日韩免费的视频在线观看香蕉| 久久亚洲综合色一区二区三区| 精品熟女少妇av免费久久| 久久乐国产精品亚洲综合| 怡红院免费的全部视频| 亚洲五月激情综合图片区| 免费夜色污私人影院网站电影| 日韩精品福利片午夜免费观着| 亚洲国产成人久久一区二区三区| 国产成人免费在线| 亚洲人成色在线观看| 亚洲国产精品自产在线播放| 水蜜桃视频在线观看免费播放高清 | MM1313亚洲精品无码久久| 亚洲人成无码久久电影网站| 无码精品国产一区二区三区免费| 亚洲无砖砖区免费| www.亚洲精品| 亚洲男同gay片| 一本色道久久综合亚洲精品高清 | 在线观看免费大黄网站| 成人妇女免费播放久久久| 免费国产在线观看| 久久国产精品成人免费| 日本亚洲成高清一区二区三区|