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

    評論

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

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


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


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

    導(dǎo)航

    統(tǒng)計

    常用鏈接

    留言簿(12)

    隨筆分類(54)

    隨筆檔案(59)

    文章分類(2)

    文章檔案(1)

    相冊

    搜索

    積分與排名

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 69影院毛片免费观看视频在线| 免费大片黄在线观看| 嫩草在线视频www免费观看| 亚洲伊人久久综合中文成人网| 亚洲男同gay片| 日本一区二区三区日本免费| 亚洲色成人网站WWW永久四虎| 久久久久免费看黄A片APP| 亚洲精品中文字幕无乱码麻豆| 毛片a级毛片免费观看免下载| 亚洲情A成黄在线观看动漫软件| 在线a毛片免费视频观看| 亚洲爆乳成av人在线视菜奈实| 免费观看的av毛片的网站| 污网站免费在线观看| 亚洲日韩在线观看| 波多野结衣免费一区视频| 亚洲精品自在线拍| 成人毛片视频免费网站观看| 亚洲1区2区3区精华液| 亚洲国产精品人人做人人爱| 伊人久久大香线蕉免费视频| 亚洲第一香蕉视频| 免费黄色网址入口| 久久精品免费网站网| 亚洲精品美女久久久久9999| 免费看少妇作爱视频| 精品国产污污免费网站入口在线| 亚洲成av人在线视| 四虎国产精品免费久久| 日本永久免费a∨在线视频 | 免费看美女被靠到爽的视频| 一级毛片免费视频网站| 亚洲成熟xxxxx电影| 日韩在线免费看网站| h视频在线观看免费| 亚洲国产综合精品| 亚洲欧洲一区二区三区| 亚洲一区二区三区免费观看| 美女的胸又黄又www网站免费| 亚洲精品成人片在线观看精品字幕 |