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

    主站蜘蛛池模板: 亚洲精品第一综合99久久| 久久青青成人亚洲精品| 亚洲狠狠色丁香婷婷综合| 日本h在线精品免费观看| 久久久无码精品亚洲日韩蜜臀浪潮 | 无码精品人妻一区二区三区免费看 | 国产AV无码专区亚洲AV琪琪| 午夜dj在线观看免费视频| 亚洲欧美日韩中文高清www777| 成年在线观看网站免费| 亚洲色偷偷综合亚洲av78| 免费看国产精品3a黄的视频| 中文无码亚洲精品字幕| 久久WWW免费人成人片| 亚洲精品国产首次亮相| 免费在线不卡视频| 亚洲免费日韩无码系列| 亚洲AV人无码激艳猛片| 18禁男女爽爽爽午夜网站免费| 亚洲丰满熟女一区二区v| 色窝窝免费一区二区三区 | 亚洲爆乳成av人在线视菜奈实| 在线观着免费观看国产黄| 一级毛片成人免费看a| 好看的亚洲黄色经典| 13一14周岁毛片免费| 亚洲精品欧美综合四区| 亚洲第一永久AV网站久久精品男人的天堂AV| 麻豆va在线精品免费播放 | 91嫩草亚洲精品| 在线永久免费观看黄网站| 国产精品hd免费观看| 亚洲电影一区二区| 国内自产拍自a免费毛片| 72pao国产成视频永久免费| 中文字幕亚洲色图| 成人永久免费福利视频网站| 91视频免费观看高清观看完整| 亚洲免费电影网站| 免费va人成视频网站全| 一级特黄aa毛片免费观看|