QTPLearnshare文档格式.docx

上传人:b****3 文档编号:15786337 上传时间:2022-11-16 格式:DOCX 页数:9 大小:26.65KB
下载 相关 举报
QTPLearnshare文档格式.docx_第1页
第1页 / 共9页
QTPLearnshare文档格式.docx_第2页
第2页 / 共9页
QTPLearnshare文档格式.docx_第3页
第3页 / 共9页
QTPLearnshare文档格式.docx_第4页
第4页 / 共9页
QTPLearnshare文档格式.docx_第5页
第5页 / 共9页
点击查看更多>>
下载资源
资源描述

QTPLearnshare文档格式.docx

《QTPLearnshare文档格式.docx》由会员分享,可在线阅读,更多相关《QTPLearnshare文档格式.docx(9页珍藏版)》请在冰豆网上搜索。

QTPLearnshare文档格式.docx

1.5QTPFunctions:

2AsimpleexampletouseQTPtorecordandruntestononewindows-basedapplication5

2.1Steps5

2.2Addnone-standardGUIobjecttolocalobjectRepositoriesinyouraction6

2.3ExportLocalObjecttofilesforusingbyotheraction6

2.4Createaself-definitionfunction6

3:

Debugthetestcodesandrunningsettings7

3.1Debug7

3.2RunthetestcaseswithBatchsize7

4QCandQTP7

4.1QC7

4.2QTPandQCtogethertorealizeautomaticteststructure7

4.3InstallQCandQTPthenlinktoeachother8

4.4QTPConnectstoQC8

5AdddifferentkindsofCheckpiontsintheteststeps8

6Data-driventestingway9

6.1StepsofData-driventesting9

6.2Asampleofhowtousedata-driventotestwindowsapplication9

7Key-wordsdriven9

7.1Whatiskey-wordsdriven9

7.2AsampleofhowtouseKey-worksdriventowritetestcase9

8QTPdescriptivedeveloping9

8.1WhyweneeddescriptivedevelopinginQTP9

8.2Howtousethewayofdescriptivedeveloping9

9使用QTP测试标准的windows对象10

9.1Howtousethedesktopobjects10

9.2SytemUtilobject10

9.3Howtousethepropertiesandsub-functionsofthestandardizedwidgets10

9.4Howtotestthestandardizedwidgets,10

10QTP测试脚本的开发10

11使用QTP测试Active对象10

12使用QTP测试VB对象10

13使用QTP测试标准Web对象10

14QTP插件技术10

15使用QTP.net10

16StorethetestreporttoQC10

17Changehistory10

1AutomatictestingschemeandQTP

Automatictestingisanactivitywhichneedsplananddesign.

a.Beforethedevelopmentofnewtestcode,youshouldknowwhatkindsoftestingschemeandalsowhatkindsofautomatictestingscriptsyouwanttochoose.

b.Youshouldtakecareofthe”time”,”workloadofmaintenance”,”complexity”,”resource”,”degreeofcoverage”,”thedegreeofstabilityforthecodesandrequirementoftheproduct”,”theinfluencetotheproject”----venture

c.Thewaysofhowtobuildtheautomatictestingcodes

1.linear

2.structuring

3.share

4.date-driven

5.key-wordsdriven

ThebackgroundofQTP?

d.QTP是HP公司花费45亿收购的美科利(MercuryInteractive)产品套件(suite)之一

e.QTP是继WR(winRunner)产品之后推出的以VBS(vbscripts)为内嵌语言的工具

f.QTP是一款用于功能测试的自动化测试工具

g.QTP可以和HP的QC产品协作进行自动化测试开发(BusinessprocessTesting)

h.QTP是一款容易掌握但价格很高的测试自动化工具

QTPTheory

a.基于GUI层面的测试和界面元素打交道,随着.NET3.0和Vista的发布,微软提供了一套崭新的Windows界面框架,名为“UIAutomation”,能在所有支持WindowsPresentationFoundation(WPF)的操作系统中使用。

QTP可以使用AutomationElement来访问控件属性。

QTP提供ObjectSpy功能把某个界面的基本属性列举出来。

针对不同的平台和语言编写的控件,QTP采用不同对象识别方法,他提供“ObjectIdentification”功能提供一个可供测试员调整的对象识别配置器。

b.QTPiscalledAdvancedKeyword-DrivenTesting(alsocalledTableDriventesting),他把测试脚本的编程工作分离出去,让那些没有编程技巧的人也能开发自动化测试脚本。

c.ThestructureofKeyword-Driventesting,实现关键字驱动主要依赖自动化框架,通过自动化框架,仅需要测试人员develop“table”and“keyword”.框架通过解释表格数据和关键字来执行测试脚本,驱动被测试的应用程序。

在关键字驱别测试中,被测试应用程序的功能被文档化为表格,用一步步的指令性语句来指导框架执行每个测试步骤。

这种方法可以让测试的创建和测试的维护阶段更加有效,并且保持结构的清晰,让测试脚本的可读性更强。

只需要熟练使用关键字视图的使用方法。

WhatisQTP?

d.QTP:

QuickTestprofessional

e.自带插件(Plug-in)

ActiveX,Database,StdWindows,TEA,VisualBasic,Web,XML

:

:

alinkofvbscriptintroduce

f.额外购买插件(paytobuy)

Java,DotNet,PeopleSoft,VisualAge,Siebel,Oracle,

QTPFunctions:

创建测试,(toexamine)检验数据,增强(enhancement)测试,运行测试,分析结果,维护测试。

支持windows2000,xp,server2003,Vista;

支持虚拟机vmware,Critrixmetaframepresentationserver;

默认对以下应用程序进行测试:

(standardized)标准windows应用程序,包括基于win32API和MFC的应用程序

Web页面

ActiveX控件

VisualBasic应用程序

在有插件的情况下支持的应用程序有:

JAVA,Oracle,SAP,.NET控件(.NETWindowsForm,.NETWebForm,WPF),Siebel,PeopleSoft,Web服务,终端仿真程序(TerminalEmulators)

2AsimpleexampletouseQTPtorecordandruntestononewindows-basedapplication

Steps

a.OpenQTP,andthencreateanewaction.Afterthat,clickthe“record”toolmenu.The“RecordandrunningsettingGUI”popsup.

b.Choosethe“windowsapplications”tab->

choosethe“recordandrunonlyon”radiobuttonandaddanapplicationwiththe“+”button.YoucouldusethedefaultexampleprovidedbyHPQTPinthe"

X:

\ProgramFiles\HP\QuickTestProfessional\samples\flight\app\flight3a.exe"

installationdirectory.

c.Finally,youcoulddooperationsintheflight3aGUIandyoucouldalsoseetheprocessbyusingKeywordViewandExpertview.

d.Youcanoutputsometestinformationtotestreportbychoosing“insertStep|report”,andyoucouldalsoinsert“Checkpoint”by“insertstandardcheckpoint”oranewstepby“insertstep|stepgenerator”inthekeywordview.

Addnone-standardGUIobjecttolocalobjectRepositoriesinyouraction

a.Clickthe“ObjectRepository”Toolmenuorusehot-key“Ctrl+R”

b.Whenthe“ObjectRepository-AllobjectRepository”GUIcomesup.Thenclick“Object->

addt

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 医药卫生 > 基础医学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1