• <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-22 10:50 | 作者: 不詳 | 來源: 領測測試網采編 | 查看: 7次 | 進入軟件測試論壇討論

    領測軟件測試網

      如果你必須使用自繪制控件,那么封裝應用程序的每種特性很可能是你構建框架的最緊迫且繁重的任務。這可以把每個組裝件隱藏到一個函數中。如果要使用一個特性,程序員就調用該特性,而不必考慮組裝件的存在。而如果用戶界面發生改變,則可以在不影響單個腳本的情況下重建組裝件。

      b. Define commands or features of the tool’s programming language.

      b. 定義工具的程序語言的命令或特性

      The automation tool comes with a scripting language. You might find it surprisingly handy to add a layer of indirection by putting a wrapper around each command. A wrapper is a routine that is created around another function. It is very simple, probably doing nothing more than calling the wrapped function. You can modify a wrapper to add or replace functionality, to avoid a bug in the test tool, or to take advantage of an update to the scripting language.

      自動化工具都有一個腳本語言。你會發現,通過包裹每個命令來增加一個間接層的做法非常便捷。所謂包裹,就是一個被創建在另一個函數周圍的例程。這非常的簡單,很可能僅僅只需調用打包函數即可。而且,你可以通過修改包裹來增加或替換函數,以避免測試工具中產生bug,或利用更新的腳本語言。

      Tom Arnold [9] gives the example of wMenuSelect, a Visual Test function that selects a menu. He writes a wrapper function, SelMenu() that simply calls wMenuSelect. This provides flexibility. For example, you can modify SelMenu() by adding a logging function or an error handler or a call to a memory monitor or whatever you want. When you do this, every script gains this new capability without the need for additional coding. This can be very useful for stress testing, test execution analysis, bug analysis and reporting and debugging purposes.

      Tom Arnold給出了wMenuSelect的例子,它是一個選擇菜單的可視化測試函數。他編寫了一個打包函數:可簡單調用wMenuSelect的SelMenu()。這種做法具有靈活性。舉個例子,你可以修改SelMenu(),比如,添加日志功能、添加錯誤處理機制、添加調用內存監視器命令,或其他任何你想添加的東西。當這樣做時,每個腳本都能得到這個新的功能,而并不需要額外編寫代碼。這種做法在強力測試、測試執行分析、bug分析報告與調試目標方面都非常有用。

      LAWST participants who had used this approach said that it had repeatedly paid for itself.

      用過這種方法的LAWST成員說,該方法已經反復收到成效。

      c. Define small, conceptually unified tasks that are done frequently.

      c. 定義經常使用的概念統一的小任務

      The openfile() function is an example of this type of function. The scriptwriter will write hundreds of scripts that require the opening of a file, but will only consciously care about how the file is being opened in a few of those scripts. For the rest, she just wants the file opened in a fast, reliable way so that she can get on with the real goal of her test. Adding a library function to do this will save the scriptwriter time, and improve the maintainability of the scripts.

      openfile()函數是這種類型函數的一個典型例子。腳本編寫者會編寫上百個需要打開文件的腳本,但他只會有意識地關注少數腳本中的文件是怎樣被打開的。至于其它的,他只是想要文件被迅速可靠地打開,這樣,他就能繼續測試他真正要測試的東西。添加一個庫函數來做這些事情將會節省腳本編寫者的時間,并且能改進腳本的可維護性。

    延伸閱讀

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

    63/6<123456>

    關于領測軟件測試網 | 領測軟件測試網合作伙伴 | 廣告服務 | 投稿指南 | 聯系我們 | 網站地圖 | 友情鏈接
    版權所有(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>