<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

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


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


    網站導航:
     

    導航

    統計

    常用鏈接

    留言簿(12)

    隨筆分類(54)

    隨筆檔案(59)

    文章分類(2)

    文章檔案(1)

    相冊

    搜索

    積分與排名

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 最近中文字幕电影大全免费版| 一级做a爰片久久毛片免费陪| 久久99毛片免费观看不卡| 亚洲毛片av日韩av无码| 视频一区在线免费观看| 四虎国产精品免费久久影院| 欧洲亚洲综合一区二区三区 | 国产精品无码亚洲精品2021| 毛片免费观看视频| 亚洲av日韩av永久在线观看| 免费一级国产生活片| 又粗又长又爽又长黄免费视频| 久久精品国产亚洲Aⅴ香蕉| 国产久爱免费精品视频 | 亚洲日本中文字幕| 波多野结衣免费在线观看| 国产成人精品亚洲2020| 国产传媒在线观看视频免费观看 | 夜夜亚洲天天久久| 国产桃色在线成免费视频| 日韩亚洲国产综合高清| 免费国产在线观看老王影院| 亚欧国产一级在线免费| 亚洲人成网站在线播放影院在线| 免费观看激色视频网站bd| 亚洲AV无码AV吞精久久| 欧洲亚洲国产清在高| 免费A级毛片无码无遮挡内射| 亚洲1区2区3区精华液| 亚洲乳大丰满中文字幕| 久草视频在线免费| 免费在线观看亚洲| 亚洲AV无码精品色午夜果冻不卡| 久久午夜免费视频| 亚洲免费日韩无码系列| 亚洲制服丝袜一区二区三区| 四虎影库久免费视频| 蜜桃成人无码区免费视频网站| 亚洲日本乱码卡2卡3卡新区| 区久久AAA片69亚洲| 成人免费无码大片A毛片抽搐|