Conquering Complex and Changing Systems Object-Oriented Software Engineering Art for Chapter 9, Testing.

Slides:



Advertisements
Similar presentations
Chapter 11, Testing, Part 2: Integration and System Testing
Advertisements

Software Engineering I: Integration and System Testing
Using UML, Patterns, and Java Object-Oriented Software Engineering Art for Chapter 14, Project Management.
Using UML, Patterns, and Java Object-Oriented Software Engineering Art for Chapter 16, Methodologies: Putting It All Together.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 11: Integration- and System Testing.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 4, Requirements Elicitation.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 1 Example of a Problem Statement: Introduction into.
Using UML, Patterns, and Java Object-Oriented Software Engineering Royce’s Methodology Chapter 16, Royce’ Methodology.
CMSC 345, Version 11/07 SD Vick from S. Mitchell Software Testing.
April 1, R McFadyen1 A Traditional Software Development Process Unit test Integration test System test Detailed design Architectural design.
Integration testing Satish Mishra
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 5: Analysis, Object Modeling.
Conquering Complex and Changing Systems Object-Oriented Software Engineering TJSS: Defining access control, example Päivi Ovaska.
Conquering Complex and Changing Systems Object-Oriented Software Engineering TJSS System Design Lecture 12 Päivi Ovaska.
Conquering Complex and Changing Systems Object-Oriented Software Engineering TJSS: Defining persistent data stores, example Päivi Ovaska.
Conquering Complex and Changing Systems Object-Oriented Software Engineering TJSS Design goals and System Decomposition, example Päivi Ovaska.
Conquering Complex and Changing Systems Object-Oriented Software Engineering TJSS: Identifying boundary conditions, example Päivi Ovaska.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Art for Chapter 5, Analysis.
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 1 Outline  Dynamic models  Sequence diagrams.
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 1 UML Sequence Diagrams  Used during system.
Chapter 8, Object Design Introduction to Design Patterns
Testing Team exercise Have each team member contribute answers: –Do you test your code? If no, why not? If yes: When? How? How often? –What is your team’s.
Chapter 11, Testing.
1 A Student Guide to Object- Orientated Development Chapter 9 Design.
Outline Types of errors Component Testing Testing Strategy
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 11: Integration- and System Testing.
Using UML, Patterns, and Java Object-Oriented Software Engineering Example of a Problem Statement: Introduction into ARENA.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 1 Requirements Analysis Document Template 1.Introduction.
System/Software Testing
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 3, Project Organization and Communication.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 1 Introduction to Software Engineering CEN 4010.
Chapter 11, Testing.
ECE 355: Software Engineering
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 9, Testing.
Overview Integration Testing Decomposition Based Integration
Conquering Complex and Changing Systems Object-Oriented Software Engineering Art for Chapter 11, Project Management.
Using UML, Patterns, and Java Object-Oriented Software Engineering Art for Chapter 11, Testing.
Using UML, Patterns, and Java Object-Oriented Software Engineering Art for Chapter 3, Project Communication.
Object-Oriented Software Engineering, Ch. 9
Using UML, Patterns, and Java Object-Oriented Software Engineering Art for Chapter 15, Software Life Cycle.
Slide 16B.51 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Art for Chapter 12, Software Life Cycle.
Testing Basics of Testing Presented by: Vijay.C.G – Glister Tech.
Using UML, Patterns, and Java Object-Oriented Software Engineering Art for Chapter 8, Object Design: Reusing Pattern Solutions.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 4, Requirements Elicitation.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 1 Object Modeling.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML: Review Session (Optional)
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML: Review Session (Optional)
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 11, Testing: Model-based Testing.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 9, Object Design: Specifying Interfaces.
Using UML, Patterns, and Java Object-Oriented Software Engineering Art for Chapter 7 System Design: Addressing Design Goals.
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 1 Terminology  Reliability: The measure of.
CSC 480 Software Engineering Lecture 15 Oct 21, 2002.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 11, Testing, Part 2: Integration and System Testing.
1 OO Analysis & Design - Introduction to main ideas in OO Analysis & design - Practical experience in applying ideas -A large element is use of UML as.
Using UML, Patterns, and Java Object-Oriented Software Engineering Art for Chapter 1, Introduction to Software Engineering.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 11, Testing.
Using UML, Patterns, and Java Object-Oriented Software Engineering 15. Software Life Cycle (Waterfall)
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 9, Testing.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 9, Testing.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
1 Object Oriented Analysis System modeling = Functional modeling + Object modeling + Dynamic modeling Functional modeling = Use cases Object modeling =class.
Review of Definitions Software life cycle: –Set of activities and their relationships to each other to support the development of a software system Software.
Why is Design so Difficult? Analysis: Focuses on the application domain Design: Focuses on the solution domain –The solution domain is changing very rapidly.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 9, Object Design: Specifying Interfaces.
Bernd Bruegge and Allen Dutoit Requirements Process The requirements process consists of two activities: Requirements Elicitation: Definition of the system.
Chapter 11: Integration- and System Testing
Chapter 11: Integration and System Testing
Presentation transcript:

Conquering Complex and Changing Systems Object-Oriented Software Engineering Art for Chapter 9, Testing

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 2 Figure 9-1. Taxonomy of quality control activities (UML class diagram).

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 3 Figure 9-2. Testing activities and their related work products (UML activity diagram). Swimlanes indicate who executes the test. (diagram continued on next slide) Object design Functional test Structure test Unit test UserClientDeveloper Integration test From ODD Integration strategy From TP System decomposition From SDD Functional requirements From RAD Continued on next slide

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 4 Figure 9-2. Continued from previous slide. Acceptance test User manual Performance test Daily operation Functional test Installation test Field test UserClientDeveloper From RAD Functional requirements From RAD Nonfunctional requirements Project agreement

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 5 Figure 9-3. Model elements used during testing (UML class diagram). is caused by ** Test case FailureFaultError Test suite is caused by * * CorrectionComponent Test stub Test driver exercises is revised by findsrepairs * ** * * * 1…n * *

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 6 Figure 9-4. An example of a fault.

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 7 Figure 9-7. An example of an error.

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 8 Figure 9-8. A fault can have an algorithmic cause.

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 9 Figure 9-9. A fault can have a mechanical cause, such as an earthquake.

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 10 Figure Test model with test cases. TestA consists of two tests, TestA1 and TestA2. TestB and TestC can be tested independently, but only after TestA has been performed. TestA:TestCase TestA1:TestCase TestA2:TestCase TestB:TestCaseTestC:TestCase precedes

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 11 Figure Use of the Bridge design pattern to interface to a component that is not yet complete, not yet known or unavailable during testing of another component (UML class diagram).

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 12 Figure Interface for a method computing the number of days in a given month (Java). The getNumDaysInMonth() method takes two parameters, a month and a year, both specified as integers. class MyGregorianCalendar {... public static int getNumDaysInMonth(int month, int year) {…}... }

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 13 Figure Equivalent flow graph for the getNumDaysInMonth() method implementation of Figure 9-14 (UML activity diagram). [year < 1] [month in (1,3,5,7,10,12)] n=32 throw2n=29 return throw1 n=28 n=30 [month in (4,6,9,11)] [month == 2][leap(year)]

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 14 Figure An example of a (faulty) implementation of the getNumDaysInMonth() method (Java). (continued on next slide) public class MonthOutOfBounds extends Exception {…}; public class YearOutOfBounds extends Exception {…}; class MyGregorianCalendar { public static boolean isLeapYear(int year) { boolean leap; if (year%4) { leap = true; } else { leap = false; } return leap; } /* … continued on next slide */

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 15 Figure An example of a (faulty) implementation of the getNumDaysInMonth() method (Java). (continued from previous slide) /* … continued from previous slide */ public static int getNumDaysInMonth(int month, int year) throws MonthOutOfBounds, YearOutOfBounds { int numDays; if (year < 1) { throw new YearOutOfBounds(year); } if (month == 1 || month == 3 || month == 5 || month == 7 || month == 10 || month == 12) { numDays = 32; } else if (month == 4 || month == 6 || month == 9 || month == 11) { numDays = 30; } else if (month == 2) { if (isLeapYear(year)) { numDays = 29; } else { numDays = 28; } } else { throw new MonthOutOfBounds(month); } return numDays; }... }

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 16 Figure Equivalent flow graph for the (faulty) isLeapYear() method implementation of Figure 9-14 (UML activity diagram) and derived tests. The test in italic is redundant with a test we derived for the getNumDaysInMonth() method.

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 17 Figure UML statechart diagram and resulting tests for 2Bwatch set time function. Only the first eight stimuli are shown. (test cases on next slide)

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 18 Figure Example of a hierarchal system decomposition with three layers (UML class diagram, layers represented by packages).

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 19 Figure Test coverage of integration test. The test case shown cover all possible dependencies in the subsystem decomposition.

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 20 Figure Sandwich testing strategy (UML activity diagram). None of the components in the target layer (i.e, B, C, D) are unit tested.

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 21 Figure An example of modified sandwich testing strategy (UML activity diagrams). The components of the target layer are unit tested before they are integrated with the top and bottom layers.

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 22 Figure An example of use case model for a subway ticket distributor (UML use case diagram).

Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 23 Figure Example of a PERT chart for a schedule of the sandwich tests shown in Figure 9-19.