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

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

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

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

    改進自動化測試套件的可維護性(三)

    發布: 2010-6-13 10:59 | 作者: 不詳 | 來源: 領測國際采編 | 查看: 17次 | 進入軟件測試論壇討論

    領測軟件測試網

      改進自動化測試套件的可維護性(三)  軟件測試

      4.use a framework-based architecture.

      4.使用基于框架的架構

      The framework provides an entirely different approach, although it is often used in conjunction with one or more data-driven testing strategies. Tom Arnold (one of the LAWST participants) discusses this approach in his book [8] and courses.

      雖然框架通常與一個或一個以上的數據驅動測試策略一同使用,但它本身卻提供了一種完全不同的方法。Tom Arnold(LAWST成員之一)在它的書和課程中論述了這種方法。

      The framework isolates the application under test from the test scripts by providing a set of functions in a shared function library. The test script writers treat these functions as if they were basic commands of the test tool’s programming language. They can thus program the scripts independently of the user interface of the software.

      框架通過提供共享函數庫中的一套函數,把應用程序從測試腳本中分離。這樣,測試腳本編寫者在處理這里函數時,就可以把它們視為測試工具的編程語言的基本命令。因此,他們能單獨編寫軟件的用戶界面腳本。

      For example, a framework writer might create the function, openfile(p). This function opens file p. It might operate by pulling down the file menu, selecting the Open command, copying the file name to the file name field, and selecting the OK button to close the dialog and do the operation. Or the function might be richer than this, adding extensive error handling. The function might check whether file p was actually opened or it might log the attempt to open the file, and log the result. The function might pull up the File Open dialog by using a command shortcut instead of navigating through the menu. If the program that you’re testing comes with an application programmer interface (API) or a macro language, perhaps the function can call a single command and send it the file name and path as parameters. The function’s definition might change from week to week. The scriptwriter doesn’t care, as long as openfile(x) opens file x.

      例如,一個框架編寫者創建了函數openfile(p)。該函數用來打開文件p。它可以通過下拉文件菜單、選擇打開命令、復制文件名到文件名域、點擊OK按鈕關閉對話框來完成操作。此外,這個函數也可以變得更復雜一些,比如,添加可擴展的錯誤處理功能。它能檢查文件p是否已經被打開,或者記錄打開文件的嘗試以及對結果做日志。該函數還可以用一個命令快捷鍵,而不是菜單導航來彈出文件打開對話框。如果你的測試程序涉及到一個應用編程接口(API)或宏語言,那么該函數或許能調用一個單獨的命令,并把文件名和路徑作為參數傳遞給它。函數的定義經常在變化。但只要openfile(x)能打開文件x,腳本編寫者就不必在意。

      Many functions in your library will be useful in several applications (or they will be if you design them to be portable). Don’t expect 100% portability. For example, one version of openfile() might work for every application that uses the standard File Open dialog but you may need additional versions for programs that customize the dialog.

      很多函數庫中的函數在一些應用程序中依然有用(或者當它們被設計成可移植的時,也會很有用)。不要指望100%的可移植性。例如,openfile()的某個版本可以在每個應用程序中使用標準文件打開對話框,但你可能需要為那些有定制對話框的程序設計額外的版本。

      Frameworks include several types of functions, from very simple wrappers around simple application or tool functions to very complex scripts that handle an integrated task. Here are some of the basic types:

    延伸閱讀

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

    TAG: 改進 套件 維護 自動化

    71/71234567>

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