版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
第第页全面的自动化测试知识体系(ABOK)ccessfulintestautomationfirstrequiresanunderstandingofwhattestautomationis,andwhereitfitsintotheoveralltestinglifecycle.
Differencebetweensoftwaretestingandsoftwaretestautomation软件测试自动化与软件测试之间的区别
SoftwareTestingisadisciplineinwhichtestlogicisdesignedtobeimplementedbyahumanbeing.Asopposedto,SoftwareTestAutomationdesignsscriptlogicthatallowsthatmanualtestlogictobeimplementedbyatool.Anexpansionofthisconceptassertsthatsoftwaretestautomationinvolvestoolsupportforallaspectsofatestproject,notjustautomationoftestexecution.Withthatbeingsaid,asatestautomator,youshouldbeawareofallphasesofthetestinglifecycle,alongwithtoolsthatsupportthosephases.
TestToolAcquisitionandIntegration测试工具选购与整合
TheTestToolAcquisitionistheprocessofidentifyingthetoolgoalsandobjectives,makinganeffectivebusinesscaseandnarrowingdownagroupofcandidatetoolstotheselection(s)thatbestmeet(s)theorganizationalneeds.TestToolIntegrationis,conversely,theprocessofgraduallyaddressingtoolconsiderationsandwideningthetool’sacceptance,useandbenefits.Thevarioussourcesprovideextensivedirectionsonhowtoconductthetoolselectionandacquisitionprocess.Mostsourceswillagree,however,thatthisprocessshouldataminimumincludethefollowing:
Makingawell-informeddecisiontoautomate
Conductingatesttoolevaluation
Addressingtoolimplementationconsiderations
Pilotingthetoolimplementation
Often,organizationsarepushedintomakingadecisionabouttheintroductionorexpansionoftestautomationbasedontheabilitytobuyaspecificautomatedtesttool.It’simportanttoexpandyourvisiontobeabletoidentifyseveraloptions–bothcommercialandnon-commercial–andtobeknowledgeableonhowtoperformaneffectiveevaluationoftheseoptionssothatamoreinformeddecisioncanbemadeabouttestautomationimplementation.
AutomationBenefitsandMisconceptions自动化的益处与误解
Behindeverydecisiontointroducetestautomationisawidevarietyofstatedorimpliedgoalsandexpectationsforwhattheautomationmustaccomplish.Withoutaproperunderstandingofreasonabletestautomationgoals,theautomationeffortwillnotsurvive,andwillbedestinedtositontheproverbialshelfofyourtestorganization.Understandingtheimpactoftestautomationmeanshavingafirmgrasponthebenefitsoftestautomation,accompaniedbyanunderstandingofthecommonmisconceptionssurroundingtestautomation.BeingequippedwiththisknowledgehelpsaTestAutomatormoreeffectivelyimplementatestautomationeffort,“sell”theautomationtothepowers-that-bebypresentingandtrackingabusinesscase,andmanageeffort-endingmisconceptionsandunrealisticexpectationsheldbytheorganizationdecisionmakers.
AutomationReturn-on-Investment(ROI)自动化的ROI计算
Softwaretestautomationisaninvestmentintimeandmoney,andlikeanyinvestment,thestakeholders–normallymanagersorcustomers–areexpectingapositivereturnfromthatinvestment.Iftheirexpectationsarenotsufficientlymet,stakeholderswillprobablydiscontinuetheinvestinginautomation.Theinvestmentisjustifiedbyidentifyingthepotentialreturn-on-investment(ROI),aratioofbenefitstocosts.ThereareseveralapproachesforcalculatingROIincluding:
SimpleROICalculation–Apercentagecalculatedintermsofthemonetarysavingsthattestautomationprovides.
EfficiencyROICalculation–Examinestestautomationbenefitsintermsoftimethatissavedoncertainportionsofthetestingeffort.
RiskReductionROICalculation–Apercentagecalculatedintermsoftheincreasedqualitythatresultsfromtheincreasedtestcoverageprovidedtestautomation.
SkillCategory2:TestAutomationTypesandInterfaces测试自动化的类型和接口
TestAutomationTypes测试自动化的类型
Forsimplicitythedifferenttypesoftestautomation–functional(regression),unit,integration,performance,etc.–areoftenlumpedintoone‘testautomation’category.It’simportanttounderstandsomeofthebasicdifferencesamongthesedifferenttypes,evenifyoudon’tspecializeinallofthem,sothatyoucanspeakintelligentlyaboutthemwhenquestionedbymembersoftheorganization.Sinceallautomatorsareoften“paintedwiththesamebrush”,beingtotallyoblivioustobasicconceptsineachtypeofautomationcannegativelyimpactallautomationeffortsintheorganization.Inaddition,beingabletodisplayminimalknowledgeinvarioustypesofautomationmayprovidemanagementwithenoughconfidenceinyoutoallowyoutopilotanewautomationeffort,whichwouldhelpyoutoultimatelyexpandyourskills.
TestAutomationInterfaces测试自动化的接口
Themaininterfacesmadeavailableforapplicationautomationare:
CommandLineInterface命令行接口
ApplicationProgrammingInterface应用程序编程接口
GraphicalUserInterface图形用户界面
TheGraphicalUserInterfaceisprobablythemostpopularinterfaceforautomationimplementation,duetothefactifmorecloselysimulateshowausermightusethetool.TheCommandLineInterfaceandApplicationProgrammingInterface,however,areadvantagesgiventhefactthattheymakeitsimplertoimplementtestautomation.
SkillCategory3:AutomationTools自动化工具
Atestautomationprofessionalalsomustbepreparedtoprovideinsightintotoolsthatsupportallaspectsofthetestinglifecycle.Thisrequiresanunderstandingofthedifferenttypesandcategoriesoftoolsthatsupportthetestinglifecycle,aswellasthecriteriaforassessingthesedifferenttypesoftools.
Thesedifferenttypesoftoolsinclude:
SoftwareConfigurationManagementTools
Business/SystemModelingTools
RequirementsManagementTools
UnitTestingTools
TestManagementTools
DefectTrackingTools
CodeCoverageAnalyzerTools
FunctionalSystemTestAutomationTools
PerformanceSystemTestAutomationTools
SkillCategory4:TestAutomationFrameworks测试自动化框架
AutomationScope自动化的范围
Totalautomationcostiscomposedofbothdevelopmentcostsandmaintenancecosts.(自动化的成本由开发成本和维护成本组成)Astheautomationframeworkbecomesmoredefined,scriptingincreasesincomplexity.Whilethiscausesdevelopmentcoststoincrease,italsocausesmaintenancecoststodecrease.Asthescopewidens,maintenancebecomesincreasinglyimportant.(随着测试范围的扩大,维护成本变得重要起来)Also,asmaintenancebecomesincreasinglyimportant,theautomationframeworkmustbemoreadvancedinordertoreducetotalautomationcosts.Therefore,beforemakingadeterminationoftheframeworkthatwillbeusedfortestautomation,anevaluationmustbeconductedontheimpliedand/orstatedscopeoftheorganization’sautomationeffort.
RolesandResponsibilities角色和职责
Eachframeworktypewillhaveoneormoreofthefollowingrolesforcreationandimplementationoftheframework:
TeamLead测试主管
TestEngineer测试工程师
LeadAutomationArchitect自动化测试架构师
CrossCoverageCoordinator组织协调人员
AutomationEngineer(Automator)自动化测试工程师
Veryoften,onepersonmayholdmultipleroles.
FrameworkGenerations框架的发展
Overtheyears,automatedtestinghasevolved,becomingincreasinglydefinedandsophisticatedwitheachnewevolutionaryphase.Thisevolutionmaybediscussedintermsofthreegenerations:
·FirstGeneration–ThisgenerationiswhatthisbookreferstoastheCommonApproach.Itisprimarilydrivenbyrecordandplayback.第一代–录制回放
SecondGeneration–Thesecond-generationlearnsfromtheproblemsofthefirstgeneration.Itinvolvescreatingaframeworkinwhichtoautomatetests.Italsoincorporatestheconceptsoffunctionaldecomposition,whichsimplymeanscreatingmodularfunctionsforexecutingfundamentalactionsthatoccurintheexecutionofthetestsinagiventestbed.Theseactionsmaythenbecalleduponandexecutedindependentofoneanother.Thisgenerationalsomoregreatlyseparatestestdatafromautomationcode,throughgreateruseofparameterization.第二代–功能分解
·ThirdGeneration–Thethird-generationofautomationbuildsupontheconceptsofthesecondgeneration.Itstronglydependsonfunctionaldecomposition,butevaluatesthefunctionsatamuchhigherlevelofabstraction,sothatcodemaybereusedbytestswithinthesameapplication,andbytestsindifferentapplications.Thisisaccomplishedbyseparatingtestdataandspecificapplicationfunctionalityfromautomationcode.第三代–数据与代码分离
Duringthedesignphaseadeterminationmustbemadeaboutwhichgenerationwilldefineyourautomatedtestframework.
SkillCategory5:AutomationFrameworkDesign自动化框架设计
Theprocessofdesigninganautomatedtestframeworkisnotanexactscience.Itispossibletodefinitivelyidentifythedifferenttypesofframeworks,buttheprocessusedtoselectandimplementaparticularframeworkisalittlemoredifficulttopinpointinsuchawaythatmostoftheindustryexpertsagree.Themostimportantthinghowever,atthispointinautomationhistoryistoensurethatawellthoughtoutapproachbasedoncommon,successfullyimplementedindustrypracticesisusedandhonedwithinagivenorganization.Thisskillcategoryidentifiesanapproach,fromahighenoughlevelthatitwillfitwithwheretheITindustrycurrentlyisrelativetotestautomation,whilestillremaininglow-levelenoughtobeusefulforimplementation.Thisapproachinvolvesthefollowingsteps:
SelectingaFrameworkType选择框架类型
IdentifyingFrameworkComponents确定框架组成部分
IdentifyingFrameworkDirectoryStructure确定框架目录结构
DevelopingImplementationStandards建立实施标准
DevelopAutomatedTests开发自动化测试
SkillCategory6:AutomatedTestScriptConcepts自动化测试脚本思想
TestSelection测试用例选择
Choosingwhatandwhentoautomateinvolvesananalysisofthefollowing:
Automateitemsthataretediousformanualexecution,butrelativelyeasytoautomate.对于那些手工测试比较繁琐而又容易实现自动化的优先考虑自动化实现。
Itemsthatneedtobeexecutedoverandoveragain.对于那些需要重复又重复执行的测试用例实现自动化。
Itemsthatwillincreasecoveragebeyondwhatwillrealisticallybedonemanually对于那些能有效提高测试覆盖率的测试用例实现自动化。
Inaddition,thedecisiondependsonthegoalsoftheorganizationsuchascostgoals,efficiencygoals,andriskmitigationgoals.
AutomatedTestDesignandDevelopment自动化测试的设计和开发
Automatedtestdesignanddevelopmentaretieddirectlytotheinterfaceinwhichthetestswillbecreated,thewayqualityattributesareappliedatthetestlevel,theelementsthatarecommontoautomatedtests,andthestandardsusedforcreationoftests.
AutomatedTestExecution,AnalysisandReporting自动化测试的执行、分析和报告
Thebiggestitemstoaddressregardingtestexecutionare:
Howmanymachineswillbeusedforautomatedtestexecution
Errorhandling
Howtheresultsarereportedandanalyzed
SkillCategory7:QualityAttributeOptimization质量优化
Thiscategorydefinesvariousqualityattributesoftheautomatedtestsuiteandidentifieswaysofaddressingtheseattributesbasedonprioritiesandconstraintssurroundingeach.
ThefollowingaresomeQualityAttributesthatmaybeconsidered.
Maintainability
Portability
Flexibility
Robustness
Scalability
Reliability
Usability
Performance
SkillCategory8:ProgrammingConcepts编程思想
Whetheryouuseatoolwithascriptinglanguage,treestructureand/orkeywords,fundamentalprogrammingconceptsremainparamountineffectivelyautomatingtests,andincreasingthedistancethetestcancoverthroughincreasedsystemcoverageandtestflexibility.Conceptssuchasvariables,controlflowstatements(if..then..else,for..next,etc.),andmodularityarediscussedinthiscategory.
SkillCategory9:AutomationObjects自动化对象
RecognizingApplicationObjects识别应用程序对象
Onceuponatime,functionalsoftwaretestautomationprimarilyusedan“analog”approachthatreliedonspecificcoordinatelocationsofascreenorapplicationwindowforperformingmouseandkeyboardoperationsthatsimulateduseractivitiesontheapplication.Thiswasslightlyunreliable,anddifficulttomaintainonalargescale,becausewhenthescreen,windoworapplicationcomponentsmovedeversoslightly,theautomatedtestwouldfailbecauseitwastryingtooperateonanelementinapositioninwhichitnolongerexisted.Moderntestautomationconverselytakesadifferentapproachthatlocatestheobjectsonthescreenbasedonpropertiesthatdefinethatobjectandthenperformsthedesiredoperationsoncetheobjectisfound.
ObjectMaps对象映射
OneofthesimplestwaystoboostthemaintainabilityandrobustnessofanautomatedtestsuiteisthroughtheintroductionofObjectMaps.ObjectMapsreducetheamountofinformationthatisbeingmaintainedinanautomatedtestbystoringobjectpropertiesinanexternalfileandreferencingobjectsaccordingtovariablenames(alsoknownasLogicalNames)thatarethentiedtotheproperties.
ObjectModels对象模型
Manysoftwareapplicationsarecomposedofseveralinterrelatedobjects,andanobjectmodelisanabstractrepresentationofthehierarchicalgroupofrelatedobjectsthatdefineanapplicationandworktogethertocompleteasetofapplicationfunctions.Theadvantagesofferedbyobjectmodelsinclude:
·Increasedapplicationunderstanding
·Increasedscriptingpower
DynamicObjectBehavior动态对象行为
Oneofthebiggestchallengesfacedbyautomatedtestengineersisthatofdynamicobjectbehavior.Peopleprocessinformationabouttheapplicationbasedonvisualinspection,whileautomatedtestsuseobjectproperties.Peoplecan,therefore,easilymakeadjustmentswhenthereisaslightchangefromavisualstandpoint,andcanignoremanypropertychanges.Thecomputer,however,cannotadjustaseasily.Thenecessaryadjustmentshavetobeanticipatedupfrontandprogrammed.
SkillCategory10:DebuggingTechniques调试技巧
TypesofErrors错误类型
Regardlessofhowwellautomatedtestsaredesignedandcreated,problemswilloccur.Sometimestheproblemsarerelatedtothescripts,andsometimestheyarerelatedtotheapplication,buttherootcauseisnotalwayssimpletofind.Theinabilitytoeffectivelydebugscriptscanseverelydelayschedules,andcanevenbringautomationtoascreechinghalt.Thefirststepinscriptdebuggingisinunderstandingthetypesoferrorsthatmaybeencountered.Thereare4maingenerictypesoferrorsthatmaybeencountereduponscriptexecution:
SyntaxErrors语法错误
Run-timeErrors运行时错误
LogicErrors逻辑错误
ApplicationErrors应用程序错误
DebuggingTechniques调试技巧
Thetrickiestpartofdebuggingisfindingoutthetruesourceofanerror.Thisinvolvesensuringtheerrorisreproducible,andthentheprocessoffindingthemainsourceoftheerrormustbegin.Veryoftenwhatseemstobethesourceoftheerrorisactuallyjustasymptomofthetrueerror,sothereareseveraltechniquesthatmaybeemployedtofindthesourceofanerror.Atthatpointadeterminationmaybemadeonwhetherornottheerrorisduetoanapplicatio
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024年湖南常德津市市疾病预制中心招聘5人历年高频500题难、易错点模拟试题附带答案详解
- 2024年湖南娄底市双峰县事业单位招考拟聘人员(第二批)高频500题难、易错点模拟试题附带答案详解
- 2024年湖北黄石市统计局招聘地方政府雇员2人高频500题难、易错点模拟试题附带答案详解
- 2024年湖北荆州荆州区事业单位引进人才58人历年高频500题难、易错点模拟试题附带答案详解
- 2024年湖北荆州市长江大学人才招聘151人历年高频500题难、易错点模拟试题附带答案详解
- 2024年湖北省黄石市住房公积金管理中心招聘2人历年高频500题难、易错点模拟试题附带答案详解
- 2024年减震系统材料合作协议书
- 2024年湖北省武汉市洪山区科学技术协会招聘历年高频500题难、易错点模拟试题附带答案详解
- 2024年湖北省武汉天河机场海关招聘监管辅助人员10人历年高频500题难、易错点模拟试题附带答案详解
- 2024年湖北省恩施州建始县事业单位招聘46人历年高频500题难、易错点模拟试题附带答案详解
- 肝性脑病的护理诊断和护理措施
- 《追星星的少年》
- 物控部门述职报告
- 扶贫项目库建设培训课件
- 《现代陶瓷艺术》课件
- 公共政策评估调查报告
- 仓库员工入职培训
- 柠条种植施工方案及方法
- 风景写生3 素描风景写生
- 不生气的技术II
- 放疗科护理病区利用PDCA循环降低放疗患者放射性皮肤损伤的发生率品管圈QCC成果汇报
评论
0/150
提交评论