1 Systems V & V, Quality and Standards Dr Sita Ramakrishnan School CSSE Monash University.

Slides:



Advertisements
Similar presentations
Object Oriented Analysis And Design-IT0207 iiI Semester
Advertisements

Defect testing Objectives
1 Integration Testing CS 4311 I. Burnstein. Practical Software Testing, Springer-Verlag, 2003.
Systems V & V, Quality and Standards
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
ISBN Prentice-Hall, 2006 Chapter 8 Testing the Programs Copyright 2006 Pearson/Prentice Hall. All rights reserved.
CMSC 345, Version 11/07 SD Vick from S. Mitchell Software Testing.
Integration testing Satish Mishra
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
Strategic Approach to Testing
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
PVK-HT061 Contents Introduction Requirements Engineering Project Management Software Design Detailed Design and Coding Quality Assurance Maintenance.
Integration Testing Presented By Nesreen Ahmad. *Main Points:-  Definition Of Integration Testing.  Procedure Of Integration Testing.  Integration.
CS 425/625 Software Engineering Software Testing
INTEGRATION TESTING ● After or during Unit Testing ● Putting modules together in a controlled way to incrementally build up the final system. ● Start with.
Outline Types of errors Component Testing Testing Strategy
Lecturer: Dr. AJ Bieszczad Chapter 87-1 How does software fail? Wrong requirement: not what the customer wants Missing requirement Requirement impossible.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 11: Integration- and System Testing.
Software Testing Introduction. Agenda Software Testing Definition Software Testing Objectives Software Testing Strategies Software Test Classifications.
Bottom-Up Integration Testing After unit testing of individual components the components are combined together into a system. Bottom-Up Integration: each.
Software System Integration
1 Software Testing Techniques CIS 375 Bruce R. Maxim UM-Dearborn.
CH08: Testing the Programs
ECE 355: Software Engineering
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 20 Slide 1 Integration testing l Tests complete systems or subsystems composed of integrated.
Overview Integration Testing Decomposition Based Integration
Chapter 8 Testing the Programs Shari L. Pfleeger Joann M. Atlee
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.
Software Testing.
Software Testing ©Dr. David A. Workman School of EE and Computer Science March 19, 2007.
INT-Evry (Masters IT– Soft Eng)IntegrationTesting.1 (OO) Integration Testing What: Integration testing is a phase of software testing in which.
1 Software testing. 2 Testing Objectives Testing is a process of executing a program with the intent of finding an error. A good test case is in that.
Testing Basics of Testing Presented by: Vijay.C.G – Glister Tech.
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.
Testing the programs In this part we look at classification of faults the purpose of testing unit testing integration testing strategies when to stop testing.
1 Integration Testing CS 4311 I. Burnstein. Practical Software Testing, Springer-Verlag, 2003.
CSC 480 Software Engineering Test Planning. Test Cases and Test Plans A test case is an explicit set of instructions designed to detect a particular class.
ISBN Prentice-Hall, 2006 Chapter 8 Testing the Programs Copyright 2006 Pearson/Prentice Hall. All rights reserved.
CS451 Lecture 10: Software Testing Yugi Lee STB #555 (816)
SOFTWARE TESTING. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves any activity.
Integration Testing Beyond unit testing. 2 Testing in the V-Model Requirements Detailed Design Module implementation Unit test Integration test System.
CS451 Software Implementation and Integration Yugi Lee STB #555 (816) Note: This lecture was designed.
What is a level of test?  Defined by a given Environment  Environment is a collection of people, hard ware, software, interfaces, data etc.
HNDIT23082 Lecture 09:Software Testing. Validations and Verification Validation and verification ( V & V ) is the name given to the checking and analysis.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
Chapter 8 Testing the Programs. Integration Testing  Combine individual comp., into a working s/m.  Test strategy gives why & how comp., are combined.
Software Engineering Zhang Shuang
Chapter 8 Testing the Programs 8.1 Software Faults and Failures 1. Introduction  faults: A: definition: the problem caused by error B: cause: X: the software.
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
ANOOP GANGWAR 5 TH SEM SOFTWARE TESTING MASTER OF COMPUTER APPLICATION-V Sem.
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.
Testing Integral part of the software development process.
Software Testing.
Software Engineering TESTING Compiled by: Dr. S. Prem Kumar
Integration Testing.
Software Testing.
Lecture 09:Software Testing
Chapter 8 Testing the Programs Shari L. Pfleeger Joann M. Atlee 4th Edition.
Verification and Validation Unit Testing
Higher-Level Testing and Integration Testing
Software testing.
Chapter 10 – Software Testing
Integration Testing CS 4311
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Chapter 11: Integration- and System Testing
CS410 – Software Engineering Lecture #11: Testing II
Presentation transcript:

1 Systems V & V, Quality and Standards Dr Sita Ramakrishnan School CSSE Monash University

© S Ramakrishnan2 Testing Program Components zTopics y Introduction y Fault Classification y Testing Program Components y Integration Testing xReferences: Pfleeger S L (2001), Software Engineering, Theory & Practice, 2 nd Ed., Prentice-Hall. xSommerville I (1995), Software Engineering, 5 th Ed., Addison-Wesley xOther references (books included in the slides, conference & journal papers) given in the handout for the unit

© S Ramakrishnan3 Testing Program Components z Introduction zTesting is not the first place where faults are detected. Requirement & Design reviews help as well zIn this lecture, examine techniques to reduce the occurrence of faults in code yTypes of Faults – x algorithmic fault – branching too soon/ too late; testing for wrong condition; not testing for a condition such division by zero etc x computation & precision faults; stress faults; boundary faults; timing faults; performance faults; recovery faults; h/w, s/w faults; standards & procedure faults x documentation faults when documentation does not match what the program does – may be intent defined in design say with assertions not implemented correctly? y useful to categorize and track types of faults not just in code but anywhere in the software system

© S Ramakrishnan4 Testing Program Components z Fault Classification y Historical information can help in predicting what types of faults in code we are likely to have, and certain types of faults can make us rethink the design or even requirements y IBM, HP etc have published work on software fault classification. Software fault modeling and causal analysis depend on understanding the number & distribution of types of faults y IBM’s defect prevention process (Mays et al. 1990) finds & documents root cause of faults & what types of faults testers should look for; has reduced the no. of faults injected in software yChillarege et al. (1992) at IBM developed an approach to fault tracking called “orthogonal defect classification”, where faults are put in categories that together give an indication as to which parts of the system needs a closer look as they spawn more faults.

© S Ramakrishnan5 Testing Program Components - Fault Classification z Fault classification such as by IBM & HP (See Pfleeger’s text for details) improve the development process by stating which types of faults are found in which development activities x Eg. For each fault identification or testing technique used during development, can build a profile of the types of faults located. x different methods will yield different profiles x can build a fault detection & prevention strategy based on the kinds of faults expected in a system x Chillarege et al. (1992) has shown how fault profile for design review is very different to that from code inspection x Grady (1997) shows HP developers use a fault classification model by selecting 3 descriptors for each fault found: the origin of fault (i.e. where fault was injected in a product), the type of fault, and the mode (which means if info was missing, wrong, unclear, changed). Each HP division tracks its faults separately, & summary statistics are produced. Different divisions have very different fault profiles & these profiles help developers devise SDLC activities that address particular kinds of faults that they encounter

© S Ramakrishnan6 Testing Program Components zHave looked at testing vs proving, black-box & structural testing etc. in another lecture zTest Thoroughness – to test code thoroughly, choose test cases using one of the approaches based on data manipulated by the code. Refer to lecture notes on dataflow coverage criteria on statement testing, branch, path, du- path, all-uses and more. all-paths all-du-paths all-uses all-c-uses-some-p-usesall-p-uses-some-c-uses all-c-uses all-p-uses Branch all-defs Statement Fig. Relative strengths of test strategies (Beizer 1990). Eg. Testing all paths stronger than testing all paths from def to use. Stronger the strategy, the more test cases. Think trade-offs between resources available & thoroughness of testing strategy we choose

© S Ramakrishnan7 Testing Program Components zAn Example of how test strategy affects the number of test cases from Pfleeger’s text Pointer = false Print Result x = x + 1 x > k? yes Pointer = true NoNo No Call suCall su Call sub (x, Pointer, Result) ResultResult Result > 0 ? Fig. Logic Flow statement testing requires test cases to execute statements 1 through 7. by choosing x > k that produces +ve Result, we can execute statements in order, so 1 test case is enough. for branch testing, identify decision points 2 test cases will exercise paths & and traverse the path at least once for exercising each possible path through the program, need more test cases. the paths , , , cover all cases, 2 decision points with 2 choices at each branch In this eg., statement testing requires fewer test cases than branch testing, which requires fewer test cases than path testing. This relationship holds in general.

© S Ramakrishnan8 Testing Program Components zAn Example of how test strategy affects the number of test cases from Pfleeger’s text Pointer = false Print Result x = x + 1 x > k? yes Pointer = true NoNo No Call suCall su Call sub (x, Pointer, Result) ResultResult Result > 0 ? Fig. Logic Flow Graph for Flow chart on left In this eg., statement testing requires fewer test cases than branch testing, which requires fewer test cases than path testing. This relationship holds in general.

© S Ramakrishnan9 Testing Program Components y Integration Testing x when integrating individual tested components, the order in which components are tested affects our choice of test cases and tools x for large systems, some components may be in coding phase, others in unit test phase, and some others may be in integration testing phase. Strategy chosen will affect the integration timing and coding order, and also have impact on cost and thoroughness of testing x system is viewed as made of hierarchy of components, where each component is seen as belonging to a layer of the design x use top down, bottom up or a combination of the 2 for testing

© S Ramakrishnan10 Testing Program Components z Bottom-up Integration Testing y for merging components to test the larger system y each component at the lower level of the hierarchy tested individually first y next, test components which call the previously tested components, and repeat until all tested y bottom-up approach useful when design is O-O, low level components are general purpose routines which are called by others or for system integration of a number of stand-alone reusable components. y when writing bottom-up testing, we need to write test drivers to test the lower level components y Disadvantage: architectural faults are unlikely to be discovered until much of the system has been tested

© S Ramakrishnan11 Testing Program Components – Bottom-up Integration Testing Level N Level N - 1 Test Drivers Level Level Level N Test Drivers (Source: Sommerville Text, p. 455 (adapted) A BCD GFE Test E Test F Test G Test D,G Test C Test B,E,F Test A,B,C, D,E,F,G SourSour Source: Pfleeger text, p.357 In Pfleeger’s eg., testing bottom-up, test lowest level E,F &G. as no components are ready to call these, write a driver code to call the component & pass test case to it. Once these low level are tested, then to the higher level. The next level, B is combined with components it calls (E & F) & tested together & so on …

© S Ramakrishnan12 Top-down Integration Testing zTop level, is tested by itself. Then, components called by the tested component(s) are tested as a larger unit. Repeated until all components are integrated & tested stub z A higher level component may call another which has not been tested yet. So, need to write a stub to simulate the action of a missing lower level component. The stub works by returning a suitable output for the testing process to continue z Testing top-down allows test teams to exercise one function at a time, following control from higher level down to the lowest level component -> if functions in components are localized using top-down design. Test cases can be defined in terms of functions being checked. zDesign faults, functional feasibility etc can be addressed more at the beginning of testing rather than at the end. No drivers needed but may need to write a large number of stubs Test A Test A,B,C,D Test A,B,C,D, E,F,G frfr From Pfleeger, p.358)

© S Ramakrishnan13 Modified Top-down Integration Testing zMay need to write a large number of stubs with top-down testing zInstead of testing an entire level at a time, a modified top-down testing approach is to test each level’s components individually before merging them yE.g. test A, then test B,C,D & then merge the 4 to test level 1 & 2, then E,F,G tested separately, then entire system tested. But this leads to more coding as stubs & drivers are needed for each component Test A A,B,C,D Test A,B,C,D, E,F,G frfr Fig. Source: Pfleeger, p.359) Test E Test C Test D Test B Test F Test G

© S Ramakrishnan14 Big-bang Testing & Sandwich Testing y Myers (1979) w.r.t. big-bang integration states: when all components are tested in isolation, tempting to put them together as the final system & test if it works y Not recommended for any system 1.as it requires stubs & drivers to test individual components 2.difficult to find the cause of any failure when all components are integrated at once 3.Interface faults cant be distinguished from other types of faults xMyers (1979) combines top-down strategy with bottom-up to form a sandwich testing approach. xSystem viewed as 3 layers like a sandwich – target layer in the middle, levels above & below the target. Top-down approach used in top layer & bottom up in lower layer. Testing converges on the target layer. Choose the target layer based on structure of component hierarchy & system characteristics

© S Ramakrishnan15 Sandwich Testing zTesting converges on the target layer in sandwich testing approach zIf bottom layer contains general utility functions, target layer may be the one above, with components which use the utility functions. Sandwich approach allows bottom-up testing to check the correctness of the utilities at the beginning of testing. No need for stubs as utilities are there to use zSandwich testing allows integration testing to begin early in the testing process. zCombines advantages of top-down & bottom-up by testing control & utilities from the beginning zBut, does not test individual components thoroughly before integration zA modified sandwich testing approach allows upper level components to be tested before merging them with others zHomework: See p. 362 Pfleeger text for Comparison of integration strategies and check if Microsoft synch-and-stabilize approach will work in CSE4431 or CSE4002 project