TestComplete基础培训TestComplete简介•TestComplete是这几年测试工具领域异军突起的一款自动化测试工具,由AutomatedQA出品,这几年迅速发展,并且屡获大奖,例如最近就获得Jolt的08年度测试工具Productivity奖。•TestComplete的最大特点是支持VBScript、DelphiScript、JScript、C#Script、C++Script多种脚本语言,可以让测试人员选择自己熟悉的脚本语言进行自动化脚本的编写。•另外,TC支持.NET、Delphi、Java等流行语言和平台下的软件的自动化功能测试,支持WEB功能和性能测试,支持分布式测试、单元测试等多种测试方式。•与QTP、Robot等主流大牌厂商的自动化测试工具相比,TC的优势除了上面所说的,还有价格也是其主要竞争优势之一。安装•可到www.AutomatedQA.com下载TestComplete的最新版本。TC安装的要求-最小系统需求•IntelPentiumII400MHzorhigher(PentiumIII800MHzrecommended).•MicrosoftWindows98,WindowsME,Windows2000,WindowsXP(both32-bitand64-biteditions),WindowsVista(both32-bitand64-biteditions),WindowsServer2003(both32-bitand64-biteditions)orWindowsNT4.0withServicePack6orlater.•MicrosoftInternetExplorer5.0orlater.•Memory:128MBofRAM(256MBormorerecommended).•250MBharddiskspace.•VGAorhigherresolutionmonitor.•Mouseorotherpointingdevice.TC安装的要求-额外需求•TotestJavaOpenApplications,youmusthaveoneofthefollowingJavavirtualmachinesinstalledonyourcomputer:MSVM,build3309orlater.SunJDK(orJRE)v.1.1.8orlater.BEAJRockit5.0.•Totest.NETOpenApplications,theMicrosoft.NETFrameworkv.1.0.3705orlaterisrequired.•ToexecuteTestCompletetestsfromtestprojectscreatedinMicrosoftVisualStudio2005,MicrosoftVisualStudio2005TeamSuitever.8.0.50727.42orlaterorMicrosoftVisualStudio2005TeamEditionforSoftwareTestersver.8.0.50727.42orlaterarerequired.•ToinstallTestComplete’sMicrosoftVisualStudio2005TeamFoundationIntegrationpackage,MicrosoftVisualStudio2005TeamFoundationServerReleaseisrequired.•Toperformloadtestingofwebservers,MicrosoftWindows2000,WindowXP,WindowsVista,WindowsServer2003orWindowsNTwithServicePack6.0orlaterisrequired.Also,itisrecommendedthatyourcomputermeetsthefollowingrequirements:·MinimalConfigurationIntelPentiumIII800MHz256ofRAM(for300virtualusers)·RecommendedConfigurationIntelPentium43GHzwithHyperThreading1GbofRAMTestComplete支持的测试类型•ManualTesting(手工测试)•FunctionalTesting(功能测试)•UnitTesting(单元测试)•RegressionTesting(回归测试)•DistributedTesting(分布式测试)•HTTPPerformanceTesting(HTTP性能测试)白盒应用程序•TestCompletewillbeabletoautomaticallyseedeeplyinside.NETandJavaapplicationwithoutanychangestotheapplicationjustbecauseofthenatureofmetadatagenerationof.NETandJavaapplicationwhichareeasytoreflect.Reflectionistheabilitytoretrieveinternalobjects,properties,methodsandevents.SothesearealwayscalledWhiteBoxApplications..NET和Java程序是基于中间代码构建的,所以TC可以直接通过反射读取其中的内部对象、属性、方法和事件。•SomeApplicationsarewritteninC,C++orDelphi,theseapplicationsaremainlyBlackBoxapplicationsbutcouldbecompiledinsuchawaytoenablethemtobecomeWhiteBoxApplications.ThatwouldrequirecompilingwithDebuginformationenabledandtheinclusionofsomeTestCompletefilesintotheprojecttoenablereflectionofallprogrammetadata.C、C++、Delphi这类程序如果在编译时做相应的设置,则也可以变成WhiteBoxApplications.关于测试工具的各种原理,请参考第2章《自动化测试工具》创建Project•可通过ProjectWizard创建测试项目,其中ProjectItem包括:Events、HTTPLoadTesting、Low-LevelProcedureCollection、ManualTest、Script、Stores、UnitTest...