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

    導航

    統計

    常用鏈接

    留言簿(12)

    隨筆分類(54)

    隨筆檔案(59)

    文章分類(2)

    文章檔案(1)

    相冊

    搜索

    積分與排名

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 亚洲日本VA午夜在线影院| 中文字幕亚洲免费无线观看日本| 国产一区二区三区免费观在线| 日韩精品视频在线观看免费| 久久精品无码一区二区三区免费| 又粗又大又硬又爽的免费视频| 在线观看亚洲天天一三视| 免费国产在线精品一区| 亚洲国产精品第一区二区三区| 亚洲国产精品特色大片观看完整版| 亚洲黄网在线观看| 永久免费av无码入口国语片| 亚洲高清国产拍精品26U| 两个人看的www高清免费观看| 成人毛片免费观看视频大全| 亚洲国产成人91精品| 最近最新中文字幕完整版免费高清| 亚洲熟妇av一区二区三区| 中国好声音第二季免费播放| 亚洲欧洲日韩国产综合在线二区| 日亚毛片免费乱码不卡一区| 国产成人精品日本亚洲专区61| 国产成人精品日本亚洲18图| 日韩精品无码区免费专区| 亚洲熟妇丰满xxxxx| 你懂的免费在线观看网站| 亚洲精品日韩专区silk| 最新猫咪www免费人成| 免费一级特黄特色大片| 久久精品国产亚洲夜色AV网站| 色吊丝免费观看网站| 亚洲精品高清国产一线久久| 人妻无码久久一区二区三区免费 | 国内免费高清在线观看| 国产精品亚洲精品久久精品 | 国产免费131美女视频| 国产精品成人69XXX免费视频| 久久这里只有精品国产免费10| 亚洲国产精品成人精品无码区 | 成年免费大片黄在线观看com| 免费下载成人电影|