The Software Development Life Cycle: An Overview Presented by Maxwell Drew and Dan Kaiser Southwest State University Computer Science Program.

Slides:



Advertisements
Similar presentations
Software Testing and Analysis. Ultimate goal for software testing Quality Assurance.
Advertisements

Verification and Validation
Software Engineering-II Sir zubair sajid. What’s the difference? Verification – Are you building the product right? – Software must conform to its specification.
©Ian Sommerville 2000Software Engineering. Chapter 22Slide 1 Chapter 22 Verification and Validation.
Software testing.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing 2.
1 / 28 CS 425/625 Software Engineering Verification and Validation Based on Chapter 19 of the textbook [SE-6] Ian Sommerville, Software Engineering, 6.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 20 Slide 1 Defect testing l Testing programs to establish the presence of system defects.
Software Engineering Software Testing.
Verification and Validation
- Testing programs to establish the presence of system defects -
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Verification and Validation.
Verification and Validation CIS 376 Bruce R. Maxim UM-Dearborn.
Verification and Validation
1CMSC 345, Version 4/04 Verification and Validation Reference: Software Engineering, Ian Sommerville, 6th edition, Chapter 19.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
Software Testing Verification and validation planning Software inspections Software Inspection vs. Testing Automated static analysis Cleanroom software.
Verification and Validation Yonsei University 2 nd Semester, 2014 Sanghyun Park.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Verification and Validation.
Adaptive Processes © Adaptive Processes Simpler, Faster, Better Verification and Validation Assuring that a software system meets a user's needs.
Testing phases. Test data Inputs which have been devised to test the system Test cases Inputs to test the system and the predicted outputs from these.
Chapter 12: Software Testing Omar Meqdadi SE 273 Lecture 12 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Software testing techniques 3. Software testing
©Ian Sommerville 1995/2000 (Modified by Spiros Mancoridis 1999) Software Engineering, 6th edition. Chapters 19,20 Slide 1 Verification and Validation l.
Dr. Tom WayCSC Code Reviews & Inspections CSC 4700 Software Engineering.
Verification and Validation Chapter 22 of Ian Sommerville’s Software Engineering.
Verification and Validation Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 22 Slide 1 Verification and Validation Slightly adapted by Anders Børjesson.
CSC 480 Software Engineering Lecture 14 Oct 16, 2002.
Software testing techniques 2.Verification and validation From I. Sommerville textbook Kaunas University of Technology.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
Software Testing Testing types Testing strategy Testing principles.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Chapter 19 Verification and Validation.
CS.436 Software Engineering By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 13 Verification and validation Slide 1 1 Chapter 13 Verification and Validation.
1 Software Defect Testing Testing programs to establish the presence of system defects.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
Software Testing Yonsei University 2 nd Semester, 2014 Woo-Cheol Kim.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Software Verification, Validation and Testing.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
SoftwareVerification and Validation
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Chapter 19 Verification and Validation.
Verification and Validation
Ch 22 Verification and Validation
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Bzupages.com Verification and Validation.
CHAPTER 9: VERIFICATION AND VALIDATION 1. Objectives  To introduce software verification and validation and to discuss the distinction between them 
Chapter 12: Software Inspection Omar Meqdadi SE 3860 Lecture 12 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Software Engineering, 8th edition Chapter 22 1 Courtesy: ©Ian Somerville 2006 April 27 th, 2009 Lecture # 19 Verification and Validation.
Verification and Validation Assuring that a software system meets a user's needs.
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
©Ian Sommerville Software Engineering, 7th edition. Chapter 22 Slide 1 Verification and Validation with edits by Dan Fleck Coming up: Objectives.
CS451 Lecture 10: Software Testing Yugi Lee STB #555 (816)
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Verification and Validation with edits by Dan Fleck.
Chapter 12: Software Testing Omar Meqdadi SE 273 Lecture 12 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Software inspections l Involve people examining the source representation with.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
References & User group Reference: Software Testing and Analysis Mauro Pezze Software Engineering Ian Sommerville Eight Edition (2007) User group:
Verification vs. Validation Verification: "Are we building the product right?" The software should conform to its specification.The software should conform.
Defect testing Testing programs to establish the presence of system defects.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 22 Slide 1 Verification and Validation.
Verification and Validation
CSC 480 Software Engineering
IS301 – Software Engineering V:
Verification and Validation
Verification and Validation
Verification and Validation
Software testing.
Presentation transcript:

The Software Development Life Cycle: An Overview Presented by Maxwell Drew and Dan Kaiser Southwest State University Computer Science Program

Last Time Introduction to the Principles of Testing The Testing Process Schwan’s Development Standards MSF Implementation and Testing RUP Implementation and Testing

Session 7: Testing and Deployment Brief review of the testing process Dynamic Testing Methods Static Testing Methods Deployment in MSF Deployment in RUP

Overall Goal Our overall goal is still to validate and verify the software. Validation "Are we building the right product?" Verification "Are we building the product right?”

The V-model of Development

Acceptance Tests Pilot test: install on experimental basis Alpha test: in-house test Beta test: customer pilot Parallel testing: new system operates in parallel with old system

Integration Testing Strategies Strategies covered Top-down testing Bottom-up testing Thread testing Stress testing Back-to-back testing

Dynamic verification Concerned with exercising and observing product behavior (testing) Static verification Concerned with analysis of the static system representation to discover problems Dynamic vs Static Verification

Static and Dynamic V&V

Methods of Dynamic V&V Black-box testing Structural testing (AKA White-box or Glass-box testing)

Defect testing The objective of defect testing is to discover defects in programs A successful defect test is a test which causes a program to behave in an anomalous way Tests show the presence not the absence of defects

Test data Inputs which have been devised to test the system Test cases Inputs to test the system and the predicted outputs from these inputs if the system operates according to its specification Test data and test cases

The defect testing process

Black-box testing Approach to testing where the program is considered as a ‘black-box’ The program test cases are based on the system specification Test planning can begin early in the software process

Black-box testing

Partition system inputs and outputs into ‘equivalence sets’ If input is a 5-digit integer between 10,000 and 99,999, then equivalence partitions are 100,000 Choose test cases at the boundary of these sets 00000, 09999, 10000, 99999, Equivalence partitioning

Equivalence partitions

Search routine specification procedure Search (Key : ELEM ; T: ELEM_ARRAY; Found : BOOLEAN; L: ELEM_INDEX) ; Pre-condition -- the array has at least one element T[FIRST] <= T[LAST ] Post-condition -- the element is found and is referenced by L ( Found and T[L] = Key) or -- the element is not in the array ( not Found and not (exists i, FIRST >= i <= LAST, T[i] = Key ))

Inputs which conform to the pre-conditions Inputs where a pre-condition does not hold Inputs where the key element is a member of the array Inputs where the key element is not a member of the array Search Routine - Input Partitions

Testing Guidelines (Arrays) Test software with arrays which have only a single value Use arrays of different sizes in different tests Derive tests so that the first, middle and last elements of the array are accessed Test with arrays of zero length (if allowed by programming language)

Search routine - input partitions

Search Routine - Test Cases

Sometime called white-box or glass- box testing Derivation of test cases according to program structure. Knowledge of the program is used to identify additional test cases Objective is to exercise all program statements (not all path combinations) Structural testing

White-box testing

Binary Search void Binary_search (elem key, elem T[ ], int size, bool &found, int &L) { int bott, top, mid ; bott = 0 ; top = size -1 ; L = ( top + bott ) / 2 ; if (T[L] == key) found = true ; else found = false ; while (bott <=top && !found){ mid = top + bott / 2 ; if ( T [mid] == key ){ found = true; L = mid ; } else if (T [mid] < key ) bott = mid + 1 ; else top = mid-1 ; } //end while } //binary_search

Pre-conditions satisfied, key element in array Pre-conditions satisfied, key element not in array Pre-conditions unsatisfied, key element in array Pre-conditions unsatisfied, key element not in array Input array has a single value Input array has an even number of values Input array has an odd number of values Binary Search - Equiv. Partitions

Binary search equiv. partitions

Binary search - test cases

Binary Search void Binary_search (elem key, elem T[ ], int size, bool &found, int &L) { int bott, top, mid ; bott = 0 ; top = size -1 ; L = ( top + bott ) / 2 ; if (T[L] == key) found = true ; else found = false ; while (bott <=top && !found){ mid = top + bott / 2 ; if ( T [mid] == key ){ found = true; L = mid ; } else if (T [mid] < key ) bott = mid + 1 ; else top = mid-1 ; } //end while } //binary_search

Binary Search Flow Graph

1, 2, 3, 4, 12, 13 1, 2, 3, 5, 6, 11, 2, 12, 13 1, 2, 3, 5, 7, 8, 10, 11, 2, 12, 13 1, 2, 3, 5, 7, 9, 10, 11, 2, 12, 13 Test cases should be derived so that all of these paths are executed A dynamic program analyzer may be used to check that paths have been executed Independent paths

The number of tests necessary to test all control statements equals the cyclomatic complexity Cyclomatic complexity equals number of conditions in a program + 1 Can be calculated from the number of nodes (N) and the number of edges (E) in the flow graph Complexity = E - N + 2 Cyclomatic complexity

Static Verification Verifying the conformance of a software system to its specification without executing the code

Static Verification Involves analyses of source text by humans or software Can be carried out on ANY documents produced as part of the software process Discovers errors early in the software process Usually more cost-effective than testing for defect detection at the unit and module level Allows defect detection to be combined with other quality checks

Static Verification Effectiveness More than 60% of program errors can be detected by informal program inspections More than 90% of program errors may be detectable using more rigorous mathematical program verification The error detection process is not confused by the existence of previous errors

Program Inspections Formalized approach to document reviews Intended explicitly for defect DETECTION (not correction) Defects may be logical errors, anomalies in the code that might indicate an erroneous condition (e.g. an un-initialized variable) or non-compliance with standards

Fagan’s Inspection Pre-conditions A precise specification must be available Team members must be familiar with the organization standards Syntactically correct code must be available An error checklist should be prepared Management must accept that inspection will increase costs early in the software process Management must not use inspections for staff appraisal

The inspection process

Inspection procedure System overview presented to inspection team Code and associated documents are distributed to inspection team in advance Inspection takes place and discovered errors are noted Modifications are made to repair discovered errors Re-inspection may or may not be required

Inspection Teams Made up of at least 4 members Author of the code being inspected Reader who reads the code to the team Inspector who finds errors, omissions and inconsistencies Moderator who chairs the meeting and notes discovered errors Other roles are Scribe and Chief moderator

Inspection rate 500 statements/hour during overview 125 source statement/hour during individual preparation statements/hour can be inspected Inspection is therefore an expensive process Inspecting 500 lines costs about 40 staff/hours effort = $$$$$

Inspection checklists Checklist of common errors should be used to drive the inspection Error checklist is programming language dependent The 'weaker' the type checking, the larger the checklist Examples: Initialization, Constant naming, loop termination, array bounds, etc.

Table 8.2. Typical inspection preparation and meeting times. Development artifactPreparation timeMeeting time Requirements document25 pages per hour12 pages per hour Functional specification45 pages per hour15 pages per hour Logic specification50 pages per hour20 pages per hour Source code150 lines of code per hour75 lines of code per hour User documents35 pages per hour20 pages per hour Table 8.3. Faults found during discovery activities. Discovery activityFaults found per thousand lines of code Requirements review2.5 Design review5.0 Code inspection10.0 Integration test3.0 Acceptance test2.0

Mathematically-based Verification 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

Program Proving Rigorous mathematical proofs that a program meets its specification are long and difficult to produce Some programs cannot be proved because they use constructs such as interrupts. These may be necessary for real-time performance The cost of developing a program proof is so high that it is not practical to use this technique in the vast majority of software projects

Program Verification Arguments Less formal, mathematical arguments can increase confidence in a program's conformance to its specification Must demonstrate that a program conforms to its specification Must demonstrate that a program will terminate

Axiomatic approach Define pre and post conditions for the program or routine Demonstrate by logical argument that the application of the code logically leads from the pre to the post-condition Demonstrate that the program will always terminate

The name is derived from the 'Cleanroom' process in semiconductor fabrication. The philosophy is defect avoidance rather than defect removal Software development process based on: Incremental development Formal specification. Static verification using correctness arguments Statistical testing to determine program reliability. Cleanroom

The Cleanroom Process

Testing Effectiveness Experimentation found black-box testing to be more effective than structural testing in discovering defects Static code reviewing was less expensive and more effective in discovering program faults

Table 8.5. Fault discovery percentages by fault origin. Discovery techniqueRequirementsDesignCodingDocumentation Prototyping Requirements review Design review Code inspection Unit testing15200 Table 8.6. Effectiveness of fault discovery techniques. (Jones 1991) Requirements faults Design faultsCode faultsDocumentation faults Reviews FairExcellent Good Prototypes GoodFair Not applicable Testing Poor GoodFair Correctness proofs Poor Fair

When to Stop Testing Fault seeding Assumption

When to Stop Testing Confidence in the software C = confidence S = number of seeded faults N = number of faults claimed (0 = no faults) n = number of actual faults discovered

Questions?