<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) 評(píng)論(0)  編輯  收藏 所屬分類(lèi): Java EE

    導(dǎo)航

    統(tǒng)計(jì)

    常用鏈接

    留言簿(12)

    隨筆分類(lèi)(54)

    隨筆檔案(59)

    文章分類(lèi)(2)

    文章檔案(1)

    相冊(cè)

    搜索

    積分與排名

    最新評(píng)論

    閱讀排行榜

    評(píng)論排行榜

    主站蜘蛛池模板: 69视频在线观看免费| 国产青草视频免费观看97| 天天影院成人免费观看| 永久免费bbbbbb视频| 亚洲色婷婷六月亚洲婷婷6月| 国产精品亚洲综合久久| 岛国岛国免费V片在线观看| 免费人成在线视频| 亚洲嫩模在线观看| 一级毛片免费播放视频| 性色av免费观看| 久久亚洲精品成人AV| jizz日本免费| 免费观看美女裸体网站| 色噜噜噜噜亚洲第一| 毛片a级毛片免费播放下载| 亚洲尹人九九大色香蕉网站| 亚洲w码欧洲s码免费| 亚洲va久久久久| 国产高清免费观看| 97国免费在线视频| 亚洲人成国产精品无码| 99亚洲乱人伦aⅴ精品| 亚洲?V乱码久久精品蜜桃| 中文字幕亚洲男人的天堂网络| 久久精品毛片免费观看| 亚洲入口无毒网址你懂的| 国产成人在线免费观看| 久久久久久噜噜精品免费直播 | 2022中文字字幕久亚洲| 最新亚洲人成无码网www电影| 亚洲电影日韩精品| 真正全免费视频a毛片| 国产猛烈高潮尖叫视频免费| 一级午夜a毛片免费视频| 亚洲AV无码欧洲AV无码网站| 久久er国产精品免费观看2| 亚洲AV无码久久精品蜜桃| 日韩精品福利片午夜免费观着| 人禽伦免费交视频播放| AV在线播放日韩亚洲欧|