《Software Testing Verification and Validation:软件测试验证和确认》由会员分享,可在线阅读,更多相关《Software Testing Verification and Validation:软件测试验证和确认(14页珍藏版)》请在金锄头文库上搜索。
1、Software Testing: Verification and ValidationVerification “Are we building the product right?”Validation “Are we building the right product?”Barry Boehm, 19798/11/20241Ch.19 - Verification & ValidationVerification and ValidationTechniquesStatic TechniquesSoftware Inspections(against source code)Dyna
2、mic TechniquesSoftware Testing(requires executable program)8/11/20242Ch.19 - Verification & ValidationVerification and ValidationStatic techniquesSoftware Inspectionsof requirements documentsof design documents (design reviews)of source code (code reviews)automated static analysis8/11/20243Ch.19 - V
3、erification & ValidationVerification and ValidationDynamic techniquesSoftware Testingspecification vs. implementationDefect testing Ch.20verifying non-functional requirements (e.g. performance; reliability)Statistical testing Ch.21automated dynamic analysis (if applicable)8/11/20244Ch.19 - Verificat
4、ion & ValidationVerification and ValidationGoalsEstablish that software is fit for purpose,not “bug-free”“Good enough” depends on:Software function (critical nature?)User expectationsMarketcompetition, price8/11/20245Ch.19 - Verification & ValidationTesting vs. DebuggingVerification and Validationlo
5、oking and categorizing existence of system defects example bug list“What?”Debugginglocating and correcting these defects“Why?”8/11/20246Ch.19 - Verification & ValidationCanned test runs to verify that new defects were not introduced during “debugging” session.Not exhaustiveTargeted to a particular i
6、nterfacecomponents, sub-systems, integrated systemDifferent levels (lengths) of regression testsTargeted regressionsRegression Testing8/11/20247Ch.19 - Verification & ValidationPlanning should begin right after requirements specificationAcceptance tests can be written thenSystem, sub-system tests ca
7、n be written against designsThe Test Plan8/11/20248Ch.19 - Verification & ValidationThe Test Plan8/11/20249Ch.19 - Verification & ValidationSoftware Inspections (code reviews)60% of program errors can be detected in code review Fagan8690% if more formal approach used (e.g. “Cleanroom” process) Mills
8、87(Well talk about Cleanroom later)8/11/202410Ch.19 - Verification & ValidationSoftware Inspections (code reviews)Why are reviews more effective for finding defects in systems/subsystems (i.e., before acceptance testing)?Bugs are often masked by other bugsLeverage domain/programming knowledgeinspect
9、ors are skilled programmersCommon practice: code reviews and then acceptance testingreviews can also help with development of tests8/11/202411Ch.19 - Verification & ValidationSoftware Inspections (code reviews)Sample procedure:Announce review meeting in advance (a week?)Provide design document, impl
10、ementation overview, and pointer to codeReviewers read code (and make notes) in advance of meetingDuring meeting, directives recorded by ScribeTesters/documenters attend too8/11/202412Ch.19 - Verification & ValidationAutomated Static AnalysisCASE tools that catch program curiosities that are usually
11、 indicative of bugs:unreachable codeuninitialized variablesunreferenced variablesProgramming language dependente.g., LINT (for C)8/11/202413Ch.19 - Verification & ValidationAutomated Dynamic AnalysisTools which do bookkeeping while program is run/tested.Can find some dynamic problems that compiler cannot catch (depends on language)C/C+ tools: Purify, BoundsChecker8/11/202414Ch.19 - Verification & Validation