• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
    • 軟件測試技術
    • 軟件測試博客
    • 軟件測試視頻
    • 開源軟件測試技術
    • 軟件測試論壇
    • 軟件測試沙龍
    • 軟件測試資料下載
    • 軟件測試雜志
    • 軟件測試人才招聘
      暫時沒有公告

    字號: | 推薦給好友 上一篇 | 下一篇

    十分鐘入門 Tellurium (英文版)

    發布: 2009-6-16 13:08 | 作者: 網絡轉載 | 來源: 領測軟件測試網采編 | 查看: 79次 | 進入軟件測試論壇討論

    領測軟件測試網

    Create Your own UI modules and Test Cases

    Tellurium provides TrUMP for you to automatically create UI modules. TrUMP can be download from Tellurium project site

    http://code.google.com/p/aost/downloads/list

    Choose the Firefox 2 or Firefox 3 version depending on your Firefox version. Or you can download the Firefox 3 version directly from Firefox addons site at

    https://addons.mozilla.org/en-US/firefox/addon/11035

    Once you install it and restart Firefox, you are ready to record your UI modules by simply clicking on the UI element on the web and then click the "generate" button. You may like to customize your UI a bit by clicking the "Customize" button. More detailed TrUMP introductions can be found at

    http://code.google.com/p/aost/wiki/TrUMP

    and

    http://code.google.com/p/aost/wiki/HowTrUMPWorks

    In our example, we open up Tellurium download page

    http://code.google.com/p/aost/downloads/list

    and record the download search module as follows

    LRuVAwbLjuTZtSqonpmmrv0I-p7nCVZQmP65Tb_vjspK02CR95VRrtmeQ&gsc=r5ESUAsAAAB_6XgBAY-OTO2KhvY2ZJUe">

    After we customize the UI module, we export it as the module file NewUiModule.groovy to the demo project and add couple methods to the class.

    class NewUiModule extends DslContext {

     
    public void defineUi() {
        ui
    .Form(uid: "TelluriumDownload", clocator: [tag: "form", method: "get", action: "list"], group: "true") {
         
    Selector(uid: "DownloadType", clocator: [tag: "select", name: "can", id: "can"])
         
    InputBox(uid: "Input", clocator: [tag: "input", type: "text", name: "q", id: "q"])
         
    SubmitButton(uid: "Search", clocator: [tag: "input", type: "submit", value: "Search"])
       
    }
     
    }

     
    //Add your methods here
     
    public void searchDownload(String keyword) {
        keyType
    "TelluriumDownload.Input", keyword
        click
    "TelluriumDownload.Search"
        waitForPageToLoad
    30000
     
    }

     
    public String[] getAllDownloadTypes() {
       
    return getSelectOptions("TelluriumDownload.DownloadType")
     
    }

     
    public void selectDownloadType(String type) {
        selectByLabel
    "TelluriumDownload.DownloadType", type
     
    }
    }

    Then, create a new Tellurium test case NewTestCase by extending TelluriumJavaTestCase class.

    public class NewTestCase extends TelluriumJavaTestCase {
       
    private static NewUiModule app;

       
    @BeforeClass
       
    public static void initUi() {
            app
    = new NewUiModule();
            app
    .defineUi();
       
    }

       
    @Before
       
    public void setUpForTest() {
            connectUrl
    ("http://code.google.com/p/aost/downloads/list");
       
    }

       
    @Test
       
    public void testTelluriumProjectPage() {
           
    String[] allTypes = app.getAllDownloadTypes();
            assertNotNull
    (allTypes);
            assertTrue
    (allTypes[1].contains("All Downloads"));
            app
    .selectDownloadType(allTypes[1]);
            app
    .searchDownload("TrUMP");
       
    }
    }

    Compile the project and run the new test case.

    Tellurium TestNG Project

    If you want to create a new Tellurium TestNG project, simply use a different Maven archetype as follows,

    mvn archetype:create -DgroupId=example -DartifactId=demo -DarchetypeArtifactId=tellurium-testng-archetype -DarchetypeGroupId=tellurium -DarchetypeVersion=1.0-SNAPSHOT

    and the new Tellurium test case should extend TelluriumTestNGTestCase class. The rest are the same as the JUnit ones.

    Resources

    The slides for this tutorial is available at

    http://aost.googlecode.com/files/Ten.Minutes.To.Tellurium.pdf

    The Screencast video is available at

    http://aost.googlecode.com/files/TenMinutesToTellurium.ogg

    Here is the online version

    The generated Demo project can be downloaded from here or check it out from Subversion

    http://aost.googlecode.com/svn/branches/ten-minutes-to-tellurium/

    延伸閱讀

    文章來源于領測軟件測試網 http://www.kjueaiud.com/

    22/2<12

    關于領測軟件測試網 | 領測軟件測試網合作伙伴 | 廣告服務 | 投稿指南 | 聯系我們 | 網站地圖 | 友情鏈接
    版權所有(C) 2003-2010 TestAge(領測軟件測試網)|領測國際科技(北京)有限公司|軟件測試工程師培訓網 All Rights Reserved
    北京市海淀區中關村南大街9號北京理工科技大廈1402室 京ICP備10010545號-5
    技術支持和業務聯系:info@testage.com.cn 電話:010-51297073

    軟件測試 | 領測國際ISTQBISTQB官網TMMiTMMi認證國際軟件測試工程師認證領測軟件測試網

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>