390 likes | 541 Views
Introduction to Software Process. Software Engineering January 9, 2007. Software Lifecycle. Definition The complete history of a software system from concept formation through decommission broken down into the following “maturation” phases: Requirements elicitation and definition
E N D
Introductionto Software Process Software Engineering January 9, 2007
Software Lifecycle • Definition The complete history of a software system from concept formation through decommission broken down into the following “maturation” phases: • Requirements elicitation and definition • Requirements elaboration and specification • Design • Architectural Design • Detailed Design • Implementation • Coding • Unit Testing • Integration • Subsystem testing • System testing (acceptance testing) • Operation & Maintenance • Corrective : removing bugs ( 17.5% ) • Enhancement: improving exiting capability = perfective ( 60.5%) + adaptive ( 18% ) • Reengineering (includes adaptive and perfective maintenance) • Retirement Construction
Life Cycle Costs Requirements = 6% Integration = 24% Specification = 15% Unit Testing = 21% Design = 19% Coding = 15% (Schach - Classical and Object-Oriented Software Engineering)
Process Models • Definition Process models are “algorithms for developing software.” Software process is the execution of a process model.Data = development artifacts; Processors = people; Algorithms = methods + tools • Popular Models • Water Fall • Rapid Prototyping (throwaway & evolutionary) • Incremental Development • Reengineering • Spiral Model
Water Fall Model Features & Contributions • Author: Winston Royce 1970 • First formal software development method (1950-70). • Encouraged specification of what the system is supposed to do before building it. • Encouraged planning and management monitoring and control. • Each development phase was completed before the next could begin. • Documents produced as the output of one phase become inputs to the next phase.These documents provided a basis for verification and validation. • Did not allow for changing requirements. Frequently, the user was not happy with the delivered system. Code & Unit Test System Requirements Integration & Test Software Requirements rework Architectural Design rework Detailed Design rework rework Installation & Maintenance rework
Water Fall Model • System Requirements:The system concept is defined, customer and client requirements are captured, hardware and software components defined and mapped. • Software Requirements:a formal (complete, precise, consistent, and unambiguous) description of“what” each software component must dois prepared by the developer and reviewed by the customer (software specification document); asoftware project planis produced at the end of this phase. • Design phase:The specification is elaborated in two steps that define “how” the product will work: Architectural Design breaks down the whole system into component parts (modules) and the interactions between them (interfaces);Detailed Designinvolves elaborating the design of individual components by specifying data structures and algorithms. • Code & Unit:Software module designs are translated to code and then unit tested. • Integration & Test: Software modules are integrated into larger functional aggregates (subsystems) and tested in the operational environment. The final step tests the complete system (acceptance testing or validation – customer agrees that the system meets the specification). • Installation & Maintenance: The completed system is installed in the operational environment and maintained (error correction and enhancement) for the remainder of the system lifetime.
Errors Detected Errors Introduced Requirements Specification Design Code UnitTest Integration & Test System AcceptanceTests Water Fall Model Ref:The Impact of Prototyping on Software System Engineering, by Hassan Gomaa, George Mason University, IEEE System and Software Requirements Engineering, 1990.
Prototyping • Prototyping The rapid and (relatively) inexpensive development of an operating model of the desired system (or a subset) developed only for the purpose of defining or elaborating requirements, and/or resolving unknown performance issues before a full commitment of resources is made to produce the final system. • Benefits • Water Fall models limit the amount of iteration among phases – a key feature of prototyping is iterating rapidly through early phases of development. • Water Fall models tend to produce a working system very late in the development cycle – thus major problems may go undetected until the system is almost complete. Prototyping focuses on identifying major technical problems as early as possible. • System requirements cannot be properly validated without a working version – prototyping focuses on understanding and elaborating requirements through demonstration. Ref:The Impact of Prototyping on Software System Engineering, by Hassan Gomaa, George Mason University, IEEE System and Software Requirements Engineering, 1990.
Prototyping Requirements for a Prototype • It must be an actual working system with which one can experiment and from which lessons can be learned to revise the requirements specification. • It must be comparatively cheap to develop – approximately 10% of the total estimated cost of the complete system. • Must be developed quickly so that it may be evaluated early in the development cycle; it should be used to collect early feedback from system users. Phases of Development • Preliminary analysis and specification of user requirements. (understand user's problem) • Design and implementation of a prototype. (emphasize user interface, small development team, development language, use prototyping development tools) • Exercise the prototype. (preliminary user training, user feedback) • Iterative refinement of the prototype. • Refinement of the requirements specification. • Design and implementation of the production system. See Notes
Prototyping • Throwaway Prototypes are constructed as part of the problem understanding or analysis activity. Their purpose is to gain a deeper understanding of the problem and its feasible solutions. It is a learning device never intended for use - it is “thrown away” after it has served its purpose. • Because the prototype will be discarded, the time and effort spent on satisfying non-functional requirements and formal documentation can almost be eliminated. This reduces development time. • This approach should focus on understanding of requirements from the user's perspective and to obtain early user feedback. • Evolutionary Prototypes are constructed to satisfy a subset of the system requirements - as refinements are made or layers of functionality are added, they “evolve” into the final system. • Because each increment or prototype version is to be of production quality, non-functional requirements must be considered and some formal documentation must be part of the prototyping process. • The incremental nature of evolutionary prototyping ensures that a useful version of the system is produced earlier that water fall methods. See Notes
Reengineering Process Model Legacy Test Procedures,Test Data & Results Legacy System Legacy Baseline EstablishBaseline Reuse & ModifyLegacyUnits LegacyRequirements ExtractRequirements Identified Legacy Unitsfor Reuse & Modification Proposed New Capability NewRequirements ExtractDesign Set of Test-readyLegacy Units Modified Requirements LegacyDesign Re-TestLegacy Units Requirements Analysis Re-testProcedures TestedLegacy Units TestChanges Reuse Libraries Produce New Test Plan Integration testProcedures DesignChanges Integrate & TestAll Units Identifiyoff-the-shelf Units For reuse Without modification New Design New Unit testProcedures Modify &Enhance Design Construct & Testnew Units Testednew Units Target System New Design Off-the-shelf Unitsready for Integration
Spiral Model A cyclic approach to software development marked by four basic stages that are repeated on each cycle until the target system is delivered. A risk-drivenmeta model.Developed by Barry Boehm, “A Spiral Model of Software Development and Enhancement”, IEEE Computer, Vol 21, No 5, May 1988. Stage 1: Identify objectives, alternative solutions, and constraints for the part of the system currently under consideration. Stage 2: Evaluate alternatives and identify associated risks using prototyping and simulation. Stage 3: Develop and verify the next system increment. Stage 4: Review outcome of earlier stages and plan the next cycle.
See Notes Spiral Model 2:Evaluate alternatives and their risks 1:Determine objectives, alternative solutions, & constraints. risk analysis prototyping Acceptance & Installation Design Planning Implementation Review Test 3:Develop, verify next system increment. 4:Review outcome and Plan next cycle.
Nominal Process Flow or Execution Process Quality Assessment and Control Product Quality Assessment and Control (Project Mangement) Progress & QualityAssessment Progress & Quality Data Process Change Directives Metrics Repository Effort and Size Metrics Quality Metrics QualityReview DevelopmentActivity or Procedure Product Specifications Raw Products Quality Products (and specification for next Activity) Product Change Directives See Notes Measurement and Control
Overview of USP Requirements Elicitation (Definition) Problem Statement & User Needs Use Case Model Requirements Elaboaration (OO-Analysis) The process of defining and modeling the Problem Space The process of defining and modeling the Solution Space Object-Oriented Design Analysis Model Mapping design to Implementation Space Design & Deployment Models Object-Oriented Implementation (Programming) Code in an OOPL (Ada95) (C++)(Java) ComponentModel
Overview of USP Birth Death • Inception (focus on “Feasibility”) Develop a vision of the end product and prepare a business case. Answers the questions: • What is the system boundary? Begin to identify interfaces with systems outside the boundary. • What is the system going to do? What are the major classes of users?(Develop Initial Use Case Model)( Identify and describe only a small % of use cases ) • What is a possible system architecture? ( Identify most critical subsystems ) • What is the project plan? What will the system cost?( Identify critical risks ) (Develop a Project Management Plan) • Demonstrate feasibility by building a prototype. • Elaboration • Construction • Transition Inception Elaboration Construction Transition Itera- tion Itera- tion Itera- tion Itera- tion Itera- tion Itera- tion Itera- tion Itera- tion Itera- tion Itera- tion … …
Overview of USP Birth Death • Inception • Elaboration ( focus on “Do-Ability” )(Architecture + high-fidelity cost est.) • Develop detailed use cases(80% of use cases). • Develop a stable architecturalview of the system using the Analysis Model, Design Model, Implementation Model, and Deployment Model. • Create a baseline system specification (SRS). • Produce the Software Development Plan (SDP)which describes the next phase. • Construction • Transition Inception Elaboration Construction Transition Itera- tion Itera- tion Itera- tion Itera- tion Itera- tion Itera- tion Itera- tion Itera- tion Itera- tion Itera- tion … … Arch. Design Detailed Design
Overview of USP Birth Death • Inception • Elaboration • Construction (focus on building an operational capability) Build the system (usually in increments defined by releases ). Each release encapsulates defined use cases. Releases are ordered by priority determined by customer needs and project risks. • Transition (focus on producing a formal release ) Product (release) enters beta testingand thendistribution. This phase involvesmanufacturing, training, and providingcustomer supportinfrastructure. Transition ends with maintenance: corrective, adaptive, perfective. Inception Elaboration Construction Transition Itera- tion Itera- tion Itera- tion Itera- tion Itera- tion Itera- tion Itera- tion Itera- tion Itera- tion Itera- tion … …
test1 OK test2 OK Overview of USP verified by USDP Models specified by Use Case Model realized by Test Model distributed by Analysis Model implemented by Implementation Model Design Model Deployment Model
Overview of USP Core Work Flows Construction Inception Elaboration Transition Elicitation Analysis Design Implementation Test Distribution of Core Activities Across Phases
Use Case Modeling September 18, 2002
Requirements Capture • Input Client approaches Developer with a problem and or product concept. This may be expressed verbally or in the form of a document (Statement of Work (SOW)) (Request for Proposal (RFP)) • Activities Developer interacts with Client and Users to elicit product requirements. This involves face-to-face meetings and possibly the exchange of technical documents. The Developer must determine as completely and precisely as possible the following information: • cost and time constraints • target system platform and operational environment • user groups • functional capabilities • non-functional constraints: quality and performance • Client and User's needs(as opposed to "wants") • Outputs A complete understanding of the problem the Client and Users needto have solved. Client should be in agreement with the Developer’s assessment of the problem. This shared view of the system is captured in the form of a UML Use Case Model.
Use Case Model • Definitions1 A Use Case is a sequence of actions that the system performs to offer some results of value to a User. • Use casesdrive the whole development process. “They offer a systematic and intuitive means of capturing functional requirements from the user’s perspective.” • A system has many types of users. Each type of user is define by anactor. Actors may be people or external systems. Actors interact with the product via one or more Use Cases. An actor role is defined by a particular set of use cases performed by that actor to accomplish a particular goal or objective. • “All actors and uses cases make up a Use Case Model.” • A good collection of use cases is central to understanding what your users want. Use Cases also present a good vehicle for project planning, because they control iterative development, … it gives regular feedback to users about where the software is going. • Use cases provide the basis of communicationbetween theclientand thedevelopers in planning the project. 1The Unified Software Development Process,by Rumbaugh, Jacobson, and Booch, Addison-Wesley, 1999, 0-201-57169-2.
Use Case Model • Definition2(Fowler) A Use Case captures a typical interaction between a user and a computer system. • A use case captures some user-visible function. • A use case may be small or large. • A use case achieves a discrete objective for the user. In its simplest usage, you capture a use case by talking to typical users and discussing the various things they might want to do with the system. Take each discrete task or action they want to do, give it a name, and write up a short description. During the Elaboration phase, this is all you need to do to get started. 2UML Distilled, by Scott & Fowler
Use Case Model Outline • Title (System Name, Author Name, Assignment, Course, Pub. Date) • TOC • List of Figures (optional for small documents) • System Summary • Overview of System Purpose and Context • Business Case ( business need and how this system will address this need ) • System Operation • Use Case Diagram • Supporting Narrative (explains diagram: operational flow, actor roles ) • System Interfaces ( External Interfaces with Actors ) • Use Case Specifications • Purpose ( function from user’s perspective ) • Collaboration diagram (flow of interactions between actors and interface objects ) • Narrative summary of use case purpose or function • Precondition (system states & triggering events ) • Flow of Events (nominal flow of interaction events between actor and interface objects) • Alternative Paths (error processing flows; special case flows ) • Post Condition (system states & completion events ) • Special Requirements (non-functional : performance and quality ) • Requirements Traceability • Glossary
Structure Use Case Model Find Actors & Use Cases System Analyst Prioritize Use Cases System Architect Use Case Specialist Detail Use Cases Prototype User Interface User Interface Designer Requirements Elicitation Work Flow
Requirements Elaboration • Purpose "To achieve a more precise understanding of requirements and to achieve a description of requirements that is easy to maintain and that helps give structure to the whole system - including the architecture." • Inputs • Outputs from Requirements Elicitation ( Use Case Model ). • Technical documents or expertise relevant to problem domain, in general, and to the Client's problem, in particular. • Legacy System (optional) • Activities Refine requirements by eliminating inconsistencies and ambiguities. Formalize requirements by preparing a System/Software Requirements Specification. Develop an initial Software Development Plan. • Outputs • System/Software Requirements Specification (SRS) • UML Use Case Model and Scenarios • UML Class Model • UML Collaboration Model • UML Sequence Diagrams • Problem Glossary • Other info. • Software Development Plan (SDP)
Software Requirements Specification (SRS)1 1 IEEE Std 830-1998 • Title • TOC 1. Introduction 1.1 Purpose 1.2 Scope 1.3 Definitions, Acronyms, and Abbreviations 1.4 References 1.5 Overview 2. Overall Description 2.1 Product Perspective 2.2 Product Functions 2.3 User Characteristics 2.4 Constraints 2.5 Assumptions and Dependencies 3.0 Specific Requirements … next slide
Software Requirements Specification (SRS) 3.0 Specific Requirements 3.1 External Interfaces 3.2 Functions 3.3 Performance Requirements 3.4 Logical Database Requirements 3.5 Design Constraints 3.6 Software System Quality Attributes 3.7 Object Oriented Models 3.7.1 Analysis Class Model 3.7.2 Analysis Collaboration Model 3.8 Additional Comments • Index • Appendices
Software Development Plan (SDP)2 • Front Matter (Title, Toc, Lof, Lot) 1. Overview 1.1 Project Summary 1.2 Evolution of Plan 2. References 3. Definitions 4. Project Organization 5. Managerial Process Plans 5.1 Start-up Plan 5.2 Work Plan 5.3 Control Plan 5.4 Risk Management Plan 5.5 Closeout Plan 6. Technical Process Plan 7. Supporting Plans 2 IEEE Std 1058-1998
Design (USP) • Purpose The system is shaped to accommodate all functional and non-functional requirements. It contributes to a sound and stable architecture and creates a blueprint for the implementation model. • Acquire an in-depth understanding of non-functional requirements and constraints related to: programming languages, component reuse, operating systems, distribution topology, network and database technologies, user-interface technology, etc. • Define and harden the boundaries between subsystems. • Artifacts • Design Model An object model that describes the physical realization of use cases by focusing on how functional and non-functional requirements, together with other constraints related to the implementation environment, impact the system architecture and structure. • Design classes • Use-case realizations (design) • Detailed Interfaces
Design (USP) • Artifacts • Architecture Description A view of the design model focusing on the following architecturally significant artifacts: • Subsystems, interfaces, and their dependencies • Key classes that trace to key analysis and active classes • Key use case realizations that are functionally critical and need to be developed early in the lifecycle. Ones that have coverage across subsystems are particularly important. • Deployment Model An object model that describes the physical distribution of the system in terms of how functionality is distributed among computational nodes. An essential input to the activities in design and implementation. It is a manifestation of the mapping between software architecture and system architecture. • Nodes that denote computational resources • Node processes and corresponding functional allocation • Node relationships and their types (internet, shared memory, ATM link, etc.) • Network topology(ies)
Implementation (USP) • Purpose To translate the design into machine-readable and executable form. Specifically to: • Plan system integrations required in each implementation increment or iteration • Distribute the system by mapping executable components to nodes in the deployment model. • Implement design classes and subsystems found in the Design Model. • Unit test the components, and integrate them by compiling and linking them together into one or more executables, before they are sent to integration and system tests. • Artifacts • Implementation Model • Components: <executable>, <file>, <library>, <Dbtable>, <document> • Interfaces • Implementation subsystems • Components • Implementation Subsystems • Interfaces • Build Plan
Integration & Test (USP) • Purpose To verify the result of each build and to validate the complete system via acceptance tests. • Plan tests required in each iteration, including integration and system tests. Integration tests are required after each build, while system tests are done as part of client acceptance and system delivery. • Design and implement test plans by creating test cases. Test cases specify what to test and define procedures and programs for conducting test exercises. • Perform various test cases to capture and verify test results. Defects are formally captured, tracked and removed before delivery.
Integration & Test (USP) • Artifacts • Test Plan Describes testing strategies, resources, and schedule for each build and for the system. • Test Model • Test Case • Test Component • Test Procedure • Test Cases Designed to verify certain requirements and use cases, or use case scenarios. Demonstrates that pre- and post-conditions of use cases are satisfied. Predicts or describes expected component output and behavior. • Test Components The implementation artifacts to be tested. • Test Procedures Specifies how to perform one or several test cases. Test programs (or "harnesses")(or "benches") and shell scripts may have to be executed as part of a test procedure. • Test Evaluations Capture results of test cases; declares whether or not test case was successful; generates defect or anomaly reports for tracking. • Defect or Anomaly Reports
IEEE Std (829) for Software Testing • Test Plan To prescribe the scope, approach, resources, and schedule of testing activities. To identify items to be tested, the features to be tested, the testing tasks to be performed, the personnel responsible for each task, and the risks associated with the plan. • Test Design Spec • Test Case Spec • Test Procedure Spec • Test Item Transmittal Report • Test Log • Test Incident Report • Test Summary Report