<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 超越巔峰 閱讀(3274) 評(píng)論(0)  編輯  收藏 所屬分類: Java EE

    導(dǎo)航

    統(tǒng)計(jì)

    常用鏈接

    留言簿(12)

    隨筆分類(54)

    隨筆檔案(59)

    文章分類(2)

    文章檔案(1)

    相冊(cè)

    搜索

    積分與排名

    最新評(píng)論

    閱讀排行榜

    評(píng)論排行榜

    主站蜘蛛池模板: 日本不卡免费新一二三区| 国产成人精品日本亚洲专一区| 在线免费一区二区| 久久国产乱子伦免费精品| 九九综合VA免费看| 亚洲aⅴ天堂av天堂无码麻豆| 久久精品亚洲一区二区三区浴池| 亚洲性日韩精品国产一区二区| 国产精品黄页在线播放免费| 国产va精品免费观看| 最近2018中文字幕免费视频 | 扒开双腿猛进入爽爽免费视频| 免费精品一区二区三区第35| 久久成人18免费网站| 特级一级毛片免费看| 亚洲国产成人久久一区二区三区 | 在线观看视频免费完整版| 精品免费人成视频app| 久久国产精品成人免费| 在线观看免费视频网站色| 精品国产污污免费网站入口在线| 日韩免费码中文在线观看| 亚洲av午夜国产精品无码中文字| 一本色道久久88—综合亚洲精品| 亚洲人成网站18禁止久久影院| 亚洲熟妇av一区| 亚洲一区二区三区国产精品无码| 亚洲性一级理论片在线观看| 亚洲精品不卡视频| 亚洲午夜精品一区二区公牛电影院| 亚洲精品不卡视频| 亚洲男人的天堂久久精品| 最新亚洲精品国偷自产在线| 亚洲一区AV无码少妇电影| 亚洲色成人四虎在线观看| 亚洲日韩AV一区二区三区四区| 亚洲欧美国产国产综合一区| 亚洲av成人中文无码专区| 日本高清免费中文在线看| xxxxxx日本处大片免费看 | 亚洲av日韩av不卡在线观看|