QTP Automation Framework
QTP脚本编程指导教程
在QTP软件中,用户可以创建脚本项目,设置脚本语 言和运行环境等参数。
QTP脚本编程语言基础
VBScript语言
QTP脚本编程使用VBScript语言,这是一种简单 易学的脚本语言,用于编写自动化测试脚本。
关键字和数据池
QTP提供关键字和数据池功能,用于定义测试数 据和参数化测试用例。关键字可以用于编写条件 判断、循环控制等逻辑语句。
问题3
如何处理异常和错误?
问题4
如何提高脚本的稳定性和可维护性?
QTP脚本编程解决方案
01
解决方案1
使用对象识别器识别动态变化的界 面元素
解决方案3
使用异常处理机制处理异常和错误
03
02
解决方案2
使用条件语句和循环结构实现多步 骤操作的自动化
解决方案4
遵循良好的编程规范,提高脚本的 稳定性和可维护性
01
设计清晰的目录结构,规范测试脚本命名规则,便于测试框架
的管理和维护。
实现测试用例管理
02
使用测试用例库,统一管理测试用例,方便测试用例的复用和
更新。
集成持续集成工具
03
将自动化测试框架与持续集成工具集成,实现自动化构建、部
署和测试。
QTP脚本编程与其他工具集成
与Bug跟踪工具集成
将测试结果与Bug跟踪工具集成,实现Bug 的跟踪和管理。
动态对象识别
对于动态变化的界面元素,QTP支持使用正则表 达式进行对象识别。
QTP脚本编程数据驱动测试
数据驱动测试的概念
数据驱动测试是一种测试策略,通过将 测试数据与测试逻辑分离,提高测试的
复用性和可维护性。
数据参数化
在QTP中,可以使用参数化功能将测 试数据传递给测试脚本,实现动态测
QTP-学习软件测试QTP入门
调试脚本
对脚本进行调试,确保其正 确性和稳定性。
优化脚本
对脚本进行优化,提高其执 行效率和准确性。
03 QTP高级功能
QTP自动化测试框架
QTP自动化测试框架
QTP(Quick Test Professional)提 供了一个强大的自动化测试框架,使 得测试人员能够通过录制和编辑测试 脚本,实现自动化测试。
02
它通过模拟用户操作,对软件界 面进行测试,验证软件的功能是 否正常。
QTP的特点
01
02
03
自动化测试
QTP支持自动化测试,能 够快速、准确地执行测试 用例,提高测试效率。
测试管理
QTP提供了测试管理功能, 能够对测试计划、测试用 例、测试结果等进行统一 管理。
兼容性强
QTP支持多种操作系统和 多种浏览器,能够满足不 同软件平台的测试需求。
QTP-学习软件测试QTP入门
目 录
• QTP简介 • QTP基础知识 • QTP高级功能 • QTP实践案例 • QTP常见问题与解决方案 • QTP未来发展与展望
01 QTP简介
QTP的含义
01
QTP是Quick Test Professional 的缩写,是一款自动化测试工具 ,用于对软件进行功能测试和回 归测试。
QTP性能测试
性能测试基础
QTP提供了性能测试功能,可以帮助测试人员对被测试应用程序 进行负载测试和压力测试。
场景设计
通过QTP的场景设计器,测试人员可以模拟多用户并发访问被测试 应用程序的情况,以检测应用程序的性能表现。
Байду номын сангаас结果分析
QTP提供了丰富的性能测试结果分析功能,可以帮助测试人员快速 定位瓶颈和问题所在。
QTP操作手册
QTP使用简要说明QTP11.0安装点击Setup.exe,弹出安装界面,如下:QTP工作原理使用QTP做自动化测试,是录制回放的过程;QTP在录制脚本时,同时捕捉屏幕上的对象信息,存放到QTP的对象库,回放时获得应用程序正在运行时的对象属性与对象库中已存在的对象属性做比较,在对象库中已存在的对象上做对应的操作,即录制时所做的操作。
录制和回放1、Add-in &BHO Manager插件Add-in的选择是为了能够成功识别对应插件的测试对象控件,插件的选择与被测对象控件有关,根据被测对象控件选择所需插件,QTP默认自带插件有ActiveX、Visual Basic、Web,如下图:插件选择错误将导致Spy无法识别对象,如下图:插件选择正确,但Spy仍然无法识别对象,有时仍然会出现上图的情况,那是因为QTP 在IE中识别对象依靠一个名为BHO Manager Class的动态链接库来完成,启动QTP后,每次打开IE,浏览器会自动加载BHO Manager,如果先打开IE再启动QTP,QTP就不能成功过读到BHO Manager Class这个动态链接库,从而导致QTP识别对象失败,所以使用QTP时,应先启动QTP再打开浏览器。
2、Record and Run Setting点击QTP菜单栏Automation→Record And Run Setting,进入录制与运行设置界面,如下图:分为Web选项卡及Windows Applications 选项,Web选项常用于B/S架构的系统。
1)Record and run test on any browser :在任意打开的浏览器上进行录制和运行测试组件。
选择这个组件后,需手动打开浏览器,或用代码SystemUtil.Run”网址”打开浏览器。
2)Open the following address when a record or run session begin:当开始录制或运行时打开下面输入的地址。
QTP资源汇总
1、QTP专业网站///////2、HP官方QTP主页https:///cda/hpms/display/main/hpms_content.jsp?zn=bto&cp=1-11-127-24^1352_4000_100__3、QTP第三方工具Test Design Studio的主页/products/test_design_studio/Default.aspx4、QTP WEB测试辅助工具IE Developer Toolbar下载页面/downloads/details.aspx?familyid=e59c3964-672d-4511-bb3e-2d5e1db91038&displaylang=en5、QTP论坛SQAForums论坛上的QTP版块:/postlist.php?Cat=0&Board=UBB20AdvancedQTP论坛上启动的一个QTP虚拟项目(围绕QTP附带的样例程序Flight开展):/forums/index.php/board,5.0.html6、自动化测试方面的网站///~wazmo/qa/#test_automation《软件自动化测试成功之道》学习资源:/Testing_is_believing/archive/2010/05/27/5628697.aspxQTP基础视频(《软件自动化测试成功之道》光盘视频):/topics/2823906ADO教程:/ado/index.asp自动化测试框架1、《测试对象级框架- QTestWare》/Testing_is_believing/archive/2010/01/03/5125592.aspx2、《QTP面向对象框架》/Testing_is_believing/archive/2009/12/19/5040680.aspx3、《自动化测试框架剖析》/Testing_is_believing/archive/2009/12/20/5042211.aspx4、《QTRunner》/Testing_is_believing/archive/2009/12/19/5037830.aspx5、《自动化测试框架开发5步法》/Testing_is_believing/archive/2009/12/17/5026712.aspx6、《QTP下基于XML+DP的关键字驱动DEMO》/Testing_is_believing/archive/2009/11/29/4900529.aspx7、《如何选择自动化测试框架》/Testing_is_believing/archive/2008/06/29/2595477.aspx8、《自动化测试框架设计指南》/Testing_is_believing/archive/2008/06/22/2576208.aspx9、《QTP的报告管理扩展框架- ReporterManager》/Testing_is_believing/archive/2008/01/27/2068905.aspx10、《透析QTP自动化测试框架SAFFRON》/Testing_is_believing/archive/2008/08/28/2845530.aspx11、《Test Automation Frameworks》/FRAMESDataDrivenTestAutomationFrameworks.htm12、《QTP关键字驱动框架- RelevantCodes[1]One》/Testing_is_believing/archive/2010/03/14/5378979.aspx13、《介绍一个QTP基础框架- SIFL》/Testing_is_believing/archive/2010/03/16/5384390.aspx文章1、《QTP10调试时查看变量显示空白- 补丁QTP_00591》/Testing_is_believing/archive/2010/02/28/5333934.aspx2、《HP发布QTP的新补丁支持FireFox3.5》/Testing_is_believing/archive/2010/01/10/5170279.aspx3、《QTP10的Reporter对象》/Testing_is_believing/archive/2010/01/02/5121064.aspx4、《QTP10的Tips.txt文件》/Testing_is_believing/archive/2009/12/13/4996879.aspx5、《HP发布了针对QTP 10的Web2.0 Feature Pack》/Testing_is_believing/archive/2009/11/22/4851752.aspx6、《QTP的智能识别(Smart Identification)过程》/Testing_is_believing/archive/2010/02/01/5277890.aspx7、《如何让你的QTP脚本执行效率更高》/Testing_is_believing/archive/2009/12/19/5040174.aspx8、《用户体验测试的自动化实现》/Testing_is_believing/archive/2008/05/27/2488303.aspx9、《使用QTP进行非GUI的自动化测试》/Testing_is_believing/archive/2010/03/14/5379213.aspx10、《QTP调用外部应用程序的4种方法》/Testing_is_believing/archive/2010/03/18/5394213.aspx11、stickyminds网站上关于QTP和自动化测试的一些文章:/sitewide.asp?function=search&kind=simplesite&tt=SRCHBOX&tth=Y&freetext=QTP12、QTP不需要Browser对象也能访问页面元素:/browser-not-required/13、如何让QTP支持TN3270 Plus终端模拟器:.au/tech-tips/qtp-with-terminal-emulators/14、AutoItx3与QTP/Christian/entry/autoitx3_and_qtp_part_1/Christian/entry/autoitx3_and_qtp_part_215、在QTP中如何把指定窗口置前:/Christian/entry/bringing_windows_to_the_front/Christian/entry/bringing_windows_to_the_front1QTP相关工具、插件:1、Power Debuger/Testing_is_believing/archive/2010/04/19/5504266.aspx2、Adobe为QTP提供的Flex4插件/Testing_is_believing/category/357781.aspx?PageNumber=23、My System/Uploads/My%20System/My%20System%20Auation%20Center%201.3.5.zip4、syncfusion控件的QTP插件::91/products/windows/addons/qtp/default.aspx5、infragistics控件的QTP插件扩展支持包:/dotnet/testadvantage/ta-qtp.aspx#Overview6、HP 的一些合作伙伴把QTP 的自动化测试能力延伸到移动应用程序领域,例如Jamo 、DeviceAnywhereJamo :/documents/meuxqtp.htmlDeviceAnywhere :/mobile-application-testing-smartphones.html7、测试Android的QTP插件- SeeTest/download//support/tutorial/how-to/set-up-new-project/connect-an-external-device-e-g-android//knowledge-base/articles/environment-techniques-id15/mobile-id777/test-android-with-qtp/QTP 学习视频汇总为了自己查看比较方便,对BOOBOOKE内所有的QTP视频做个汇总贴. ====================================================================== ==========[V] QTP 9的新特性1 - 英文视频/v/bbk1050是QTP 9软件中自带的视频讲座,英语讲座[V] QTP 9的新特性2 - 英文视频/v/bbk1051QTP 9软件中自带的视频讲座,英语发音[V] QTP 9的新特性3 - 英文视频/v/bbk1052QTP 9软件自带的视频讲座,英语发音,希望大家喜欢。
QTP自动化测试脚本
QTP自动化测试脚本'************************************************************ ' S.A.F.F.R.O.N. Prototype 1.1'' Simple Automation Framework For Remarkably Obvious Notes ' Copyright ? 2006 Mercury Interactive Corporation '' Notes:'' Requires QuickTest Professional 9.1'' Author : Adam Gensler' Created : July 12, 2006' Last Updated : September 11, 2006'' This prototype framework is provided AS IS, and is meant ' to be used for instructional purposes.'' This framework is a prototype, and is not supported ' by Mercury Interactive.''************************************************************ initialized = falsethirdlevel = ""level = ""desc = ""object = ""objectDescription = ""levelsubdescriptiondelimiter = ","leveldescdelimiter = "|"objectdelimiter = "|"leveldelimiter = "|"objectsDescriptiondelimiter = "|"webLevels = "Browser|Page|Frame"webLevelsDesc = "micclass:=Browser|micclass:=Page|micclass:=Frame|" ' 扩展对Image,WebRadioGroup对象的支持objects ="Link|WebButton|WebList|WebEdit|Image|WebElement|WebCheckBox|WebRadi oGroup|"objectsDescription ="micclass:=Link|micclass:=WebButton|micclass:=WebList|micclass:=WebE dit|micclass:=Image|micclass:=WebElement|micclass:=WebCheckBox|micclass:=WebRadi oGroup|"' Generates a generic description based up on the "level" viarable ' levelstr - will be one of the values that is in the level array ' returns - string representative of the object hierarchy Public Function GenerateDescription (levelstr)l = IndexOf(level, levelstr)If l >=0 Thenfdesc = level(0) & "(" & Quote(desc(0)) & ")."If l >= 1 Thenfdesc = fdesc + level(1) & "(" & Quote(desc(1)) & ")."If 2 >= l ThenIf thirdlevel <> "" Thenfdesc = fdesc + level(2) & "(" & Quote(desc(2)) & "," &Quote("name:=" & thirdlevel) & ")."End IfEnd IfEnd IfEnd IfGenerateDescription = fdescEnd Function' Generates an object description based upon the object, and objectDescription arrays' obj - name of the object in the object array ' prop - additional property to help uniquely identify the object ' returns - a string representative of the object description Public Function GenerateObjectDescription (obj, prop)i = IndexOf(object, obj)ndesc = ""If i <> -1 Thenndesc = obj & "(" & Quote(objectDescription(i)) & "," & Quote(prop)& ")."End IfGenerateobjectDescription = ndescEnd Function' given an array, returns the index of the value to search for ' ary- an array' str - value to search for in an array' returns - index in arrayPublic Function IndexOf (ary, str)val = -1For i = 0 to UBound(ary)If ary(i) = str Thenval = iEnd IfNextIndexOf = valEnd Function' configures framework to work within the context of a specificframe ' val - the Name of the frame to work within -- use Object Spy if you don't ' already know the frame namePublic Function WorkInFrame (val)Report micPass, "Enter Frame", "Entered scope of frame " & Quote(val) thirdlevel = valEnd Function' configures the framework to work outside the context of a specific frame Public Function StopWorkingInFrameReport micPass, "Exit Frame", "Exited scope of frame " &Quote(thirdlevel)thirdlevel = ""End Function' generates a string with embedded/surrounding quotesPublic Function Quote (txt)Quote = chr(34) & txt & chr(34)End Function' navigate to a site if the browser is already opened, otherwise run initialization打开指定URLPublic Function BrowseTo (url)thirdlevel = ""Report micPass, "Navigate to URL", "Navigating to URL: " & Quote(url) If initialized ThenExecute GenerateDescription("Browser") & "Navigate " & Quote(url)ElseLaunch "website", urlEnd IfReporter.Filter = rfDisableAllEnd Function' waits for the web page to finish loading等待WEB页面打开完全后再继续执行程序Public Function AutoSyncExecute GenerateDescription("Browser") & "Sync"End Function' close all opened browsers关闭页面Public Function CloseBrowsersIf Browser("micclass:=Browser").Exist (0) ThenBrowser("micclass:=Browser").CloseEnd IfWhile Browser("micclass:=Browser", "index:=1").Exist (0)Browser("index:=1").CloseWendIf Browser("micclass:=Browser").Exist (0) ThenBrowser("micclass:=Browser").CloseEnd IfEnd Function' prepares the framework for usage, and configures all internal framework' variables and structures' apptype - used to launch different types of applications based ' upon different technologies -- currently there is only web ' val - string that represents what to launch ' returns - always returns true Public Function Launch (apptype, val)If "website" = apptype Thenthirdlevel = ""Report micPass, "Initialize", "Initializing Framework"level = split(webLevels, leveldelimiter, -1, 1)desc = split(webLevelsDesc, leveldescdelimiter, -1, 1)object = split(objects, objectdelimiter, -1, 1)objectDescription = split(objectsDescription, objectsDescriptiondelimiter,-1, 1)CloseBrowsersSet IE = CreateObject("InternetExplorer.Application")IE.visible = trueIE.Navigate valWhile IE.Busywait 1WendEnd Ifinitialized = trueLaunch = trueEnd Function' Verify the Existence of an object' objtype - values should be limited to values in the object array ' text - multi-purpose argument that indicates what to verify ' - for a link, or button, it's the text of the control ' - for a list, it's thename of the control ' - for a frame, it's the name of the frame Public Function Verify (objtype, text)rval = falselocalDesc = ""estr = ""If thirdlevel <> "" ThenlocalDesc = GenerateDescription(level(2))ElselocalDesc = GenerateDescription(level(1))End IfAutoSync()Select Case objtypeCase "Page"Execute "rval = " & GenerateDescription(level(1)) & "Exist (0)"If rval ThenExecute "title = " & GenerateDescription(level(1)) & "GetROProperty(" & Quote("title") & ")"If title = text Thenrval = trueElserval = falseEnd IfEnd IfCase "CurrentFrame"If thirdlevel <> "" Thenestr = "rval = " & localDescEnd IfCase "Link"estr = "rval = " & localDesc & GenerateObjectDescription("Link", "innertext:=" & text)Case "WebButton"estr = "rval = " & localDesc & GenerateObjectDescription("WebButton", "value:=" & text)Case "WebList"estr = "rval = " & localDesc & GenerateObjectDescription("WebList", "name:=" & text)Case "WebEdit"estr = "rval = " & localDesc & GenerateObjectDescription("WebEdit", "name:=" & text)End SelectIf estr <> "" ThenExecute estr + "Exist (0)"End IfIf rval ThenReport micPass, objtype & " Verification", "The " & objtype & " " & Quote(text)& " was verified to exist"ElseReport micFail, objtype & " Verification", "The " & objtype & " " & Quote(text) & " was not found"End IfIf "True" = rval Thenrval = TrueElserval = FalseEnd IfVerify = rvalEnd Function' Activates an object based upon its object type' objtype - the type of object should be limited to values in the object array ' text - identifying text for the control - for a link,it's the text of the link Public Function Activate (objtype, text) localDesc = ""If thirdlevel <> "" ThenlocalDesc = GenerateDescription(level(2))ElselocalDesc = GenerateDescription(level(1))End IfAutoSync()Select Case objtypeCase "Link"Execute localDesc & GenerateObjectDescription("Link","innertext:=" & text) & "Click"Report micPass, "Link Activation", "The Link " & Quote(text) & " was clicked."Case "WebButton"Execute localDesc & GenerateObjectDescription("WebButton", "value:=" & text) & "Click"Report micPass, "WebButton Activation", "The WebButton " &Quote(text) & " was clicked."' 扩展对Image类型的按钮的支持Case "Image"Execute localDesc & GenerateObjectDescription("Image", "name:=" & text) & "Click"Report micPass, "ImageButton Activation", "The ImageButton" &Quote(text) & " was clicked."'扩展对WebCheckBOX选中或撤销选中支持Case "WebCheckBox"Execute "texts = " & localDesc &GenerateObjectDescription("WebCheckBox","name:=" & text) & "GetROProperty (" &Quote("checked") & ")"If texts=0 ThenExecute localDesc & GenerateObjectDescription("WebCheckBox","name:=" &text) & "Set"&Quote("ON")ElseExecute localDesc & GenerateObjectDescription("WebCheckBox","name:=" &text) & "Set"&Quote("OFF")End IfReport micPass, "WebCheckBox Activation", "The WebCheckBox " & Quote(text)& " was clicked."End SelectEnd Function'判断WebCheckBox当前状态,如果是0则位选中,1为选中Public Function isWebchecked(text)localDesc = ""If thirdlevel <> "" ThenlocalDesc = GenerateDescription(level(2))ElselocalDesc = GenerateDescription(level(1))End IfAutoSync()Execute "texts = " & localDesc &GenerateObjectDescription("WebCheckBox","name:=" & text) & "GetROProperty (" &Quote("checked") & ")"isWebchecked=textsEnd Function'根据Index:=N的值进行Click,目前只实现了WebCheckBoxPublic Function ActivateForIndex(objtype,i)localDesc = ""If thirdlevel <> "" ThenlocalDesc = GenerateDescription(level(2))ElselocalDesc = GenerateDescription(level(1))End IfAutoSync()Execute "texts = " & localDesc &GenerateObjectDescription("WebCheckBox","index:=" & i) & "GetROProperty (" & Quote("checked") & ")"If texts=0 ThenExecute localDesc &GenerateObjectDescription("WebCheckBox","index:=" & i) &"Set"&Quote("ON")ElseExecute localDesc &GenerateObjectDescription("WebCheckBox","index:=" & i) &"Set"&Quote("OFF")End IfReport micPass, "WebCheckBox Activation", "The WebCheckBox " & Quote(i) & " was clicked."End Function'点击WebRadioGroup'value 为WebRadioGroup Value'index 为单选框索引,从0开始Public Function ActivateWebRadioGroup(value,i)localDesc = ""If thirdlevel <> "" ThenlocalDesc = GenerateDescription(level(2))ElselocalDesc = GenerateDescription(level(1))End IfAutoSync()Execute localDesc &GenerateObjectDescription("WebRadioGroup","Value:=" & value) & "Select (" & Quote("#"&i) & ")"Report micPass, "WebRadioGroup Activation", "The WebCheckBox "&Quote(value)&"的"& Quote(i) & " was clicked."End Function' Selects a specific value from a listbox, or combobox' objname - name of the control -- use Object Spy if you don't know the name property ' text - the item in the combobox to select Public Function SelectFromList (objname, text)localDesc = ""rv = ""rval = falseIf thirdlevel <> "" ThenlocalDesc = GenerateDescription(level(2))ElselocalDesc = GenerateDescription(level(1))End IfAutoSync()localDesc = localdesc & GenerateObjectDescription("WebList", "name:=" &objname)Execute "cnt = " & localDesc & "GetROProperty(" & Quote("items count") & ")"For i = 1 to cntExecute "rv = " & localDesc & "GetItem (" & i & ")"If rv = text Thenrval = trueEnd IfNextIf rval ThenExecute localDesc & "Select " & Quote(text)End IfIf rval ThenReport micPass, "WebList Selection", "The WebList item " &Quote(text) & "was selected."ElseReport micFail, "WebList Selection", "The WebList item " &Quote(text) & "was NOT found."End IfSelectFromList = rvalEnd Function' Enters text into an edit field' objname - name of the control -- use Object Spy if you don't know what it is' text - the text to enter into the control Public Function EnterTextIn (objname, text)localDesc = ""rval = trueIf thirdlevel <> "" ThenlocalDesc = GenerateDescription(level(2))ElselocalDesc = GenerateDescription(level(1))End IfAutoSync()localDesc = localdesc & GenerateObjectDescription("WebEdit", "name:=" &objname)Execute localDesc & "Set (" & Quote(text) & ")"Report micPass, "Enter Text", "Text: " & Quote(text) & " was entered into " &Quote(objname)EnterTextIn = rvalEnd Function'根据index给指定WebEdit赋值Public Function EnterTextInI (text,i)localDesc = ""rval = trueIf thirdlevel <> "" ThenlocalDesc = GenerateDescription(level(2))ElselocalDesc = GenerateDescription(level(1))End IfAutoSync()localDesc = localdesc&"WebEdit("&Quote("micclass:=WebEdit")&","&Quote("index:="&i)&")."Execute localDesc & "Set (" & Quote(text) & ")"Report micPass, "Enter Text", "Text: " & Quote(text) & " was entered into " &Quote(objname)EnterTextIn = rvalEnd Function' Obtains text from a control' objtype - is the type of control the get the text from ' objname - is the name of the control -- use Object Spy if you don't know the name ' returns - the text of the controlPublic Function GetTextFrom (objtype, objname)text = ""localDesc = ""If thirdlevel <> "" ThenlocalDesc = GenerateDescription(level(2))ElselocalDesc = GenerateDescription(level(1))End IfAutoSync()Select Case objtypeCase "WebEdit"Execute "text = " & localDesc & GenerateObjectDescription("WebEdit", "name:=" & objname) & "GetROProperty (" & Quote("value") & ")"Case "WebList"Execute "text = " & localDesc & GenerateObjectDescription("WebList", "name:=" & objname) & "GetROProperty (" & Quote("value") & ")"End SelectReport micPass, "Capture Text", "Text: " & Quote(text) & " was captured from thecontrol " & Quote(objname)GetTextFrom = textEnd Function'获取DIV中WebElement的值'classNames,DIV 的Class值。
戴尔通用测试自动化框架(UTAF)解决方案说明书
If you’re expected to deliver high quality, low cost testing services against aggressive timelines, automation is critical to your success. When used for design, execution and reporting, test automation can shorten release cycles and cut costs significantly. However, it’s important to use an automation solution that’s easily deployable and able to integrate with new technologies and multi-vendor testing tools.The Dell Universal Test Automation Framework (UTAF) solution can help you achieve these goals and more. It provides innovative automation that not only meets your application testing challenges and expectations, it can also be customized for functional regression testing with most multi-vendor testingplatforms across all domains.Key benefits:• Scriptless approach reduces complexity in automation byeliminating manual programming • Reusable test scripts significantly cuts testing turnaround time byup to 50 percent• Helps save up to 45 percent on automation tool licenseprocurement cost• Universally compatible with most commercial and opensource test automation toolsvia customized plug-ins• Intuitive user interface Jumpstart automation testing with reusable framework components while saving on tool license cost.Save 45 percent on testing costs with 50 percent less effort.Dell Universal Test Automation FrameworkProduct and service availability varies by country. To learn more, customers and Dell Channel Partners should contact their sales representative for more information. Specifications are correct at date of publication but are subject to availability or change without notice at any time. Dell and its affiliates cannot be responsible for errors or omissions in typography or photography. Dell’s Terms and Conditions of Sales and Service apply and are available on request. Dell and the Dell logo are trademarks of Dell Inc. Other trademarks and trade names may be used in this document to refer to either the entities claiming the marks and names or their products. Dell disclaims proprietary interest in the marks and names of others. © 2013 Dell Inc. All rights reserved. September 2013 | D283 - UTAF Datasheet.indd | Rev. 1.0Scan or click this code to learn how Dell Services can help yourorganization.Dell Universal Test Automation FrameworkWhy DellWe believe in improving quality, productivity and cycle time throughinnovation, collaboration and a proactive approach, including:• Proven credentials in delivering business value and return on investment• Developer team skills, testing mindset and business understanding• Strong track record oflong-running engagements and customer satisfaction• Well established Center of Excellence aligned to technology trends• Smart-sourced global delivery modelFor more information about any of our service offerings, please visit /services or contact your Dell representative.Dell Application Testing Services highlights• 13 years of experience providing independent testing services to clients across multiple industries • Over 2,500 global testing associates certified/trained in multiple tools and processes• Dedicated Centers of Excellence for specialized functional and non-functional testing• Wide portfolio of services for functional and non-functional testing across industries。
QTP自动化测试教程
QTP自动化测试教程目录一、自动化测试概述 (2)1. 自动化测试简介 (3)1.1 自动化测试定义与特点 (4)1.2 自动化测试应用领域 (5)1.3 自动化测试发展趋势 (6)2. QTP自动化测试工具介绍 (8)2.1 QTP工具简介 (9)2.2 QTP功能特点 (10)2.3 QTP应用领域及优势 (12)二、QTP安装与配置 (14)1. QTP安装步骤 (15)2. 配置环境变量及插件安装 (16)3. 许可证管理及相关设置 (17)三、QTP基础操作入门 (18)1. QTP界面介绍及功能分区 (19)2. 创建与编辑测试项目 (20)3. 测试用例设计与管理 (21)4. 运行测试并生成报告 (23)四、QTP高级功能应用 (24)1. 对象识别与定位技术 (26)2. 参数化测试及数据驱动测试 (28)3. 测试脚本编写与调试技巧 (29)4. 插件开发与集成应用 (30)五、QTP自动化测试实战案例 (32)1. 网页应用自动化测试案例 (33)2. 桌面应用自动化测试案例 (34)3. 移动应用自动化测试案例 (35)六、QTP性能优化与常见问题解决方案 (36)1. 提升测试效率的策略和方法 (38)2. 常见错误类型及解决方案 (40)一、自动化测试概述自动化测试是一种使用计算机程序来模拟人工测试过程的方法,它可以在较短的时间内、更低的成本和更高的效率下完成大量的测试任务。
在QTP(QuickTest Professional)中,自动化测试是指利用QTP的脚本语言编写测试脚本,实现对软件功能的自动执行、验证和故障定位等功能。
提高测试效率:通过自动化测试,可以快速地重复执行相同的测试用例,大大缩短了测试周期。
降低测试成本:自动化测试可以减少人力资源的投入,节省测试人员的培训成本和管理成本。
提高测试质量:自动化测试可以消除人为因素导致的错误,提高测试结果的准确性和可靠性。
QTP_自动化测试框架(与“测试”有关文档共11张)
当前自动化测试状态
• A:一个测试用例对应一个自动化脚本
B:采用Automation Framework统一调度自动化脚本
A:一个测试用例对应一个自动化脚本
B:采用Automation Framework统一调度自动化脚本
• B: Framework 采用Automation B:采用Automation Framework统一调度自动化脚本
解决重复测试结果的一致性 A:一个测试用例对应一个自动化脚本
解决资源不足及分配的问题
• D:采用QC+QTP(BPT)的模式
第3页,共11页。
自动化框架目标
• 代码开发快速简单 • 数据的易维护 • 高的执行效率 • 与手动测试紧密结合 • 具备跨平台能力
第4页,共11页。
自动化测试流程
• 需求分析
内容
• 为什么采用自动化测试 • 当前自动化测试状态 • 自动化框架目标 • 自动化测试流程 • 自动化测试架构 • 如何组织自动化脚本
第1页,共11页。
为什么采用自动化测试
• 解决重复测试结果的一致性 • 解决资源不足及分配的问题 • 解决大量重复性工作 • 提高工作效率 • 生成大量数据 • 回归测试。。。
C:采用QC+QTP+Framework的模式
• 抽象业务组件 解决重复测试结果的一致性
解决重复测试结果的一致性 B:采用Automation Framework统一调度自动化脚本
• 定义输入输出参数 A:一个测试用例对应一个自动化脚本
C:采用QC+QTP+Framework的模式 B:采用Automation Framework统一调度自动化脚本 A:一个测试用例对应一个自动化脚本
QTP功能自动化测试
QTP功能自动化测试一、VBS (3)1、wsh对象 (3)2、文本htmlfile对象 (3)3、fso对象 (3)4、EOM对象 (4)5、QTP对象和QTP自带报告对象 (4)6、数组的定义 (5)二、QTP11的安装 (5)1、安装包路径不能有中文 (5)2、破解 (5)2.1、建立License Manager文件夹 (5)2.2、运行mgn-mqt82.exe (5)2.3、拷贝注册码 (6)2.4、运行QTP11,粘贴密钥。
(6)三、QTP的使用 (6)1、新建 (6)2、录制 (6)2.1、选择录制对象 (6)2.1.1、录制应用程序 (6)2.1.2、录制web网站 (7)2.2、录制过程 (7)3、回放 (8)3.1、查看对象属性 (8)3.2、回放 (8)4、添加对象 (8)4.1、对象类型 (8)4.1.1、TO(Test Object)对象 (8)4.1.2、RO(Runtime Object)对象 (8)4.2、先打开要录制的程序或网站 (8)4.3、在QTP中打开对象仓库 (8)4.4、点击添加对象按钮 (8)4.5、点击要添加的对象 (9)4.5.1、添加一个TO对象 (9)4.5.2、添加一个RO对象 (9)4.6、使用对象 (9)5、增加新的Action (9)6、公共对象库 (9)6.1、导出要共享的对象 (9)6.2、进入外联仓库 (10)6.3、添加共享对象 (10)6.4、使用公共对象库的Action (10)7、数据池 (10)7.1、勾选Data Table调出数据池 (10)7.2、修改数据列名称 (11)7.3、读取数据池的数据 (11)8、代码实现网站的打开和关闭 (11)9、RO对象值的抓取 (11)10、添加用户自定义函数方法 (11)10.1、录入对象确定元素 (12)10.2、进入Tools—>Web Event Recording Configuration (12)10.3、对WebElement元素添加新的对象 (12)10.4、添加新的方法 (12)10.5、调用自定义方法:FireEvent (12)12、语法高亮工具 (13)13、Jack侦探vs描述性编程 (13)13.1、定位对象的过程 (13)13.2、适用范围 (15)13.3、优缺点 (15)14、查看报告 (15)14.1、打开报告 (15)14.2、报告内字段的意义 (16)四、自动化测试 (17)1、带测试报告的结构化测试脚本 (17)1.1、函数功能模版 (17)1.2、流程图 (17)1.3、设计数据池 (18)1.4、录入对象 (18)1.5、代码 (18)2、业务场景测试 (18)2.1、功能测试表 (18)2.2、函数功能模版 (18)2.3、设计数据池 (19)2.4、录入对象 (19)2.5、代码 (20)3、自动化框架 (20)3.1、框架结构 (20)3.2、函数功能模版:驱动程序 (21)3.3、流程图 (22)3.4、代码 (23)一、VBS1、wsh对象作用:WScript Shell的缩写,提供一个人机交互接口。
QTP自动化功能测试工具安装说明书
QTP自动化功能测试工具安装说明书整个安装过程共分为四个阶段:第一阶段:安装Microsoft .NET Framework2.0程序首先,在安装QTP测试工具之前,先在添加或删除程序中检查计算机中是否安装了Microsoft .NET Framework2.0程序,若已安装过,则跳过第一阶段,若未安装,则先安装Microsoft .NET Framework2.0程序,步骤如下:第一步,解压名为“dotnetfx”的压缩包,然后双击dotnetfx安装程序,出现Microsoft .NET Framework2.0安装程序界面如下:第二步,点击下一步,接受许可协议中的条款,然后点击安装:此过程可能需要二十多分钟,不要心急,请耐心等待……第三步,当出现如下界面:恭喜你,你经受住了时间的考验,成功安装了Microsoft .NET Framework2.0软件,点击完成。
第二阶段:安装Microsoft script Debugger调试器因为QTP是自动化功能测试工具,在后期的脚本开发的过程中需要用到调试器,所以安装文件建议我们安装此Microsoft script Debugger调试器。
其安装步骤如下:第一步,解压QTP测试工具调研文件包里的名为“WindowsScriptDebugger”的压缩包,然后双击“scd10chs.exe”,单击是,安装Microsoft script Debugger调试器并接受协议,出现如下界面:建议采用默认路径,安装在C盘,点击确定,出现如下界面:安装界面消失,表明安装成功!第三阶段:安装Quicktest Professional测试工具进入此次安装最核心的阶段,成败在此一举,请大家千万小心,避免“一着不慎,满盘皆输”的局面。
其安装步骤如下:第一步,解压QTP测试工具调研文件包里的名为“qtp92”的压缩包。
第二步,打开刚解压出来的“安装重要说明(获取免费)”记事本,复制里面的安装填序列号: 0123-2820602186第三步,打开刚解压出来的“QTP92”文件包,双击安装QTP的.exe 程序:出现如下界面:选择第一项,Quicktest Professional安装程序,执行安装程序,出现如下界面:选择接受协议中的条款,单击“是”,进入下一步,此处,用户名和公司名采取默认,若缺少公司名,建议填写“ntc”,维护号就是先前复制的序列号,这里直接按“Ctril+V”粘贴进去即可,点击下一步,点击“是”,进入下一步,采取默认,点击下一步,建议采取默认,点击下一步,采取默认,点击下一步,这里建议将Quicktest Professional安装在C盘,一来为了后续安装步骤简便,马上你们就会体会到,二来510M的安装空间不算大,可以接受。
QTP基本讲解PPT
02
测试用例设计
设计针对用户名和密码输入、验证码 验证等环节的测试用例,确保登录功 能正常工作。
03
测试环境搭建
设置模拟用户名和密码,以及模拟的 验证码图片,为测试提供必要的环境。
测试结果分析
根据测试结果,判断登录功能是否存 在问题,并给出相应的改进建议。
05
04
测试执行
通过QTP录制和回放功能,自动执行 登录操作,检查是否能够成功登录系 统。
总结词
在QTP(Quick Test Professional)测试过程中,有时会遇到无法识别对象的问题,导致测试无法正常进 行。
详细描述
无法识别对象的原因可能包括:对象名称错误、对象在运行时动态改变、对象在测试运行期间不可见 等。解决方案包括:确保对象名称正确、使用相对路径和属性来定位对象、确保对象在测试运行期间 可见等。
安装插件
根据需要安装QTP插件,如.NET插 件、Java插件等,以扩展QTP的功 能。
创建测试脚本
打开QTP
启动QTP应用程序。
新建测试脚本
选择“File”菜单中的“New”选项 ,选择测试脚本类型,如VBScript或 JavaScript。
录制测试
在录制模式下,执行测试场景或操作, QTP会自动生成测试脚本代码。
QTP基本讲解
目录
• QTP简介 • QTP基本功能 • QTP使用方法 • QTP常见问题与解决方案 • QTP案例分享
01
QTP简介
QTP的含义
QTP是Quick Test Professional 的缩写,意为快速测试专业版,
是一种自动化测试工具。
它通过模拟用户操作,对应用程 序进行功能测试和回归测试,以 验证应用程序的功能是否正常。
自动化功能测试和QTP-安装和介绍v
QTP包含多个模块,如测试管理模块 、测试设计模块、测试执行模块和测 试报告模块等。
QTP的安装与配置
安装
安装QTP需要先安装Visual Studio,然后从HP官网下载并安装 QTP。
配置
配置QTP需要设置环境变量、添加测试框架和测试库等步骤。
注意事项
在安装和配置过程中,需要注意版本兼容性和系统要求等问题。
QTP使用VBScript作为脚本语言,相对较为简单易学。
QTP与Selenium的比较
• 测试对象识别:QTP使用对象识别技术,能够快速准确地识 别测试对象。
QTP与Selenium的比较
01
02
03
支持平台
Selenium主要针对Web 应用程序,跨平台支持不 如QTP广泛。
测试脚本语言
Selenium使用多种语言, 包括Java、Python、C# 等,选择多样。
利用AI和机器学习技术,自动化测试能够更智能地识别和预测缺陷, 提高测试效率和准确性。
跨平台和跨浏览器测试
随着多平台和多浏览器应用的普及,自动化测试将更加注重跨平台和 跨浏览器的兼容性测试。
测试数据管理和测试环境自动化
为了提高测试的可靠性和一致性,自动化测试将更加注重测试数据管 理和测试环境的自动化。
02
自动化测试的重要性在于提高测 试效率、减少人工错误、降低测 试成本以及缩短产品上市时间。
自动化测试的适用场景与优势
适用场景
适用于对大量数据进行测试、重 复性高的测试、回归测试以及需 要24小时不间断测试的场景。
优势
提高测试效率、减少人为错误、 可模拟大量用户操作、提高测试 覆盖率等。
自动化测试的流程与工具
QTP的未来展望
基于QTP功能自动化测试工具及框架研究
基于QTP 功能自动化测试工具及框架研究王兴野i,,3(1.煤炭科学技术研究院有限公司,北京100013;2.煤炭资源高效开采与洁净利用国家重点实验室,北京100013;3.北京市煤矿安全工程技术研究中心,北京100013)摘要:分析了自动化检测工具基本理论,探讨了 QTP 功能自动化工具和框架。
QTP 自动化测试框架 是二次开发的Quick Test Professional 得到的框架工具,回归测试可以在Web 软件上完成,结合对象识 别、关键字、数据驱动等技术,对框架业务层面可以实现测试功能。
针对自动化测试工具,分析了相关 流程中框架使用情况。
关键词:自动化测试框架;QTP 框架;驱动技术随着互联网技术的发展,开始出现软件开发行业, 人们对软件测试相关技术也有了更高的要求。
自动化软 件测试技术的出现,为传统的软件测试提供了很大帮 助,节省了更多的人力和财力,同时也提高了软件测试 的质量,缩短了软件发布周期[1-2]。
所以,将会根据QTP 对自动化测试框架在软件测试中的使用进行分析,探讨 该测试工具的使用价值。
1自动化软件测试工作流程一般人们会认为软件测试工具,都是对运作的机械进行分析完成测试。
在实际进行软件测试中,需要借助 软件实现操作,整个测试过程是相对独立的,包括设计 测试用例、执行和评估测试、制定测试计划、开发自动 化测试等内容,每个环节都有对应的方法和自动化工 具。
相比软件测试流程,自动化软件测试比较重视测试 准备数据和脚本开发。
相关流程如图1所示。
a图1自动化测试工作流程1.1制定测试计划根据测试整个环节建立软件计划测试完成设计,之 后分析产品的文档内容和其他有关信息,之后再进行风 险测试、范围测试并给予评估,确定测试场景,科学计划进程,满足实际需求,建立满足测试需求和具有测试 对策的计划。
建立测试计划需要利用软件中的协议、技 术分析需要选择哪种测试对策和方法,以及选择什么样 的测试工具,实现软件性能的自动化测试[3-]。
QTP自动化测试讲义
QTP课程笔记QTP介绍知识点HP QuickTest Professional是一款先进的自动化测试解决方案,用于创建功能和回归测试。
它自动捕获、验证和重放用户的交互行为。
通过QTP可以测试标准的Windows Applications、Web对象、ActiveX控件和Visual Basic应用程序。
我们还可以获得其他的QTP加载项以便用于许多特殊的环境,例如Java、Oracle、SAP解决方案、.NET Windows以及Web Forms、Siebel、PeopleSoft、Web服务和终端仿真应用程序。
QTP通过录制在应用程序中执行的操作,可以方便地创建测试和业务组件。
测试和业务组件是两种不同类型的文档,可用于测试您的应用程序或网站是否按预期工作。
示例演示程序采用QTP自带的Flight程序,生成一张新的订单。
QTP程序的结构知识点录制选项的含义:为了提高脚本的可移植性,建议两边都选最上面如果开始录制时没有弹出该窗口,可以利用菜单Automation/Record and Run Setting来启动由QTP自己打开的程序:如果选中该选项,则第一次录制时QTP只会生成启动程序的脚本,而不会录制后续的动作。
快捷方式的程序是否录制:通过快捷方式启动程序程序的动作也能够录制下来。
指定要录制的程序:开始录制后自动启动指定的程序VC QTP工程project TEST模块module Action函数function Sub/Function到TEST目录的Action1下面打开文件Script.mts,可以看到录制的代码QTP脚本的特点:1、脚本回放成功需要:代码(脚本)+ 对象(在对象库中有记录相关对象的信息)2、脚本语法:对象类型(“对象名称”).方法参数1,参数2,…由QTP打开程序,有几种方法:1、SystemUtil.Run ' SystemUtil对象的Run方法SystemUtil.Run "D:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe"参数示例:file :"D:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe" params:""op:"D:\Program Files\HP\QuickTest Professional\samples\flight\app\"mdoe:"open"SystemUtil.Run "D:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe", "" ," D:\Program Files\HP\QuickTest Professional\samples\flight\app\", "open"2、InvokeApplication ' 调用程序函数InvokeApplication "D:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe"3、WSH ' 通过wsh对象的Run(bat)或者exec(exe)方法Dim oWSHSet oWSH = CreateObject("WScript.shell")oWSH.exec "D:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe"Set oWSH = nothingDim oWSHSet oWSH = CreateObject("WScript.shell")oWSH.run " E:\WORK\Projects\3.bat"Set oWSH = nothing参照文章:/?uid-35-action-viewspace-itemid-133315为确保脚本移植性,可以引入环境变量,例如:SystemUtil.Run Environment.Value("ProductDir") & "\samples\flight\app\flight4a.exe" Environment.Value("ProductDir"):QTP产品所安装的路径Environment.Value("TestDir"):工程(TEST)所在的路径可使用下面的语句来检查:msgbox environment("ProductDir")msgbox environment("TestDir")示例以下结合err对象和on error resume next语句做例子:On Error Resume Next'On error goto 0Dim bFlagbFlag = CBool(bFlag)bFlag = InvokeApplication ("C:\win2000-calc11111.exe")msgbox bFlagIf err.number<>0 Thenmsgbox err.descriptionerr.clearEnd IfQTP的对象识别原理知识点举例:找关羽!依据的是这个人的特征,而不是人名,人名是有重复的。
QTP自动化测试教程
自动化测试新手上路一、初识庐山真面目自动化测试离不开工具,我们首推测试界声名显赫的“QuickTest Professional 10.0”,简称QTP。
至于推荐他的理由,大家可以到网上一搜便知。
1、安装QTP首先第一个环节便是介绍:如何安装这个让人爱不释手的工具—QTP。
1、找到工具:途径有两个,一个是拿着U盘找安装过的同事copy;另一个是到测试部共享的工具服务器上下载,地址:\\10.1.145.152\测试部\Tools,文件名为:QTP10安装文件.rar。
推荐,第一个途径,能够又快又准确的找到你想得到的东西,并且在联络感情之余可以随便请教安装与试用之道,当然这一定要看当事人是否有这个时间。
如果人家没有这个时间也别急,请耐心看完此文档。
2、检查安装环境:a)C盘空间:因为我们推荐将QTP安装在C盘,所以请检查C盘是否有足够的空间,安装完的QTP大概640M左右。
b)是否有病毒:建议杀一下病毒,之前有同事因为病毒安装不成功的案例。
c)暂时关掉某些杀毒软件:例如已知的杀毒软件“诺顿”、“卡巴斯基”。
原因是这两个杀毒软件会将我们的特别文件当做病毒给杀掉,无法顺利安装试用QTP。
d)检查IE版本:理论上QTP是支持IE6、7、8的,但IE8需要另下补丁,IE7也遇到一些不可理喻的问题,所以在安装QTP之前烦请将IE7或8卸载,降至IE6。
3、开始安装。
得到安装文件后,解压,点击“”,一路下一步,注意:开始有一个步骤需要安装QTP需要的组件,一个是“.net framework 2.0”和一个关于C++的东西,不能跳过,必须安装。
直到见到如“图一”的页面,停下来确认是否能够上外网。
最好是能够联网安装,因为这一步有一个“下载并安装脚本调试器”,由于不明确这个调试器是个什么东西,也就没找到相关的安装包。
不安装此调试器的直接后果是,无法调试你编的QTP脚本,很麻烦。
图一:其他安装需求如果实在不能联网安装,则将“下载并安装脚本调试器”前面的复选框取消勾选即可以继续安装,待能够上外网的时候再说(重新打开此页面的位置在:开始→程序→QuickTest Professional→Tools→Additional Installation Requirments),其他三项必须保留选中,然后点击【运行】按钮。
使用automation object model进行QTP自动化编程
1.介绍使用QTP的automation object model,可以对QTP进行自动化编程,从而自动对QTP进行选项设置、自动运行测试(或组件),而无需使用QTP界面手工进行这些操作。
如果要重复多次的完成同一项工作任务,或重复多次运行同一测试(或组件),或需要快速配置QTP选项,则QTP的自动化编程是非常有用的。
本部分内容包括:自动化QTP操作决定什么时候使用QTP自动化编程选择设计或运行自动化程序的语言与开发环境了解自动化程序的基本元素创建自动化程序脚本1.1.自动化QTP操作使用QTP的Automation Object Model进行自动化编程,实现QTP操作的自动化。
QTP的Automation Object Model提供了objects、methods、以及properties,使我们可以在其它的应用程序中控制QTP的操作。
1.2.决定什么时候使用QTP自动化编程就象我们使用QTP设计测试(或组件),创建一个有用的自动化程序也需要一个计划、设计、测试的过程。
下面是几个实用的QTP自动化编程的例子:●Initializtion programs(初始化编程)-你可以编写一个程序,来自动地启动QTP,配置操作选项及录制设定。
●Maintaining your tests or components(维护测试或组件)-你可以编写一个程序,作用于一系列已有的测试或组件上,以统一达到某一目的。
例如:⏹Updating values-使用合适的插件环境打开每个测试或组件,并以update的模式运行它(当然必须对应相应的已升级的被测应用程序),然后保存测试或组件以保存更新后的值。
⏹Applying new options to existing tests of components(对已有的测试或组件应用新的操作选项)-当QTP版本升级以后,你可能发现有某些新的选项设置可应用到当前已有的测试或组件中。
按是否手工执行测试的角度划分:手工测试、自动化测试
按是否⼿⼯执⾏测试的⾓度划分:⼿⼯测试、⾃动化测试1.⼿⼯测试(Manual testing)⼿⼯测试是由⼈⼀个⼀个的输⼊⽤例,然后观察结果,和机器测试相对应,属于⽐较原始但是必须的⼀个步骤。
由专门的测试⼈员从⽤户视⾓来验证软件是否满⾜设计要求的⾏为。
更适⽤针对深度的测试和强调主观判断的测试⽐如:众包测试和探索式测试优点:⾃动化测试⽆法代替探索性测试、发散思维类⽆既定结果的测试。
缺点:执⾏效率慢,量⼤易错。
2.⾃动化测试(Automation Testing)定义所谓⾃动化测试,就是在预设条件下运⾏系统或应⽤程序,评估运⾏结果。
(预先条件包括:正常条件和异常条件)。
简单来说,⾃动化测试就是是把⼈为驱动的测试⾏为,转化为机器执⾏的⼀种过程。
通常,在设计了测试⽤例并通过评审之后,由测试⼈员根据测试⽤例中描述的规程⼀步步执⾏测试,得到实际结果与期望结果的⽐较。
在此过程中,为了节省⼈⼒、时间或硬件资源,提⾼测试效率,便引⼊了⾃动化测试的概念。
分类⾃动化测试有:功能测试⾃动化、性能测试⾃动化、安全测试⾃动化。
(⼀般情况下,我们说的⾃动化是指功能测试的⾃动化)⾃动化测试按照测试对象来分,还可以分为接⼝测试、UI测试等。
接⼝测试的ROI(产出投⼊⽐)要⽐UI测试⾼。
优点缺点适⽤范围⾃动化测试可以涉及和试⽤的范围主要在以下⽅⾯:基于Web UI的浏览器应⽤的界⾯测试基于WebService或者WebAPI的服务契约测试基于WCF、.net remoting、Spring等框架的服务的集成测试基于APP UI的移动应⽤界⾯测试基于Java、C#等编程⽂件进⾏的单元测试前提条件实施⾃动化测试之前需要对软件开发过程进⾏分析,以观察其是否适合使⽤⾃动化测试。
通常需要同时满⾜以下条件:1) 需求变动不频繁;测试脚本的稳定性决定了⾃动化测试的维护成本。
如果软件需求变动过于频繁,测试⼈员需要根据变动的需求来更新测试⽤例以及相关的测试脚本,⽽脚本的维护本⾝就是⼀个代码开发的过程,需要修改、调试,必要的时候还要修改⾃动化测试的框架,如果所花费的成本不低于利⽤其节省的测试成本,那么⾃动化测试便是失败的。
QTP自动化测试脚本
QTP自动化测试脚本'************************************************************ ' S.A.F.F.R.O.N. Prototype 1.1'' Simple Automation Framework For Remarkably Obvious Notes ' Copyright ? 2006 Mercury Interactive Corporation '' Notes:'' Requires QuickTest Professional 9.1'' Author : Adam Gensler' Created : July 12, 2006' Last Updated : September 11, 2006'' This prototype framework is provided AS IS, and is meant ' to be used for instructional purposes.'' This framework is a prototype, and is not supported ' by Mercury Interactive.''************************************************************ initialized = falsethirdlevel = ""level = ""desc = ""object = ""objectDescription = ""levelsubdescriptiondelimiter = ","leveldescdelimiter = "|"objectdelimiter = "|"leveldelimiter = "|"objectsDescriptiondelimiter = "|"webLevels = "Browser|Page|Frame"webLevelsDesc = "micclass:=Browser|micclass:=Page|micclass:=Frame|" ' 扩展对Image,WebRadioGroup对象的支持objects ="Link|WebButton|WebList|WebEdit|Image|WebElement|WebCheckBox|WebRadi oGroup|"objectsDescription ="micclass:=Link|micclass:=WebButton|micclass:=WebList|micclass:=WebE dit|micclass:=Image|micclass:=WebElement|micclass:=WebCheckBox|micclass:=WebRadi oGroup|"' Generates a generic description based up on the "level" viarable ' levelstr - will be one of the values that is in the level array ' returns - string representative of the object hierarchy Public Function GenerateDescription (levelstr)l = IndexOf(level, levelstr)If l >=0 Thenfdesc = level(0) & "(" & Quote(desc(0)) & ")."If l >= 1 Thenfdesc = fdesc + level(1) & "(" & Quote(desc(1)) & ")."If 2 >= l ThenIf thirdlevel <> "" Thenfdesc = fdesc + level(2) & "(" & Quote(desc(2)) & "," &Quote("name:=" & thirdlevel) & ")."End IfEnd IfEnd IfEnd IfGenerateDescription = fdescEnd Function' Generates an object description based upon the object, and objectDescription arrays' obj - name of the object in the object array ' prop - additional property to help uniquely identify the object ' returns - a string representative of the object description Public Function GenerateObjectDescription (obj, prop)i = IndexOf(object, obj)ndesc = ""If i <> -1 Thenndesc = obj & "(" & Quote(objectDescription(i)) & "," & Quote(prop)& ")."End IfGenerateobjectDescription = ndescEnd Function' given an array, returns the index of the value to search for ' ary- an array' str - value to search for in an array' returns - index in arrayPublic Function IndexOf (ary, str)val = -1For i = 0 to UBound(ary)If ary(i) = str Thenval = iEnd IfNextIndexOf = valEnd Function' configures framework to work within the context of a specificframe ' val - the Name of the frame to work within -- use Object Spy if you don't ' already know the frame namePublic Function WorkInFrame (val)Report micPass, "Enter Frame", "Entered scope of frame " & Quote(val) thirdlevel = valEnd Function' configures the framework to work outside the context of a specific frame Public Function StopWorkingInFrameReport micPass, "Exit Frame", "Exited scope of frame " &Quote(thirdlevel)thirdlevel = ""End Function' generates a string with embedded/surrounding quotesPublic Function Quote (txt)Quote = chr(34) & txt & chr(34)End Function' navigate to a site if the browser is already opened, otherwise run initialization打开指定URLPublic Function BrowseTo (url)thirdlevel = ""Report micPass, "Navigate to URL", "Navigating to URL: " & Quote(url) If initialized ThenExecute GenerateDescription("Browser") & "Navigate " & Quote(url)ElseLaunch "website", urlEnd IfReporter.Filter = rfDisableAllEnd Function' waits for the web page to finish loading等待WEB页面打开完全后再继续执行程序Public Function AutoSyncExecute GenerateDescription("Browser") & "Sync"End Function' close all opened browsers关闭页面Public Function CloseBrowsersIf Browser("micclass:=Browser").Exist (0) ThenBrowser("micclass:=Browser").CloseEnd IfWhile Browser("micclass:=Browser", "index:=1").Exist (0)Browser("index:=1").CloseWendIf Browser("micclass:=Browser").Exist (0) ThenBrowser("micclass:=Browser").CloseEnd IfEnd Function' prepares the framework for usage, and configures all internal framework' variables and structures' apptype - used to launch different types of applications based ' upon different technologies -- currently there is only web ' val - string that represents what to launch ' returns - always returns true Public Function Launch (apptype, val)If "website" = apptype Thenthirdlevel = ""Report micPass, "Initialize", "Initializing Framework"level = split(webLevels, leveldelimiter, -1, 1)desc = split(webLevelsDesc, leveldescdelimiter, -1, 1)object = split(objects, objectdelimiter, -1, 1)objectDescription = split(objectsDescription, objectsDescriptiondelimiter,-1, 1)CloseBrowsersSet IE = CreateObject("InternetExplorer.Application")IE.visible = trueIE.Navigate valWhile IE.Busywait 1WendEnd Ifinitialized = trueLaunch = trueEnd Function' Verify the Existence of an object' objtype - values should be limited to values in the object array ' text - multi-purpose argument that indicates what to verify ' - for a link, or button, it's the text of the control ' - for a list, it's thename of the control ' - for a frame, it's the name of the frame Public Function Verify (objtype, text)rval = falselocalDesc = ""estr = ""If thirdlevel <> "" ThenlocalDesc = GenerateDescription(level(2))ElselocalDesc = GenerateDescription(level(1))End IfAutoSync()Select Case objtypeCase "Page"Execute "rval = " & GenerateDescription(level(1)) & "Exist (0)"If rval ThenExecute "title = " & GenerateDescription(level(1)) & "GetROProperty(" & Quote("title") & ")"If title = text Thenrval = trueElserval = falseEnd IfEnd IfCase "CurrentFrame"If thirdlevel <> "" Thenestr = "rval = " & localDescEnd IfCase "Link"estr = "rval = " & localDesc & GenerateObjectDescription("Link", "innertext:=" & text)Case "WebButton"estr = "rval = " & localDesc & GenerateObjectDescription("WebButton", "value:=" & text)Case "WebList"estr = "rval = " & localDesc & GenerateObjectDescription("WebList", "name:=" & text)Case "WebEdit"estr = "rval = " & localDesc & GenerateObjectDescription("WebEdit", "name:=" & text)End SelectIf estr <> "" ThenExecute estr + "Exist (0)"End IfIf rval ThenReport micPass, objtype & " Verification", "The " & objtype & " " & Quote(text)& " was verified to exist"ElseReport micFail, objtype & " Verification", "The " & objtype & " " & Quote(text) & " was not found"End IfIf "True" = rval Thenrval = TrueElserval = FalseEnd IfVerify = rvalEnd Function' Activates an object based upon its object type' objtype - the type of object should be limited to values in the object array ' text - identifying text for the control - for a link,it's the text of the link Public Function Activate (objtype, text) localDesc = ""If thirdlevel <> "" ThenlocalDesc = GenerateDescription(level(2))ElselocalDesc = GenerateDescription(level(1))End IfAutoSync()Select Case objtypeCase "Link"Execute localDesc & GenerateObjectDescription("Link","innertext:=" & text) & "Click"Report micPass, "Link Activation", "The Link " & Quote(text) & " was clicked."Case "WebButton"Execute localDesc & GenerateObjectDescription("WebButton", "value:=" & text) & "Click"Report micPass, "WebButton Activation", "The WebButton " &Quote(text) & " was clicked."' 扩展对Image类型的按钮的支持Case "Image"Execute localDesc & GenerateObjectDescription("Image", "name:=" & text) & "Click"Report micPass, "ImageButton Activation", "The ImageButton" &Quote(text) & " was clicked."'扩展对WebCheckBOX选中或撤销选中支持Case "WebCheckBox"Execute "texts = " & localDesc &GenerateObjectDescription("WebCheckBox","name:=" & text) & "GetROProperty (" &Quote("checked") & ")"If texts=0 ThenExecute localDesc & GenerateObjectDescription("WebCheckBox","name:=" &text) & "Set"&Quote("ON")ElseExecute localDesc & GenerateObjectDescription("WebCheckBox","name:=" &text) & "Set"&Quote("OFF")End IfReport micPass, "WebCheckBox Activation", "The WebCheckBox " & Quote(text)& " was clicked."End SelectEnd Function'判断WebCheckBox当前状态,如果是0则位选中,1为选中Public Function isWebchecked(text)localDesc = ""If thirdlevel <> "" ThenlocalDesc = GenerateDescription(level(2))ElselocalDesc = GenerateDescription(level(1))End IfAutoSync()Execute "texts = " & localDesc &GenerateObjectDescription("WebCheckBox","name:=" & text) & "GetROProperty (" &Quote("checked") & ")"isWebchecked=textsEnd Function'根据Index:=N的值进行Click,目前只实现了WebCheckBoxPublic Function ActivateForIndex(objtype,i)localDesc = ""If thirdlevel <> "" ThenlocalDesc = GenerateDescription(level(2))ElselocalDesc = GenerateDescription(level(1))End IfAutoSync()Execute "texts = " & localDesc &GenerateObjectDescription("WebCheckBox","index:=" & i) & "GetROProperty (" & Quote("checked") & ")"If texts=0 ThenExecute localDesc &GenerateObjectDescription("WebCheckBox","index:=" & i) &"Set"&Quote("ON")ElseExecute localDesc &GenerateObjectDescription("WebCheckBox","index:=" & i) &"Set"&Quote("OFF")End IfReport micPass, "WebCheckBox Activation", "The WebCheckBox " & Quote(i) & " was clicked."End Function'点击WebRadioGroup'value 为WebRadioGroup Value'index 为单选框索引,从0开始Public Function ActivateWebRadioGroup(value,i)localDesc = ""If thirdlevel <> "" ThenlocalDesc = GenerateDescription(level(2))ElselocalDesc = GenerateDescription(level(1))End IfAutoSync()Execute localDesc &GenerateObjectDescription("WebRadioGroup","Value:=" & value) & "Select (" & Quote("#"&i) & ")"Report micPass, "WebRadioGroup Activation", "The WebCheckBox "&Quote(value)&"的"& Quote(i) & " was clicked."End Function' Selects a specific value from a listbox, or combobox' objname - name of the control -- use Object Spy if you don't know the name property ' text - the item in the combobox to select Public Function SelectFromList (objname, text)localDesc = ""rv = ""rval = falseIf thirdlevel <> "" ThenlocalDesc = GenerateDescription(level(2))ElselocalDesc = GenerateDescription(level(1))End IfAutoSync()localDesc = localdesc & GenerateObjectDescription("WebList", "name:=" &objname)Execute "cnt = " & localDesc & "GetROProperty(" & Quote("items count") & ")"For i = 1 to cntExecute "rv = " & localDesc & "GetItem (" & i & ")"If rv = text Thenrval = trueEnd IfNextIf rval ThenExecute localDesc & "Select " & Quote(text)End IfIf rval ThenReport micPass, "WebList Selection", "The WebList item " &Quote(text) & "was selected."ElseReport micFail, "WebList Selection", "The WebList item " &Quote(text) & "was NOT found."End IfSelectFromList = rvalEnd Function' Enters text into an edit field' objname - name of the control -- use Object Spy if you don't know what it is' text - the text to enter into the control Public Function EnterTextIn (objname, text)localDesc = ""rval = trueIf thirdlevel <> "" ThenlocalDesc = GenerateDescription(level(2))ElselocalDesc = GenerateDescription(level(1))End IfAutoSync()localDesc = localdesc & GenerateObjectDescription("WebEdit", "name:=" &objname)Execute localDesc & "Set (" & Quote(text) & ")"Report micPass, "Enter Text", "Text: " & Quote(text) & " was entered into " &Quote(objname)EnterTextIn = rvalEnd Function'根据index给指定WebEdit赋值Public Function EnterTextInI (text,i)localDesc = ""rval = trueIf thirdlevel <> "" ThenlocalDesc = GenerateDescription(level(2))ElselocalDesc = GenerateDescription(level(1))End IfAutoSync()localDesc = localdesc&"WebEdit("&Quote("micclass:=WebEdit")&","&Quote("index:="&i)&")."Execute localDesc & "Set (" & Quote(text) & ")"Report micPass, "Enter Text", "Text: " & Quote(text) & " was entered into " &Quote(objname)EnterTextIn = rvalEnd Function' Obtains text from a control' objtype - is the type of control the get the text from ' objname - is the name of the control -- use Object Spy if you don't know the name ' returns - the text of the controlPublic Function GetTextFrom (objtype, objname)text = ""localDesc = ""If thirdlevel <> "" ThenlocalDesc = GenerateDescription(level(2))ElselocalDesc = GenerateDescription(level(1))End IfAutoSync()Select Case objtypeCase "WebEdit"Execute "text = " & localDesc & GenerateObjectDescription("WebEdit", "name:=" & objname) & "GetROProperty (" & Quote("value") & ")"Case "WebList"Execute "text = " & localDesc & GenerateObjectDescription("WebList", "name:=" & objname) & "GetROProperty (" & Quote("value") & ")"End SelectReport micPass, "Capture Text", "Text: " & Quote(text) & " was captured from thecontrol " & Quote(objname)GetTextFrom = textEnd Function'获取DIV中WebElement的值'classNames,DIV 的Class值。
QTP的基础设置
QTP的基础设置一.Automation>>Record and Run Settings (1)二.File>>settings... . (2)三.接下来tools>>options (10)四.tools>>Editor Options (16)五.Tools>>Object Identification:对象识别 (20)六.tools>>Web Event Recording Configuration:web事件录制配置 (21)一.Automation>>Record and Run Settings第一个选项卡>>web:测试web程序(Web选项卡仅当相应的Web插件安装和加载后才会自动生成)Record and run test on any open browser:录制已经打开的浏览器(QTP所支持的)Open the following address when a record or run session begins:指定QuickTest打开新的浏览器并只使用指定的URL地址。
(输入浏览器地址)Open the following browser when a run session begins:指定浏览器Do not record and run on browsers that are already open:不要录制已经打开的浏览器Close the browser when the test closes:录制结束时,自动关闭程序启动的浏览器第二个选项卡>>Windows applications:测试运行在Windows上的应用,包括标准Windows,Visual Basic和ActiveX的应用程序Record and run test on any open Windows-based application:录制已经打开的应用程序。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
QTP Automation Framework Document ControlRevision HistoryQTP Automation FrameworkTable of Contents1.INTRODUCTION __________________________________________________________ - 3 -1.1 QTP AUTOMATION FRAMEWORK ______________________________________ - 3 -2.REFERENCE _____________________________________________________________ - 3 -3.PURPOSE __________________________________________________ 错误!未定义书签。
3.1PURPOSE OF QTP AUTOMATION FRAMEWORK __________________________ - 3 -4.QTP AUTOMATION FRAMEWORK - FOLDER STRUCTURE __________________ - 3 -4.1DESCRIPTION _________________________________________________________ - 3 -4.2QA QTP automation FRAMEWORK - FOLDER STRUCTURE __________________ - 3 -5.QTP AUTOMATION FRAMEWORK – MULTI FUNCTION LIBRARY LAYER ____ - 4 -5.1DESCRIPTION _________________________________________________________ - 4 -5.2MULTIPLE FUNCTION LIBRARY LAYER _________________________________ - 5 -6.QTP AUTOMATION FRAMEWORK – TESTING DATA MANAGEMENT ________ - 5 -6.1DESCRIPTION _________________________________________________________ - 5 -6.2TEST DATA ___________________________________________________________ - 6 -6.3REPORTS _____________________________________________________________ - 6 -6.4SCREEN CAPTURE _____________________________________________________ - 6 -7.QTP AUTOMATION FRAMEWORK – QC INTEGRATION _____________________ - 6 -7.1DESCRIPTION _________________________________________________________ - 6 -7.2QC INTEGRATION STRUCTURE _________________________________________ - 7 -8.QTP AUTOMATION FRAMEWORK – WORK FLOW __________________________ - 7 -8.1DESCRIPTION _________________________________________________________ - 7 -8.2QTP AUTOMATION FRAMEWORK WORKFLOW __________________________ - 7 -QTP Automation Framework1. INTRODUCTION1.1 QTP AUTOMATION FRAMEWORKThis document outlines the QTP Automation Framework along with QC integration as a plus, which accommodates all AUTs (Application Under Test), BS/CS structure, or different technology, e.g. .Net, Web, VB, Java, C++, etc, which will be used by QA team.The framework structure defined in this document should be strictly followed because its internal function layer modulizes and optimizes the complex QTP codes implementation for various standard objects. It cuts down the automation engineer training cost, script developing efforts and maintenance cost as well. And it allows easy expanding for integration testing. 2. REFERENCE< QTP Coding Standard - PopVerifyFunction.doc>< QTP Coding Standard - ObjectRepositoryManagement.doc>< QTP Coding Standard - BestPractice.doc>3. PURPOSE3.1 PURPOSE OF QTP AUTOMATION FRAMEWORKThe purpose of this document is to introduce the QA QTP automation framework which categorized as below:∙QTP Automation Framework – Folder Structure∙QA QTP Automation Framework – Multiple Function Library Layer∙QA QTP Automation Framework – Testing Data Management∙QA QTP Automation Framework – QC Integration∙QA QTP Automation Framework – Work Flow4. QA QTP AUTOMATION FRAMEWORK - FOLDER STRUCTURE4.1 DESCRIPTIONAutomation folder structure defines the physical folder structure for categorizing all testing related data. The folder structure is defined as Generic structure. All scripts, function libraries, documents, log files, object repository, screen captures should be placed under corresponding directory.4.2 QA QTP AUTOMATION FRAMEWORK - FOLDER STRUCTUREAUTTest Case Test Case directory should be placed under the AUT (Application Under Test) folder and all the test scripts should be placed in this directory with the naming conventions.Test Data Data sheets for all scenarios and individual script should be placed under this directory with the naming conventions.Function Lib All user-defined, product-specific function libraries should be placed under this directory. Basically, two libraries for each AUT:<AUTName>_FunctionLib_Init.vbs<AUTName>_FunctionLib_Main.vbsScreen Capture All runtime screen captures recorded in test scripts should be stored in this directory, which will be used for post-execution reference and results analyse if necQAary.Object Repository All AUT related GUI objects should be placed here as shared object repository, which is used by all test script under Test Case directory. It can be just one .tsr file which contains all AUT GUI objects or multiple .tsr file which categorized by various modules or components for easy maintenance.Documents All testing configuration, execution, results analysing related instruction documents should be stored under this directory, e.g. script user guide, AUT configuration guideConfig File This is where QTP configuration script stores, by executing the Config script, the pre-defined QTP runtime settings will be automatically applied to the testing pc for testing execution, and the QTP Object Identification setting will be applied for script developing as well. It is very important to execute the Config script before developing and executing any test. However this is one-time configuration, which means one specific testing machine only needs to execute the Config script once at the very beginning as long as nobody manually change the QTP settings.Reports This directory contains all testing related report file, log file, etc, during the testing execution.Utilities All third-Party testing tools or self-developed tools used to assist QTP automated testing should be placed under this directory.Common Lib Generic LibLibraryFile_Generic.vbs (read-only)User defined generic functions, e.g. file system I/O functions,Excel read/write functions, string manipulate functions, etc StandardWinLibLibraryFile_StandardWindows.vbs (read-only)User defined functions for Microsoft Windows standardwindow objectsWeb LibLibraryFile_Web.vbs (read-only)User defined functions for Web objects.Net LibLibraryFile_NET.vbs (read-only)User defined functions for .Net objects5. QA QTP AUTOMATION FRAMEWORK – MULTIPLE FUNCTIONLIBRARY LAYER5.1 DESCRIPTIONThe test automation toolset needs to be treated like software development architecture, with reusable modules that exist as part of standard automation frame work.The multiple function library layer modulizes the basic functions for standard windows controls, standard .Net controls and standard Web controls and object-independent function library. And the AUT specific library layer is listed as well.5.2 MULTIPLE FUNCTION LIBRARY LAYERThere are two categories of function libraries: one is common function library which stores function libraries shared by all AUTs (under Common Lib folder). Another is AUT specific library which applies to one and only one specific AUT (under AUT folder).These two categories are defined by the Automation Folder Structure, which is called Physical Category.The function library layer here is defined by function call logic, which is called Logic Category. There are three layers (Logic Category) of function libraries which are defined in this framework.There are three layers of function library. The later one depends on previous one, e.g. Layer 3 depends on Layer 2 which depends on Layer 1.Layer 1:This is an independent function layer, in another word, it is NOT object-related.And it is the lowest layer which can be called by any other function library and can be used by any type of AUT.For example, file I/O functions, Excel manipulate functions, string compare functions, etc. Layer 2:This layer contains libraries for specific type of object, e.g. LibraryFile_Web.vbs defines the very basic methods/functions for Web app objects, for example, WebEdit, WebList, etc. And LibraryFile_StandardWin.vbs for standard windows objects, LibraryFile_Net.vbs for .Net objects. The functions/methods defined in this layer are registered for its own class, which means user can use context menu to browse and select the method during scripting in QTP. Layer 3:This layer is AUT specific function library, which means each AUT has its own init library and main library and it depends on its corresponding library in Layer 2, e.g. Retirement Studio is a .Net standard alone application, the user function defined in its corresponding main function library RetirementStudio_LibraryFile_Main.vbs will call methods defined inLibraryFile_Net.vbs.For each AUT, there are two function libraries in Layer 3, one is <AUT>_LibraryFile_Init.vbs, which defines AUT specific const, QTP option settings, etc. Another is<AUT>_LibraryFile_Main.vbs, which defines all the user defined functions for the AUT.6. QA QTP AUTOMATION FRAMEWORK – TESTING DATAMANAGEMENT6.1 DESCRIPTIONTest data management in the document includes all testing related input/output and log data structure and naming convention.Based on the Folder Structure, there are three directories used to store testing data: Test Case, Reports, Screen Capture.6.2 TEST DATAAll test input data should be placed under Test Data folder under its AUT directory using the same name as its test script name. It could be MS Excel file type or TXT file format or any other type. For example, a test script named “RS_DataStandardCheck001”, which is placed under Test Case folder, and its corresponding input data should named as“RS_DataStandardCheck001.xls” and placed under Test Data folder.A MS Excel file using the same name as the test script is required to store very basic testing info, e.g. Results (E_OK/E_ERROR), TimeStart, TimeEnd. This gives tester a brief idea of the testing result and the testing start and testing end time. Refer to below screenshot.If one particular test script it requires multiple input data files, then a sub folder should be created under Test Data folder using the same name as its test script. All the testing input files should be placed under this sub folder.6.3 REPORTSAll testing output data/log files should be placed under this folder. And the naming convention should be applied as well. (The output/log file should use the same name as test script and if multiple output files for single test script is required, need to create a sub folder under Reports folder using the same name as test script.)6.4 SCREEN CAPTUREThis folder is used to store all runtime screen captures which will be used as reference when test requires further analyze.As a standard of this framework, each AUT specific function will generate a runtime screen capture using the function name and it is stored in Screen Capture folder.As a standard workflow of this framework, a monthly or bi-monthly backup of this folder is required to archive all screen captures for future reference.7. QA QTP AUTOMATION FRAMEWORK – QC INTEGRATION7.1 DESCRIPTIONAs a test management tool, HP QC is well integrated with QTP. The automation test scripts, resources will be stored in QC Test Plan.QC Test Lab supports automation batch execution functionality as well as scheduled runner. Automation test scripts should be executed from QC, which makes all execution results history available in QC.Meanwhile QC auto-email notification feature will update the predefined users with the execution results as soon as it finishes execution.7.2 QC INTEGRATION STRUCTUREThe below chart shows the generic QC structure for one specific AUT.All items marked in dark blue are QC items which stores in QC database after user upload. For example, Test Scripts are stored in QC test plan, test set 20110304.1 is a user defined test set using build name and linked to related test scripts.All items marked in light blue are external resources which are required to execute the test from QC. For example Web Lib, this equals to LibraryFile_Web.vbs, which stores under Common Lib directory and will be called in AUT main library and be used in Test scripts.8. QA QTP AUTOMATION FRAMEWORK – WORK FLOW8.1 DESCRIPTIONThe workflow illustrates the relationship between different components/folders in this automation framework. Test script under Test Case folder will be the core of this workflow and rest of components will be directly or indirectly connected to Test Script.8.2 QA QTP AUTOMATION FRAMEWORK WORKFLOWDocuments and Config File affect Test Script indirectly (dash line) because they have no file or data will be called or used by Test Script. Refer to chapter 4.2 for detailed instruction on these two components.。