7f3af4318087ede7b37961a8327377aa.ppt
- Количество слайдов: 25
Verification and Validation: A Quick Introduction 1 -2 Lectures
Learning Objectives 1. 2. 3. 4. 5. 6. The student will be able to define both verification and validation, and to know the difference between them. The student will be able to identify the appropriate activities and their classification as either verification or validation. The student will be able to distinguish between verification and validation, given a set of activities. Given a set of software artifacts, the student will understand the appropriate verification or validation activity to that artifact. Given a set of projects in different categories, the student will be able to determine which category of projects would require more V&V activity, and which would require less. Given a set of defects and the phases of development in which they were found, the student will be able to estimate the relative cost of correcting errors early or late in the lifecycle.
Why Invest in Quality? n n n Cost effective Provides competitive edge Essential for business survival Essential for international marketing Helps to retain customers, and increase profits Hallmark of world class business
Ways to Improve Quality n Prevention of Defects • Process Improvement • Complexity Reduction • Risk Management • Causal Analysis n Detection and Correction of Defects • Verification • Validation • Rework • Causal Analysis
Verification n Verification – Are we building the product right? Verification is any checking process conducted on software artifacts in an attempt to determine if they work as specified by the designers of the system. Includes reviews, inspections, walkthroughs, unit testing and integration testing.
Validation n Validation – Are we building the right product? Validation is the process of evaluating software artifacts during the software development process in an attempt to determine if the system works as required by the customers. Any evaluation activity that involves the customer can be used for validation purposes. Includes program reviews, system testing, customer acceptance testing.
Verification vs. Validation n Verification • Main purpose is to detect defects in the artifacts of the system under development. n Validation • Main purpose is to show that the system under development meets user needs, requirements, and expectations.
Verification & Validation Techniques n Static Methods • Techniques applied to artifacts without execution. n Dynamic Methods • Techniques applied to artifacts through execution. n Mathematically Based Methods
Static: Reviews n Walkthroughs • Code • Document n Con. Ops, SRS n STEP, SAD, SDD n validation verification Inspections • Code • Document Audits n verification Program Reviews • Customer involved • No customer validation verification
Effectiveness of Static Verification n More than 60% of program defects can be detected by program inspections. More than 90% of program defects may be detectable using more rigorous mathematical program verification. The defect detection process is not confused by the existence of previous defects.
Dynamic: Testing (Verification) n Unit Test (Detailed Design): • Testing the individual software modules, components, or units. n Integration Testing (Architectural Design): • After unit test, the system is put together in increments. Integration testing focuses on the interfaces between software components (OO thread-based, cluster-based testing) n System Testing (Requirements Spec): • One goal of system testing is to ensure that the system functions as specified in the specification.
Dynamic: Testing (Validation) n System Testing (Requirements Spec): • Another goal of system testing is to ensure that the system functions as the client expected in a controlled environment. n User Acceptance Test (Con. Ops): • A set of formal tests run for the client, and specified by the client. When the system passes these tests, the software has been accepted by the client as meeting the requirements.
Verification and Validation in the Development Lifecycle Validate the System Requirements Analysis Design Verify Design Execute System Tests Black-Box Testing Verify Implementation ws vie Re Execute Integration Tests Code Execute Unit Tests White-Box & Black-Box Testing
Mathematics-Based Verification n Verification is based on mathematical arguments which demonstrate that a program is consistent with its specification. Programming language semantics must be formally defined. The program must be formally specified.
Why Inspection is important? n n Relative cost to fix a defect Phase in which found Cost ratio (hours) – Requirement 1 – Design 3 -6 – Coding 10 – Testing 15 -70 – Operation 40 -1000 Data derived from Capers Jones.
Delays in identifying and fixing defects geometrically more expensive as the lifecycle progresses! $1000 $10 $1 Time in (Phase of) Development Defects Cost of Fixing a Defect Costs of Finding and Fixing Late
Cost of Quality n n Includes all costs of quality-related activities. Quality costs = +Prevention costs +Detection and Appraisal costs +Failure costs • • Internal failure costs External failure costs
Quality Cost Components n Direct Cost – Reviews/inspections – Unit testing – System testing – Acceptance testing – Test planning and design – Computer time – Resources (terminals, staffs, etc. ) n Indirect Cost – Rework – Recovery – Corrective action cost – Failures – Analysis meeting – Debugging – Retesting – Legal fees
Verification or… Validation? n n n Reviews Unit testing Integration Testing System testing Acceptance testing Either Verification Validation
Balancing Trade-Offs n n What is the real requirement? What are the expected benefits of V & V vs. – cost of increasing V&V activity – additional time required – technical feasibility – risk of not finding defects » delivery » operation “When is it good enough? ” (Bach, 1997)
Summary n n Verification and Validation are both important to the quality of software. Each are different: • Verification determines that we are doing is done correctly. • Validation determines whether we are doing the right thing. n n Sometimes, less quality is okay. Some software systems require less V&V, as the cost is not supportable. Some require more no matter what it costs. The earlier defects are discovered, the less it will cost to correct them.
Backup Slides
Independent Verification and Validation (IV&V) Subs Project Manager • Design • Coding • Testing • System Requirements • Contractor Management Discrepancies IV&V • Evaluate Requirements • Monitor Tests • Integration • Evaluate Design Tested Products
Static and Dynamic Verification & Validation Sommerville, p. 421
Test Case Development in the V Model Validate Requirements Analysis Design Verify Design Execute System Tests Execute Integration Tests Verify Implementation Code Test cases designed and executed by independent testers Execute Unit Tests Test cases designed and executed by developers