<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 超越巔峰 閱讀(3428) 評論(1)  編輯  收藏 所屬分類: Computer Science

    評論

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

    難得見你上來露個臉  回復  更多評論   


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


    網(wǎng)站導航:
     

    導航

    統(tǒng)計

    常用鏈接

    留言簿(12)

    隨筆分類(54)

    隨筆檔案(59)

    文章分類(2)

    文章檔案(1)

    相冊

    搜索

    積分與排名

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 精品亚洲永久免费精品| 日韩毛片无码永久免费看| 亚洲中文字幕不卡无码| 野花香在线视频免费观看大全 | 亚洲AV无码乱码在线观看富二代 | 亚洲s码欧洲m码吹潮| 久久久久国色AV免费观看性色| 亚洲国产综合在线| 久久不见久久见免费影院| 亚洲一线产区二线产区区| 国产免费av一区二区三区| 产传媒61国产免费| 亚洲精品亚洲人成在线观看| 国产免费无码一区二区| 337p日本欧洲亚洲大胆精品555588 | 免费视频精品一区二区三区| 亚洲av中文无码乱人伦在线r▽| 国产成人免费视频| 亚洲国产精品线观看不卡| 成人A级毛片免费观看AV网站| 久久精品国产亚洲av品善| www国产亚洲精品久久久| 性生大片视频免费观看一级 | 亚洲国产中文v高清在线观看| h视频在线免费观看| 成人免费无码大片a毛片| 亚洲爆乳精品无码一区二区| 免费一级肉体全黄毛片| 中国毛片免费观看| 亚洲精品NV久久久久久久久久| 国产免费黄色无码视频| 久久久亚洲欧洲日产国码aⅴ| 毛片免费视频播放| 国产大片免费天天看| 亚洲一区二区三区高清| 四虎影院免费在线播放| 亚洲国产精品第一区二区| 成人免费视频77777| 日韩毛片在线免费观看| 亚洲美女一区二区三区| 国产一区二区三区在线观看免费 |