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

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

  • <strong id="5koa6"></strong>
  • 消除識別測試對象過程中的二義性情形(3)

    發表于:2011-12-09來源:未知作者:娃娃點擊數: 標簽:軟件測試對象
    選擇合適的對象識別方法 顯然,默認的方法擁有豐厚的工具支持。Rational Functional Tester 提供了強大的工具,例如 Test Object Map 和 Script Assure ,可以輕松解決

      選擇合適的對象識別方法

      顯然,默認的方法擁有豐厚的工具支持。Rational Functional Tester 提供了強大的工具,例如 Test Object Map 和 Script Assure ,可以輕松解決腳本開發的復雜性問題,并降低開發所需的時間。但是,有一些腳本開發員所抱怨的正是簡單性。他們認為工具隱藏了一些他們想要控制的細節。find() 方法是靈活和簡單的。它使腳本開發員能夠更強地控制測試腳本。這就是為什么在腳本開發中它得到廣泛的應用,以替換默認方法的原因?;趯Ш綄ο笞R別方法非常有效和簡單。有一點非常重要:它幾乎可以在任何場所使用。但是,使用 UI 結構還是十分敏感的。

      我們將會向您展示怎樣使用 find() 方法,以及替代性的基于導航方法,同時享受使用工具所帶來的便捷之處。

      腳本組織的建議

      回憶一下 Rational Functional Tester 對象結構的第一部分。我們知道所有的對象搜索方法默認條件下都是在輔助類中執行。例如,搜索 Place Order 按鈕的默認方法如列表 4 所示。

      列表 4. 默認的 Place Order 按鈕代碼

    public abstract class BaseCaseHelper extends RationalTestScript {
    	/**
    	* PlaceOrder: with default state.
    	* .class : javax.swing.JButton
    	* accessibleContext.accessibleName : Place Order
    	* name : placeOrderButton2
    	* .classIndex : 0
    	*/
    	protected GuiTestObject placeOrder() {
    		return new GuiTestObject(getMappedTestObject("placeOrder"));
    	}
    	
    	/**
    	* Schubert4_14Jpg: with default state.
    	* .class : javax.swing.JLabel
    	* iconDescription : Schubert4_14.jpg
    	* .classIndex : 2
    	*/
    	protected GuiTestObject schubert4_14Jpg() {
    		return new GuiTestObject(
    			getMappedTestObject("schubert4_14Jpg"));
    	}
    }

      然后您創建一個輔助類,該類擴展了默認的輔助類并超越了默認的方法。它如列表 5 中的代碼所示。

      列表 5. 創建輔助類的代碼

    public class BaseCaseUserHelper extends BaseCaseHelper {
    // This method is used to find the button Place Order
    public GuiTestObject PlaceOrder() throws TestObjectNotLocatedException{
    		// The path we specified to find the button from the album image
    		// First move up 3 times, then move down to the fifth child
    		String pathString = "P3;C5";
    		Path path = null;
    		try{
    			path = new Path(pathString);
    		}catch(IllegalPathStringException illegalpath){
    			logError(illegalpath.getMessage());
    		}
    		
    		// schubert4_14Jpg() is object for the cover image
    		return new GuiTestObject(
    			ObjectFinder.locateTestObject(schubert4_14Jpg(), path));
    	}
    }
    			

      最后,讓腳本類擴展用戶定義的類。通過這種方法,您不需要編輯任何已存在的對象搜索方法。您只是超越了它們,將已存在的對象搜索方法的最強部分結合起來。

      下載

    描述 名字 大小 下載方法
    示例腳本
    RBAT_Impl.zip
    10KB
    HTTP

      參考資料

      學習

      查看 Rational Functional Tester 信息中心,在那里,您也可以查看一段短的 演示視頻。

      調查 Rational Functional Tester Plus,它是一個軟件應用程序測試包。

      參與 developerWorks 上 的 Rational Functional Tester 學習路線圖,介紹更深入的信息。

      在 IBM Rational 軟件交付平臺 中了解其它應用程序,包括適用于并行開發和地域分布式團隊的協作工具,以及用于架構管理、資產管理、變更和發布管理,集成需求管理、過程和組合管理,和質量管理。您可以在 IBM Rational 在線文檔中心 查找產品手冊、安裝指南以及其它文檔。

      訪問 developerWorks 上的 Rational 專區,了解有關 Rational 軟件交付平臺產品的技術資源和最佳實踐。

      查找 Rational 基于計算機,基于 Web,以及在線指導課程。訓練您的技能,并學習更多有關 Rational 工具的課程,包括入門級和高級課程。在此目錄上的課程可進行購買,包括基于計算機的和基于 Web培訓。此外,一些“入門”課程是免費的。

      訂閱 IBM developerWorks 時事通訊,獲得有關最佳的 developerWorks 教程、文章、下載、社區活動、網絡廣播和事件的每周更新。

      瀏覽 技術書店,獲得有關這些和其它技術主題的書籍。

    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品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>