<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)

    相冊

    搜索

    積分與排名

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 免费电影在线观看网站| 免费在线观看亚洲| 亚洲日韩一区精品射精| 亚洲精品国产高清嫩草影院| 热99RE久久精品这里都是精品免费| 亚洲天堂一区二区| 国产一级做a爱免费视频| a在线观看免费网址大全| 亚洲一卡2卡三卡4卡无卡下载| 亚洲色偷偷狠狠综合网| 嫖丰满老熟妇AAAA片免费看| 国产免费一区二区三区免费视频| 666精品国产精品亚洲| 免费精品国产自产拍观看| 最近免费最新高清中文字幕韩国| 亚洲av无码一区二区三区在线播放| 国产亚洲人成A在线V网站| 成年免费大片黄在线观看岛国| 成年大片免费视频播放一级| 亚洲综合一区二区精品久久| 亚洲国产精品激情在线观看| 免费观看国产网址你懂的| 久久久WWW成人免费精品| 亚洲欧洲AV无码专区| 亚洲色四在线视频观看| 亚洲国产成人VA在线观看| 无码永久免费AV网站| 在线观看肉片AV网站免费| 青青视频免费在线| youjizz亚洲| 97久久精品亚洲中文字幕无码| 亚洲情a成黄在线观看| 日本免费人成黄页在线观看视频| 99久久国产免费-99久久国产免费| 亚洲av日韩av永久无码电影| 亚洲婷婷综合色高清在线| 亚洲成AV人在线观看天堂无码| 亚洲国产综合人成综合网站| 日本牲交大片免费观看| 成人毛片视频免费网站观看| 97免费人妻在线视频|