Using UML, Patterns, and Java Object-Oriented Software Engineering Art for Chapter 11, Testing.

Slides:



Advertisements
Similar presentations
Chapter 11, Testing.
Advertisements

Chapter 11, Testing, Part 2: Integration and System Testing
Chapter 4,Use Case and Statechart Diagrams
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.
Managing Testing Presented by: Dana Ali Al-Malki.
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.
April 1, R McFadyen1 A Traditional Software Development Process Unit test Integration test System test Detailed design Architectural design.
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.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 5, Analysis: Dynamic Modeling.
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 9, Testing.
Integration Testing Presented By Nesreen Ahmad. *Main Points:-  Definition Of Integration Testing.  Procedure Of Integration Testing.  Integration.
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.
INTEGRATION TESTING ● After or during Unit Testing ● Putting modules together in a controlled way to incrementally build up the final system. ● Start with.
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 1 Software Engineering October 31, 2001 Testing.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 3, Project Organization and Communication.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 11: Testing.
1 CMSC 132: Object-Oriented Programming II Nelson Padua-Perez William Pugh Department of Computer Science University of Maryland, College Park.
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 3, Project Communication.
Object-Oriented Software Engineering, Ch. 9
CEN th Lecture April 5, 2006 Introduction to Software Engineering (CEN-4010) Spring 2006 Instructor: Masoud Sadjadi
INT-Evry (Masters IT– Soft Eng)IntegrationTesting.1 (OO) Integration Testing What: Integration testing is a phase of software testing in which.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 11, Testing.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 2, Modeling with UML.
Using UML, Patterns, and Java Object-Oriented Software Engineering Art for Chapter 8, Object Design: Reusing Pattern Solutions.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 1 Object Modeling.
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 Art for Chapter 7 System Design: Addressing Design Goals.
UML Review of diagram types. 2 Unified Modeling Language The Unified Modeling Language™ (UML) was developed jointly by Grady Booch, Ivar Jacobson, and.
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 1 Terminology  Reliability: The measure of.
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 1 Software Engineering September 19, 2001 UML.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 11, Testing, Part 2: Integration and System Testing.
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)
UML Review of Use case diagrams. 2 Unified Modeling Language The Unified Modeling Language™ (UML) was developed jointly by Grady Booch, Ivar Jacobson,
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 9, Testing.
Software testing techniques Software testing techniques Sandwich strategy Presentation on the seminar Kaunas University of Technology.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 9, Testing.
Software Engineering Zhang Shuang
COP 3331 Object-Oriented Analysis and Design 1 Design Overview  Design Overview (Ch 6)  Review of RAD  System Design  System Design Concepts  System.
1 Object Oriented Analysis System modeling = Functional modeling + Object modeling + Dynamic modeling Functional modeling = Use cases Object modeling =class.
Two New UML Diagram Types Component Diagram Deployment Diagram.
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.
Review for Final, Fall 2010 Close book, Close notes
Marius Skudžinskas IFM-02
null, true, and false are also reserved.
Introduction to Software Engineering (CEN-4010)
Chapter 11, Testing.
Chapter 11: Integration- and System Testing
Chapter 11: Integration and System Testing
Presentation transcript:

Using UML, Patterns, and Java Object-Oriented Software Engineering Art for Chapter 11, Testing

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 2 Figure 11-1, Testing activities and their related work products (continued on next slide). Functional test Structure test UserClientDeveloper Integration test Integration strategy From TP System decomposition From SDD Functional requirements From RAD Continued on next slide Object designUnit test From ODD Management plan Test planning User interface design Usability test From RAD Continued on next slide

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 3 Figure 11-1 (continued from previous slide). Acceptance test User manual Performance test Daily operationFunctional testInstallation test Field test UserClientDeveloper From RAD Functional requirements From RAD Nonfunctional requirements Project agreement

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 4 Figure 11-2, Model elements used during testing. 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 H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 5 Figure 11-3, An example of a fault.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 6 Figure 11-6, An example of an error.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 7 Figure 11-7, A fault can have an algorithmic cause.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 8 Figure 11-8, A fault can have a mechanical cause, such as an earthquake.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 9 Figure 11-9, Test model with test cases. TestA:TestCase TestA1:TestCase TestA2:TestCase TestB:TestCaseTestC:TestCase precedes

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 10 Figure 11-11, Equivalent flow graph for the getNumDaysInMonth() method implementation of Figure [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 H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 11 Figure 11-12, 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 {…}; public 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 H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 12 Figure 11-12, 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 H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 13 Figure 11-13, Equivalent flow graph for the (faulty) isLeapYear() method implementation of Figure and derived tests. [(year%4) == 0)] leap=true leap=false return

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 14 Figure 11-14, UML statechart diagram and resulting tests for 2Bwatch set time function. (test cases on next slide) MeasureTime SetTime 3.pressButtonsLAndR 5.pressButtonsLAndR/beep 4.after 2 min. DeadBattery 8.after 20 years7.after 20 years 1. pressButtonL pressButtonR 2. pressButtonL pressButtonR 6.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 15 Figure 11-15, A Strategy pattern for encapsulating multiple implementations of a NetworkInterface. NetworkConnection send() NetworkInterface open() WaveLANUMTS close() receive() send() receive() Ethernet setNetworkInterface() LocationManager Application open() close() send() receive() open() close() send() receive() open() close() send() receive()

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 16 Figure 11-17, Equivalent flow graph for the expanded source code of the NetworkConnection.send() method of Figure [nif instanceof Ethernet] [nif instanceof WaveLAN] wNif.isReady() eNif.isReady() uNif.isReady() [ready] [nif instanceof Ethernet] [nif instanceof WaveLAN] ; wNif.send() eNif.send() uNif.send()

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 17 Figure 11-18, Example of a hierarchal system decomposition with three layers. User Interface (A) Billing (B)Event Service (C)Learning (D) Database (E)Network (F)Neural Network (G) Layer III Layer II Layer I

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 18 Figure 11-19, Bottom up test strategy. After unit testing subsystems E, F, and G, the bottom up integration test proceeds with the triple test B,E,F and the double test D,G. Database (E)Network (F)Neural Network (G) User Interface (A) Billing (B)Learning (D) Triple test B,E,F Event Service (C) Double test D,G

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 19 Figure 11-20, Top down test strategy. After unit testing subsystem A, the integration test proceeds with the double tests (A,B), (A,C), and (A,D), followed by the quad test (A,B,C,D). Database (E)Network (F)Neural Network (G) User Interface (A) Billing (B)Learning (D) Double tests A,B; A,C; A,D Event Service (C) Quad test A,B,C,D

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 20 Test A Test G Test B,E,F Test D,G Test A,D Test A,B Test A,CTest A,B,C,D E,F,G Test A,B,C,D, Test E Test F Top layer Bottom layer Figure 11-21, Sandwich testing strategy.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 21 Test A Test G Test B,E,F Test D,G Test A,D Test A,B Test A,CTest A,B,C,D E,F,G Test A,B,C,D, Test E Test F Test B Test C Test D Top layer Target layer Bottom layer Figure 11-22, An example of modified sandwich testing strategy.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 22 Figure 11-23, An example of use case model for a subway ticket distributor. PurchaseTicket Passenger OutOfOrder Cancel NoChange TimeOut >

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 23 Figure 11-26, Example of a PERT chart for a schedule of the sandwich tests shown in Figure 9-19.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 24 Figure 11-27, JUnit test framework. Test TestCaseTestSuite TestResult run(TestResult) setUp() tearDown() testName:String run(TestResult) runTest() run(TestResult) addTest() ConcreteTestCase setUp() tearDown() runTest()