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

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

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

    J2EE之巔

     

    JBehave in practice

    ATDD (Acceptance Test Driven Development) is the extension of TDD, which helps us deliver exactly what the customer wants. Now ATDD has already been the hot spot in the software development world. There are several variations of ATDD including BDD, EDD and etc, also more and more frameworks have been created to help us develop with ATDD, for example  FIT and JBehave.
    The followings will introduce how to use the JBehave in your real project effectively.


     

    Figure 1 Test Code Structure

    Each test implementation could be divided into four layers, this structure could help us improve the codes reusability and maintainability, So, it will make us implement the tests quickly and easily.

    Specification/Scenario layer:

    This layer describes system’s behaviors and functionalities by the scenarios.  For using JBehave, we can use the natural language describe the scenarios and just need to follow the JBehave ‘Given-When-Then’ rule.

    Parser layer:

    We don’t need to implement this layer , this layer has been implemented by JBehave. What exactly JBehave do is to relate the steps of the scenario to the methods of the test codes.

    Step Logic Layer:

    The layer implements test logics associating with every step of the scenarios. Every step are implemented by a Java method.

    Action/Utils layer

    This the very important layer to improve the reusability of our codes. This layer provides the utility methods to help you implement step logics. These utility methods usually involved the system state checking, mock requests sending and so on.

    For example, we can provide the methods to check the data in database/file or check the state of the middleware, also so frameworks are very useful to implement the logic simulating the client browser’s requests.

     


    Chao Cai

    Working for Amazon.com

    chaocai2001@yahoo.com.cn

     

    posted on 2011-02-26 13:34 超越巔峰 閱讀(3284) 評論(0)  編輯  收藏 所屬分類: Java EE

    導航

    統計

    常用鏈接

    留言簿(12)

    隨筆分類(54)

    隨筆檔案(59)

    文章分類(2)

    文章檔案(1)

    相冊

    搜索

    積分與排名

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 国产男女爽爽爽爽爽免费视频| 国产成人aaa在线视频免费观看 | 亚洲国产精品无码久久久| 无码av免费毛片一区二区| 日韩成人精品日本亚洲| 亚洲精品卡2卡3卡4卡5卡区| 国产精品爱啪在线线免费观看| 美女羞羞视频免费网站| 亚洲麻豆精品果冻传媒| 老司机精品视频免费| 亚洲AV无码久久精品狠狠爱浪潮| 成人毛片18岁女人毛片免费看| 亚洲日韩在线观看免费视频| 亚洲国产精品一区二区久| 国产成人高清亚洲| 67194熟妇在线永久免费观看| 人人鲁免费播放视频人人香蕉| 亚洲成人网在线播放| 国产亚洲成归v人片在线观看| 水蜜桃视频在线观看免费| 78成人精品电影在线播放日韩精品电影一区亚洲 | 日韩精品视频在线观看免费| 亚洲精品亚洲人成在线观看麻豆| 亚洲国产a级视频| 免费99精品国产自在现线| 久久性生大片免费观看性| 亚洲成a人片在线观看精品| 又黄又爽又成人免费视频| 好男人资源在线WWW免费| 亚洲色精品三区二区一区| 亚洲人成电影福利在线播放| 亚洲av无码天堂一区二区三区 | 色费女人18女人毛片免费视频| 亚洲高清视频在线播放| 精品亚洲综合在线第一区| 免费无码又爽又高潮视频 | 中国人xxxxx69免费视频| 中文字幕视频在线免费观看| 羞羞网站免费观看| 中文字幕精品三区无码亚洲| 亚洲精品福利在线观看|