<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

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


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


    網站導航:
     

    導航

    統計

    常用鏈接

    留言簿(12)

    隨筆分類(54)

    隨筆檔案(59)

    文章分類(2)

    文章檔案(1)

    相冊

    搜索

    積分與排名

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 中文字幕亚洲无线码| 亚洲 另类 无码 在线| 911精品国产亚洲日本美国韩国 | 91制片厂制作传媒免费版樱花| 久久亚洲国产精品123区| gogo免费在线观看| 亚洲熟妇无码另类久久久| 成人无码a级毛片免费| 亚洲av福利无码无一区二区| 精品一区二区三区免费| 337p日本欧洲亚洲大胆艺术| 最近2018中文字幕免费视频| 亚洲乱码在线视频| 麻豆精品国产免费观看| 午夜成人无码福利免费视频| 久久亚洲中文字幕精品一区四| 日本高清不卡aⅴ免费网站| 亚洲另类激情综合偷自拍| 91麻豆最新在线人成免费观看| 亚洲 欧洲 视频 伦小说| 国产成人精品高清免费| 一级一级一片免费高清| 亚洲成在人天堂一区二区| 亚洲一级毛片免费看| 亚洲AV无码AV男人的天堂不卡 | 免费特级黄毛片在线成人观看| 视频一区二区三区免费观看| 亚洲一区二区三区在线视频| 久久久久国色av免费看| 亚洲日韩精品无码专区加勒比| 免费日韩在线视频| 少妇无码一区二区三区免费| 亚洲色成人网站WWW永久四虎 | 亚洲日本中文字幕天堂网| 四虎影视在线影院在线观看免费视频 | 日韩大片在线永久免费观看网站| 亚洲欧洲自拍拍偷午夜色无码| 免费v片在线观看视频网站| 美女被爆羞羞网站免费| 亚洲视频在线视频| 波多野结衣视频在线免费观看 |