<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)論排行榜

    主站蜘蛛池模板: 成人免费乱码大片A毛片| 91香焦国产线观看看免费| 亚洲一区二区三区AV无码| 国产午夜免费秋霞影院| 一区二区三区免费看| 久久亚洲综合色一区二区三区 | 亚洲一区二区三区深夜天堂| 日本v片免费一区二区三区| 黄色网址免费在线观看| 亚洲熟妇av一区| a级男女仿爱免费视频| 亚洲不卡视频在线观看| 亚洲国产成人影院播放| 色老头永久免费网站| 成人免费观看男女羞羞视频| 亚洲黄色免费在线观看| mm1313亚洲精品国产| 在线观看成人免费视频不卡| 精品国产福利尤物免费| 亚洲高清一区二区三区| 亚洲国产成人一区二区三区| 成年人在线免费看视频| 色欲国产麻豆一精品一AV一免费| 丰满亚洲大尺度无码无码专线| 久久精品国产99精品国产亚洲性色| 99久久婷婷免费国产综合精品| 亚洲欧美日韩中文二区| 亚洲成av人片天堂网| 四虎永久精品免费观看| 国产在线jyzzjyzz免费麻豆| 三根一起会坏掉的好痛免费三级全黄的视频在线观看| 91亚洲国产成人久久精品网站| 亚洲中文字幕视频国产| 免费观看大片毛片| 青青视频观看免费99| 久久精品免费电影| 黄 色一级 成 人网站免费| 最新亚洲人成无码网站| 33333在线亚洲| 免费人成视网站在线观看不卡| 免费不卡视频一卡二卡|