软件测试级复习整理18章.docx
- 文档编号:30304981
- 上传时间:2023-08-13
- 格式:DOCX
- 页数:17
- 大小:26.42KB
软件测试级复习整理18章.docx
《软件测试级复习整理18章.docx》由会员分享,可在线阅读,更多相关《软件测试级复习整理18章.docx(17页珍藏版)》请在冰豆网上搜索。
软件测试级复习整理18章
软件测试
Unitone
Verification|证实isthecheckingortestingofitems,includingsoftware,forconformanceandconsistencywithanassociatedspecification.
Validation|确认istheprocessofcheckingthatwhathasbeenspecifiediswhattheuseractuallywanted.
Bugsthetermbugisoftenusedtorefertoaproblemorfaultinacomputer.Therearesoftwarebugsandhardwarebugs.
Staticanalysisinvestigatesthesourcecodeofsoftware,lookingforproblemsandgatheringmetricswithoutactuallyexecutingthecode
Dynamicanalysislooksatthebehaviorofsoftwarewhileitisexecuting,toprovideinformationsuchasexecutingtraces|跟踪,timingprofiles,andtestcoverageinformation.
Unittestingeachunitofthesoftwareistestedtoverifythatthedetaileddesignfortheunithasbeencorrectlyimplemented
Softwareintegrationtestinglargergroupsoftestedsoftwarecomponentscorrespondingtoelementsofthearchitecturaldesignareintegratedandtested
Systemtestingsoftwareisintegratedtotheoverallproductandtestedtoshowthatallrequirementsaremet
Acceptancetestinguponwhichacceptanceofthecompletedsoftwareisbasedthiswilloftenuseasubsetofthesystemtests,witnessed|…的证据bythecustomersforthesoftwareorsystem
Withineachleveloftesting,oncethetestshavebeenapplied,testresultsareevaluated.Ifaproblemisencountered,theneitherthetestsarerevised|修改andappliedagain,orthesoftwareisfixedandthetestsappliedagain.Thisisrepeateduntilnoproblemsareencountered.
Thetermregressiontesting|回归测试isusedtorefertotherepetitionofearliersuccessfultestsinordertomakesurethatchangestothesoftwarehavenotintroducedsideeffects.
Ateststrategyisastatementoftheoverallapproachtotesting,identifyingwhatlevelsoftestingaretobeappliedandthemethods,techniquesandtoolstobeused.
Atestplanstateswhattheitemstobetestedare,atwhatleveltheyaretobetested,whatsequencetheyaretobetestedin,howtheteststrategywillbappliedtothetestingofeachitem,anddescribesthetestenvironment.
Oncethetestplanforaleveloftestinghasbeenwritten,thenextstageoftestdesignistospecifyasetoftestcasesortestpathsforeachitemtobetestedatthatlevel.
ThisisusuallyreferredtoasaVerificationCrossReferenceIndex(VCRI)andisattachedtothetestspecification.Crossreferenceindexesmayalsobeusedwithunittestingandsoftwareintegrationtesting.
Positivetestingchecksthatthesoftwaredoeswhatitshould.
Negativetestingchecksthatthesoftwaredoesn’tdowhatitshouldn’t.
Thetestlogwillcontainrecordsofwheneachtesthasbeenexecuted,theoutcomeofeachtestexecution,andmayalsoincludekeyobservationsmadeduringtestexecution.
Softwareshouldbetestedagainstwhatitisspecifiedtodo,notagainstwhatitisactuallyobservedtodo.
Alwaystestagainstaspecification.Iftestsarenotdevelopedfromaspecification,thenitisnottesting.Hence,testingistotallyreliantuponadequatespecificationofsoftware.
Documentthetestingprocess:
specifytestsandrecordtestresult.
Testhierarchically|等级againsteachlevelofspecification.Findingmoreerrorsearlierwillultimatelyreducecosts.
Planverificationandvalidationactivities,particularlytesting.
Complementtestingwithtechniquessuchasstaticanalysisanddynamicanalysis.
Alwaystestpositively:
thatthesoftwaredoeswhatitshould,butalsonegatively:
thatitdoesn’tdowhatitshouldn’t.
Havetherightattitudetotesting:
itshouldbeachallenge,notthechoreitsooftenbecomes.
Unittwo
Blackboxtestingistestingwithoutknowledgeoftheinternal|内部的workingsoftheitembeingtested.Theengineeringtesterwouldonlyknowthe“legal”inputsandwhattheexpectedoutputsshouldbe,butnotknowhowtheprogramactuallyarrivesatthoseoutputs.
Whiteboxtestingwheretestdataarederivedfromdirectexaminationofthecodetobetested.Thetestcasescannotbedetermineduntilthecodehasactuallybeenwritten.
Advantagesofblackboxtesting:
♦Moreeffectiveonlargerunitsofcodethanwhiteboxtesting
♦Testerneedsnoknowledgeofimplementation,includingspecificprogramminglanguages
♦Testerandprogrammerareindependentofeachother
♦Testsaredonefromauser’spointofview
♦Willhelptoexposeanyambiguitiesorinconsistenciesinthespecifications
♦Testcasescanbedesignedassoonasthespecificationsarecomplete
Disadvantagesofblackboxtesting:
♦Onlyasmallnumberofpossibleinputscanactuallybetested,totesteverypossibleinputstreamwouldtakenearlyforever
♦Withoutclearandconcisespecifications,testcasesarehardtodesign
♦Theremaybeunnecessaryrepetitionoftestinputsifthetesterisnotinformedoftestcasestheprogrammerhasalreadytried
♦Mayleavemanyprogrampathsuntested
♦Cannotbedirectedtowardspecificsegmentsofcodewhichmaybeverycomplex(andthereforemoreerrorprone)
♦Mosttestingrelatedresearchhasbeendirectedtowardwhiteboxtesting
Advantagesofwhiteboxtesting:
♦astheknowledgeofinternalcodingstructureisprerequisite|先决条件,itbecomesveryeasytofindoutwhichtypeofinput/datacanhelpintestingtheapplicationeffectively
♦theotheradvantageofwhiteboxtestingisthatithelpsinoptimizingthecode
♦ithelpsinremovingtheextralinesofcode,whichcanbringinhiddendefects.
Disadvantagesofwhiteboxtesting
♦asknowledgeofcodeandinternalstructureisaprerequisite|先决条件,askilledtesterisneededtocarryoutthistypeoftesting,whichincreasesthecost.
♦Itisnearlyimpossibletolookintoeverybitofcodetofindouthiddenerrors,whichmaycreateproblems,resultinginfailureoftheapplication.
Blackboxtestingshouldmakeuseofrandomlygeneratedinputs
toeliminateanyguessworkbythetesterastothemethodsofthefunction,dataoutsideofthespecifiedinputrangeshouldbetestedtochecktherobustness|坚固的oftheprogram
boundarycasesshouldbetestedtomakesurethehighestandlowestallowableinputsproduceproperoutput.
thenumberzeroshouldbetestedwhennumericaldataistobeinput.
Stresstestingshouldbeperformedespeciallywithrealtimesystems.
Crashtestingshouldbeperformedtoseewhatittakestobringthesystemdown
Testmonitoringtollsshouldbeusedwheneverpossibletotrackwhichtestshavealreadybeenperformedandtheoutputsoftheseteststoavoidrepetitionandtoaidinthesoftwaremaintenance.
Whiteboxtestingstrategydealswiththeinternallogicandstructureofthecode.Whiteboxtestingisalsocalledasglass,structural,openboxorclearboxtesting.
Blackboxtestingclassifications|分类
⏹Functionaltesting
Inthistypeoftesting,thesoftwareistestedforthefunctionalrequirements.Thetestsarewritteninordertocheckiftheapplicationbehavesasexpected.
Functionaltestingisoftendonetowardtheendofthedevelopmentcycle
Individualcomponentsandprocessescanbetestedearlyon,evenbeforeit’spossibletodofunctionaltestingontheentiresystem.
Functionaltestingcovershowwellthesystemexecutesthefunctionsitissupposedtoexecute–includingusercommands,datamanipulation,searchesandbusinessprocesses,userscreens,andintegrations.
Functionaltestingcoverstheobvioussurfacetypeoffunctions,aswellastheback–endoperations.
⏹Stresstesting
theapplicationistestedagainstheavyloadsuchascomplexnumericalvalue,largenumberofinputs,largenumberofqueriesetc.whichchecksforthestress/loadtheapplicationcanwithstandstresstestingdealswithqualityoftheapplicationintheenvironment.
Theideaistocreateanenvironmentmoredemandingoftheapplicationthantheapplicationwouldexperienceundernormalworkloads.
Thisisthehardestandmostcomplexcategoryoftestingtoaccomplishanditrequiresajointeffortfromallteams.Atestenvironmentisestablishedwithmanytestingstations.
Ateachstation,ascriptisexercisingthesystem.Thesescriptsareusuallybasedontheregressionsuite.
Moreandmorestationsareadded,allsimultaneoushammeringonthesystem,untilthesystembreaks.Thesystemisrepairedandthestresstestisrepeateduntilalevelofstressisreachedthatishigherthanexpectedtobepresentatacustomersite.
RaceconditionsandMemoryleaksareoftenfoundunderstresstesting.
Araceconditionisaconflictbetweenatleasttwotests.Eachtestworkscorrectlywhendoneinisolation.Whenthetwotestsareruninparallel,oneorbothofthetestsfail.Thisisusuallyduetoanincorrectlymanagedlock.
Amemoryleakhappenswhenatestleavesallocatedmemorybehindanddoesnotcorrectlyreturnthememorytothememoryallocationscheme.Thetestseemstoruncorrectly,butafterbeingexercisedseveraltimes,availablememoryisreduceduntilthesystemfails.
⏹Loadtesting
theapplicationistestedagainstheavyloadsorinputssuchastestingofwebsitesinordertofindoutatwhatpointtheweb-site-applicationfailsorwhatpointitsperformancedegrades.
Loadtestingoperatesatapredefinedloadlevel,usuallythehighestloadthatthesystemcanacceptwhilestillfunctioningproperly.
Notethatloadtestingdoesnotaimtobreakthesystembyoverwhelmingit,butinsteadtriestokeepthesystemconstantlyhumminglikeawell-oiledmachine.
Inthecontextofloadtesting,extremeimportanceshouldbegivenofhavinglargedatasetsavailablefortesting.
BugssimplydonotsurfaceunlessyoudealwithverylargeentitiessuchthousandsofusersinrepositoriessuchasLDAP/NIS/ActiveDirectory.Thousandsofmailservermailboxes,multi-
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 软件 测试 复习 整理 18