1 Phase Implementation. Janice Regan, 2008 2 Overview of Implementation phase Create Class Skeletons Define Implementation Plan (+ determine subphases)

Slides:



Advertisements
Similar presentations
Testing Relational Database
Advertisements

Construction process lasts until coding and testing is completed consists of design and implementation reasons for this phase –analysis model is not sufficiently.
10 Software Engineering Foundations of Computer Science ã Cengage Learning.
1 Lecture 2: Processes, Requirements, and Use Cases.
CIS-74 Computer Software Quality Assurance Systematic Software Testing Chapter 1: An Overview of the Testing Process.
CS3500 Software Engineering Legacy Systems (1) Legacy systems are software (and sometimes hardware) systems that have been developed sometime in the past.
Software Process Models
Programming Types of Testing.
Software Quality Assurance Inspection by Ross Simmerman Software developers follow a method of software quality assurance and try to eliminate bugs prior.
CMSC 345, Version 11/07 SD Vick from S. Mitchell Software Testing.
Gu & Maher University of Sydney, October 2004 DECO2005 Monitoring Team Process.
Integration testing Satish Mishra
Chapter 15 Design, Coding, and Testing. Copyright © 2005 Pearson Addison-Wesley. All rights reserved Design Document The next step in the Software.
Integration and System Testing CSSE 376, Software Quality Assurance Rose-Hulman Institute of Technology March 29, 2007.
Computer Science CS425/CS6258/23/20011 The Architecting Phase Class diagrams are further refined in this phase of development Object diagrams are created.
1 ES 314 Advanced Programming Lec 2 Sept 3 Goals: Complete the discussion of problem Review of C++ Object-oriented design Arrays and pointers.
Software System Integration
Chapter 3 Object-Oriented Analysis of Library Management System(LMS)
CMPT 275 Software Engineering
What is Software Architecture?
1 CMPT 275 Software Engineering Software life cycle.
University of Palestine software engineering department Testing of Software Systems Fundamentals of testing instructor: Tasneem Darwish.
Overview Integration Testing Decomposition Based Integration
1 Phase Implementation and Test Plan. Making your implementation plan First Steps  Consider your use case diagram and your prioritization of use cases.
Software Testing.
Understand Application Lifecycle Management
CS 360 Lecture 3.  The software process is a structured set of activities required to develop a software system.  Fundamental Assumption:  Good software.
1 ISA&D7‏/8‏/ ISA&D7‏/8‏/2013 Systems Development Life Cycle Phases and Activities in the SDLC Variations of the SDLC models.
1 CMPT 275 Phase: Design. Janice Regan, Map of design phase DESIGN HIGH LEVEL DESIGN Modularization User Interface Module Interfaces Data Persistance.
1 CMPT 275 Software Engineering Requirements Analysis Phase Requirements Analysis Activity (Identifying Objects, Scenarios) Janice Regan,
INT-Evry (Masters IT– Soft Eng)IntegrationTesting.1 (OO) Integration Testing What: Integration testing is a phase of software testing in which.
Chapter 5 Class Design. The Deliverables of the Class Design Process Class diagrams are further refined in this phase of development Object diagrams are.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
Testing Basics of Testing Presented by: Vijay.C.G – Glister Tech.
1 Sub-Phase Low Level Design (cont). Janice Regan, Map of design phase DESIGN HIGH LEVEL DESIGN Modularization User Interface Module Interfaces.
Computer ScienceSoftware Engineering Slide 1 Today l As3 grading Clarity, completeness, inconsistencies Comments l CVS guru name l Project assignment l.
CSE 219 Computer Science III Program Design Principles.
Low-Level Detailed Design SAD (Soft Arch Design) Mid-level Detailed Design Low-Level Detailed Design Design Finalization Design Document.
Lecture 3 Uses Cases Topics UML Use Cases pop quiz Readings: Chapter 3 January 24, 2008 CSCE 492 Software Engineering.
Homework Due Next Week Use Case Diagram, Class Diagram, User Interface, State Diagram.
Systems Analysis and Design in a Changing World, 3rd Edition
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
1 CMPT 275 Phase: Design. Janice Regan, Map of design phase DESIGN HIGH LEVEL DESIGN Modularization User Interface Module Interfaces Data Persistance.
Class Design Phases. Where Are We? We’ve done our Product Design resulting in –Use Cases/Use Case diagrams –Class diagrams (initial) –State diagrams –Deployment.
1 CMPT 275 High Level Design Phase Modularization.
1 Class Diagrams. 2 Overview Class diagrams are the most commonly used diagrams in UML. Class diagrams are for visualizing, specifying and documenting.
1 High Level Design Phase Refining Use Cases User Interface Information.
Software Engineering and Object-Oriented Design Topics: Solutions Modules Key Programming Issues Development Methods Object-Oriented Principles.
Phase Testing: More examples 1. Review: Selecting Glass box test cases  Determine what to test (select types of coverage)  Create a flowchart for code.
Chapter 7 Implementation. Implementation Approaches F Big bang –Code entire system and test in an unstructured manner F Top-down –Start by implementing.
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.
What is a level of test?  Defined by a given Environment  Environment is a collection of people, hard ware, software, interfaces, data etc.
1 Object-Oriented Analysis and Design with the Unified Process Figure 13-1 Implementation discipline activities.
HNDIT23082 Lecture 09:Software Testing. Validations and Verification Validation and verification ( V & V ) is the name given to the checking and analysis.
1 Software Testing & Quality Assurance Lecture 15 Created by: Paulo Alencar Modified by: Frank Xu.
Integrating the Code during the Development Alexander Vakrilov Telerik Corporation
Software Development Process CS 360 Lecture 3. Software Process The software process is a structured set of activities required to develop a software.
From the customer’s perspective the SRS is: How smart people are going to solve the problem that was stated in the System Spec. A “contract”, more or less.
Sub-Phase Low Level Design (cont)
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
Methodologies and Algorithms
Chapter 3: Using Methods, Classes, and Objects
Lecture 09:Software Testing
Software System Integration
Higher-Level Testing and Integration Testing
Analysis models and design models
Software Process Models
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
CS310 Software Engineering Lecturer Dr.Doaa Sami
Software System Integration
Presentation transcript:

1 Phase Implementation

Janice Regan, Overview of Implementation phase Create Class Skeletons Define Implementation Plan (+ determine subphases) Define Coding Standards For each unit Implement Methods in class/es Code review Unit test Create integration Test plan Create unit Test plans Release unit for integration Integration Testing System Testing Create system Test plan For each group of units

Janice Regan, Goal of Implementation Phase  Represent software system such that it can be understood by computer (audience)  Code design models using programming language  Software developers still part of our audience  Must plan how  Order in which modules and classes are built  How the modules/classes are to be combined  How the system will be tested to assure it meets the requirements  For our class project implementation phases will be defined on the basis of a group of use cases

Janice Regan, Overview of Implementation Phase  Planning Implementation and testing  Data persistence  GUI  Internal documentation:  Class skeletons  Code standard ( Programming style ) then  Unit test plan  Integration test plan  System test plan

Janice Regan, Where are we starting from? (1)  From low level design we have a detailed class diagram. Each class on the diagram shows  Attributes: visibility, name, multiplicity, type  [visibility] name [multiplicity] [: type] [= initial-value] [{property- string}]  -listOfBorrowedResources[1..*] : List  Name : String  Methods: visibility, name, parameters and their types, return type  [visibility] name [(parameter-list)] [: return-type]  +getDueDate(patronType:int, todaysDate:date):date  getName():String  The information from each class can help us create a class skeleton

Janice Regan, Sample class skeleton: following text public class Patron { /* Class semantics and roles: Library patrons function in two primary */ /*roles: as researchers who use the index, reference and database */ /*materials, and as borrowers of loanable resources */ /* Creation: New patrons are introduce into the system by library staff */ /*when presented with a library membership application. */ /* Deletion: Patrons are removed from the library database 3 years after */ /*their membership has expired */

Janice Regan, Patron class (continued - 2) /* Instance variables */ private string name; //name of Patron, Last, First, MI private long patronID; //Patron's library ID#, sequentially generated private long homePhone; // area code (3), local exchange (9) private Date memberDate; //date of first membership mmddyyyy private Date expireDate; //date membership expires mmddyyyy private List resourceList; //List of resources checked out by patron private Address homeAddress; /*Class Variables */ private static long nexPatronID; //next available patron ID #

Janice Regan, Patron class (continued - 3) /*Constructors */ public Patron(string n, long home, Date m, Date e, String street, string city, String province, long postalCode) { /* Parameters: n = name, home = homePhone, m = memberDate */ /*e=expireDate, patronID = getNextPatronID( ) */ /*street, city, province, postalCode create an Address object for */ /* homeAddress, resourceList is null */ /* Precondition: Library database can accept an additional entry */ /* and memory allocation succeeds */ /* Postcondition: Library database will contain an additional */ /* Patron and Address entry */ }

Janice Regan, Patron class (continued - 4) /*Static methods */ Public static long getnextPatronIDI O {return nextPatronID; nextPatronID++;} /*Nonstatic methods Public boolean validatePatron(Date e) { /*precondition: expireDate is not null */ } } // end class Patron

Janice Regan, Where are we starting from? (2)  For previous phases we have  One class diagram showing the static properties of the system  In practice one class diagram is often used for each subsystem making it easier to implement the subsystems independently  a series of interaction diagrams for separate use cases showing the dynamic behaviors of the system  A use case diagram showing the interrelation of the actors and use cases in the system  A list of core and less core requirements or prioritized requirements, cross referenced on the above diagrams  The above information may help us to decide the order of subsystem or module development. But HOW?

Janice Regan, Planning the Implementation Phase  Because software systems are complex, they must be built of parts, which are first developed (implemented) independently then assembled (integrated) into “builds”  This also renders the implementation phase more efficient as parts can be implemented in parallel  Planning of the Implementation Phase consists of planning implementation of parts and integration of parts into builds

Janice Regan, The Plan  Select implementation and test approach  Build schedule: implementation phase divided into sub phases (e.g. each phase may implement a group of use cases)  Each sub phase may include:  Coding units (unit: smallest code component that will be separately implemented and tested)  Planning of unit testing, Inspecting (+ bug fixing) each unit  Unit testing (+ bug fixing) each unit, Planning of integration testing  Integrating units  Integration testing (+ bug fixing) that is testing units together  Don’t forget to document which functional requirements are implemented in each sub phase

Janice Regan, Implementation Phase  Linear software development process (waterfall)  Each phase of the development process is executed once  The whole software system is developed and tested  Evolutionary Software development process  Some section of the software system is designed  This section is implemented and tested  These two steps are repeated for each successive section of the system.  Independent sections are integrated and integration tested  Sections may be composed of subsystems or of groups of use cases

Janice Regan, Implementation Approaches - 1  Big bang  Implement parts separately  Integrate and test all at once  Simple  OK for small projects  Difficult to debug (difficult to know which module is the culprit)  User does not see product until very late in the development process  You end up with a single build of the system

Janice Regan, Design of Real (read large) Systems  Using the big bang approach, which may work for class assignments, will likely lead to chaos  Source of errors difficult to determine  Slow, debugging difficult  Impractical, difficult to coordinate the work of multiple programmers, testers, and, developers  Must decide how to break down the system so it can be developed piece by piece in a predetermined order  Different programmers must be able to work on different pieces simultaneously  Want to provide ongoing feedback (showing progress) to the client

Janice Regan, Implementation Approaches - 2  Top-down (in terms of execution flow)  In OO: Start by implementing main method (where execution begins)  All classes instantiated by main( ) and all functions invoked by main( ) are implemented as stubs  Stub: “empty” class or method  Test main( ) by having it instantiating objects of its stub classes and by having it invoking stub methods

Janice Regan, Example of Top-Down: Step 1  Build the GUI  All actions by other parts of the system requested by the GUI are implemented as “stub methods”  A stub method  Has all arguments and return types of the final method  Contains no code to perform the actions expected of the method  Often will print a message indicating execution of the “stub method” has occurred (usually should include parameter values)  Can use the list of messages the 'stub methods' produce when this build is run to compare with interaction diagrams to test 'flow' through the steps of a use case

Janice Regan, Top down approach: Step 1 UI Stub

Janice Regan, Example of Top-Down: Step 2  Implement methods in the system directly called by the GUI  Methods implemented as stubs in the Step 1 build are then implemented (sequentially or in parallel). For our project these would be methods implementing the core of the system  Any methods called by these core that are not already implemented will be implemented as “stub methods”  for our project the 'stub methods' at this level would probably be mostly DB interface classes  Can use the list of messages the 'stub methods' produce when this build is run to compare with interaction diagrams to test 'flow' through the steps of a use case.  Completeness and correctness of implemented method can now also be tested

Janice Regan, Top down approach: Step 2 UI Stub Core functional layer (implemented stubs for Step 1)

Janice Regan, Example of Top-Down: Step 3  Implement methods in the system directly called by any already implemented methods  Methods implemented as stubs in the Step 2 build are then implemented (sequentially or in parallel)  Any methods called by the methods being implemented that are not already implemented are implemented as “stub methods” (If there are none this is our last iteration)  for our project the methods implemented at this level would probably be mostly DB interface classes  Can use the list of messages the 'stub methods' (if any) produce when this build is run to compare with interaction diagrams to test 'flow' through the steps of a use case.  Completeness and correctness of implemented method can now also be tested

Janice Regan, Top down approach: Step 3 UI functional layer (implemented stubs for Step 1) Database layer (implemented stubs for Step 2) Stub If any further stubs are needed Network (or other) layer (implemented stubs for Step 2) Stub

Janice Regan, Implementation Approaches - 3  Bottom-up  In OO: Start by implementing classes that do not use other classes or parts of our software system (i.e., classes that only use predefined classes)  Test using test drivers for each of these classes  A unit test driver for a class implements the unit test cases planned for that class. It should Create several objects (different states) from the class Display these objects (attribute values) Invoke all methods of each instantiated object

Janice Regan, Bottom up approach: Step 1 Database layer (base level methods that call no other methods) Driver

Janice Regan, Bottom up: example step 1  Implement all classes for the database layer  Write a unit test plan for each class  Write a test driver to implement the test plan  Unit test each class  Write an integration test plan to integrate each class into the DB layer  Write test drivers for integration test  Integration test the DB layer, tests whether all classes function properly together

Janice Regan, Bottom up approach: Step 2 Database layer (base level methods that call no other methods) Driver Functional layer (methods that call database level methods)

Janice Regan, Bottom up: example step 2  Implement all classes for the functional layer  Write a unit test plan for each class  Write a test driver to implement the test plan  Unit test each class  Write an integration test plan to integrate each class into the functional layer  Write test drivers for integration test of functional layer  Integration test the functional layer, tests whether all classes in the functional layer and DB layer function properly together

Janice Regan, Bottom up approach: Step 3 UI (call functional layer methods) functional layer (call database methods) Database layer (call no other methods) Network (or other) layer (implemented stubs for Step 2)

Janice Regan, Implementation Approaches Advantages and Disadvantages  Advantages to both  Integration test by adding modules to previously debugged modules  Advantages  Bottom up: Low-level (critical) modules built first, hence extensively tested  Top down: User interface is top-level module, hence built first. This is advantageous because UI eases testing  Top down; Stubs are easier to code than drivers  Disadvantage to both  Stubs/drivers must be written

Janice Regan, Implementation Approaches - 4  Threads  Implement and test a minimal set of classes implementing a function (thread = use case) e.g.: ManageResource: large thread, many closely related functions AddResource: small thread, single function  Advantage: partial software system ready for user consumption early (so early user feedback)  Disadvantage: order in which classes (units) are to be implemented not dictated by approach.  Must establish which units are most important from the users point of view and start with them

Janice Regan, LMS Implementation plan diagram  Order based on importance of each use case as expressed by the user/client Library staff browseResource requestResource reserveResource manageResource checkInResource checkOutResource resource patron managePatron genFormLetter Overdue form letter Phase 4 Phase 1 Phase 2 Phase 3

Janice Regan, LMS Example: Thread phase  Implementing checkInResource and checkOutResource use cases during sub phase 1  In this sub phase, we need to implement the following units, then integrate them into build 1  parts of classes in GUI subsystem  parts of classes such as LibrarySystem in LibraryStuff subsystem  parts of classes such as LibraryDB in DB subsystem  Parts of the Patron and Resource classes (and their children) in the LibraryStuff module Part of a class that has been implemented and tested as part of this sub phase GUI subsystem some class LibraryStuff subsystem Library System Resource Part of a class that has been implemented and tested as part of this sub phase DB subsystem LibraryDB Patron

Janice Regan, LMS Example: Thread phase  Possible order in which to implement the classes during sub phase 1:  GUI class(es) can be first implemented and unit tested  Resource class is then implemented and unit tested  Patron class is then implemented and unit tested  Finally, LibrarySystem and LibraryDB classes are implemented and unit tested  Once unit tested, they can all be integrated into build 1  Build 1 can be tested (integration testing) by performing the checkInResource use case (function) and the checkOutResource use case

Janice Regan, LMS Example: Thread phase  Implementing manageResource use case during sub phase 2  In this sub phase, we need to implement the following units, then integrate the into build 2  parts of classes in GUI subsystem  parts of classes such as LibrarySystem in LibraryStuff subsystem  parts of classes such as LibraryDB in DB subsystem  perhaps the entire Resource class (and its children) in the LibraryStuff module Part of a class that has been implemented and tested as part of this sub phase GUI subsystem some class LibraryStuff subsystem Library System Class that has been fully implemented and tested as part of this sub phase Resource Part of a class that has been implemented and tested as part of this sub phase DB subsystem LibraryDB

Janice Regan, LMS Example: Thread phase You need to consider if the parts of the classes being implemented in thread 2 are substantially independent of those implemented in thread 1  CASE A: If they are substantially different  You can produce build 2 by integrating all units developed during thread 2.  Build 2 can be developed at the same time as build 1.  When build 1 and build 2 have been individually integration tested they can be integrated together into build 3 and integration tested.  CASE B: If they substantially overlap can follow CASE A or  It may be more efficient to modify build 1 by sequentially integrating the partial classes (units) produced in thread 2 into build 1.  When all units for thread two have been integrated you have produced build 2.

Janice Regan, LMS Example: Thread phase  Possible order in which to implement the classes during sub phase 2:  GUI class(es) can be first implemented and unit tested  Resource class is then implemented and unit tested  Finally, LibrarySystem and LibraryDB classes are implemented and unit tested  Once unit tested, they can all be integrated into a build  This build (build 3 for CASE A, build 2 for CASE B) can be integration tested  CASE A build 2: by performing the ManageResource use case  CASE A build 3 and Case B build 2: by performing the checkInResource, the checkOutResource, and the manageResource use cases

Janice Regan, Implementation plan for class project  We shall use the thread implementation approach  Determine # of sub phases and their content  This is done by considering core use cases versus non-core use cases and distributing the core use cases in the earlier sub phase(s) and the non-core use cases in the later sub phases (why such distribution?)  Build Implementation Plan Schedule by scheduling the sub phases

Janice Regan, Test Planning and Test Phases  Unit Test Plan phase  Can be done as soon as you have detailed your classes (units)  Integration Test Plan phase  Technically, can be done as soon as you have defined your subsystems or use cases (parts)  Unit Test phase  Done after coding units, can be done in parallel with implementation phase  Integration Test phase  Done as you are integrating parts, can overlap implementation phase (while coding further units)

Janice Regan, Document: Implementation/Test Plan  To document your implementation plan, use  Implementation Plan Schedule  Schedule the sub phases ( coding, inspection, unit test plan, unit testing, integration test plan, integration, integration test) using a Gantt Chart  Add resource (name of assigned team member) to schedule  Update the Gantt chart for your project!  Describe the content of each sub phase  by using your Use Case Diagram (see Textbook, page 246, Deliverable 7.2, note that the textbook use the term “phase”, but we use the term “sub phase”)

Janice Regan, For your term project:  Use the thread implementation approach  Determine # of sub phases and their content  Consider core use cases vs non-core use cases  Distribute core use cases between the early phases  Distribute the non core use cases between the late phases  This way you will have a functional, if partially implemented project, after implementing the first phase or phases  Build the Implementation plan schedule by scheduling the resulting sub phases  Be sure you take into account the components needed to test each phase, are the phases independent or sequential.

Janice Regan, Evolutionary Software development  S oftware system to be developed is divided into development subgoals (phases)  A sub goal is  One use case for each iteration  A group of tightly coupled used cases for each iteration  In a pure evolutionary approach, each development sub goal is implemented by a full cycle through the development process, from requirements analysis to implementation and testing.