Top Banner
COMSATS Institute of Information Technology Requirements Engineering Requirements Engineering in Agile Methods Lecture-29
38

Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

Dec 28, 2015

Download

Documents

Vanessa Howard
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

COMSATS Institute of Information Technology

Requirements Engineering

Requirements Engineering in Agile Methods

Lecture-29

Page 2: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

2

Recap Requirement engineering in AMs

Page 3: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

3

Today’s lecture Requirement engineering in AMs Requirement methods

Page 4: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

XP and agile principles Incremental development is supported through small,

frequent system releases. Customer involvement means full-time customer

engagement with the team. People not process through pair programming, collective

ownership and a process that avoids long working hours. Change supported through regular system releases. Maintaining simplicity through constant refactoring of code.

Page 5: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

Customer involvement Customer involvement is a key part of XP where

the customer is part of the development team. The role of the customer is:

To help develop stories that define the requirements To help prioritize the features to be implemented in each

release To help develop acceptance tests which assess whether or

not the system meets its requirements.

Page 6: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

Requirements scenarios In XP, user requirements are expressed as scenarios or user

stories. These are written on cards and the development team break

them down into implementation tasks. These tasks are the basis of schedule and cost estimates.

The customer chooses the stories for inclusion in the next release based on their priorities and the schedule estimates.

Page 7: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

Story card for document downloading

Downloading and printing an article

First, you select the article that you want from a displayed list. Youthen have to tell the system how you will pay for it - this can eitherbe through a subscription, through a company account or by creditcard.

After this, you get a copyright form from the system to fill in and,when you have submitted this, the article you want is downloadedonto your computer.

You then choose a printer and a copy of the article is printed. Youtell the system if printing has been successful.

If the article is a print-only article, you canÕ t keep the PDF versionso it is automatically deleted from your computer .

Page 8: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

XP and change Conventional wisdom in software engineering is to design

for change. It is worth spending time and effort anticipating changes as this reduces costs later in the life cycle.

XP, however, maintains that this is not worthwhile as changes cannot be reliably anticipated.

Rather, it proposes constant code improvement (refactoring) to make changes easier when they have to be implemented.

Page 9: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

Refactoring Refactoring is the process of code improvement where code

is reorganised and rewritten to make it more efficient, easier to understand, etc.

Refactoring is required because frequent releases mean that code is developed incrementally and therefore tends to become messy.

Refactoring should not change the functionality of the system.

Automated testing simplifies refactoring as you can see if the changed code still runs the tests successfully.

Page 10: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

Testing in XP Test-first development. Incremental test development from scenarios. User involvement in test development and validation. Automated test harnesses are used to run all component

tests each time that a new release is built.

Page 11: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

Task cards for document downloading

Task 1: Implement principal workflow

Task 2: Implement article catalog and selection

Task 3: Implement payment collection

Payment may be made in 3 dif ferent ways. The userselects which way they wish to pay. If the userhas a library subscription, then they can input thesubscriber key which should be checked by thesystem. Alternatively , they can input an or ganisationalaccount number. If this is valid, a debit of the costof the article is posted to this account. Finally , theymay input a 16 digit credit card number and expirydate. This should be checked for validity and, ifvalid a debit is posted to that credit card account.

Page 12: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

Test case description

Test 4: Test credit card validity

Input:A string representing the credit card number and two integers representingthe month and year when the card expiresTests:Check that all bytes in the string are digitsCheck that the month lies between 1 and 12 and theyear is greater than or equal to the current year .Using the first 4 digits of the credit card number ,check that the card issuer is valid by looking up thecard issuer table. Check credit card validity by submitting the cardnumber and expiry date information to the cardissuerOutput:OK or error message indicating that the card is invalid

Page 13: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

Test-first development Writing tests before code clarifies the requirements to be

implemented. Tests are written as programs rather than data so that they

can be executed automatically. The test includes a check that it has executed correctly.

All previous and new tests are automatically run when new functionality is added. Thus checking that the new functionality has not introduced errors.

Page 14: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

Tools for Requirements Management in AMs UML Modeling Tools Requirements Negotiation Tools Instant Messaging Tools Project Management Tools

Page 15: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

15

Methods for Requirement Engineering

Page 16: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

Role of methods in RE Process of requirements engineering (RE) is

usually guided by a requirements method Requirement methods are systematic ways of

producing system models System models bridges gap between the

analysis and the design process

Page 17: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

Necessary properties for a RE method Suitability for agreement with the end-user The precision of definition of its notation Assistance with formulating requirements Definition of the world outside Scope for malleability Scope for integrating other approaches Scope for communication Tool support

Page 18: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

No ideal RE method There is no ideal requirement method A number of methods use a variety of

modelling techniques to formulate system requirements

System models can be enriched by modelling different aspects of using modelling techniques

Page 19: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

Modeling techniques Data-flow models Compositional models Classification models Stimulus-response models Process models

Page 20: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

Data flow modelling Based on the notion that systems can be

modelled as a set of interacting functions Uses data-flow diagrams (DFDs) to graphically

represent the external entities, processes, data-flow, and data stores

Page 21: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

Data flow notation

Page 22: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

Notation variability There is little uniformity in industry concerning

the DFD notation The notation shown was advanced by

DeMarco Gane and Sarson use rounded rectangles for

bubbles shadowed rectangles for sources and destinations, and squared off C’s for data stores

Orr uses rectangles for bubbles, ellipses for sources and destinations, and ellipses for data stores

Page 23: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

DFD example Consider a simple library system intended to

automate the issuing of library items The first data-flow diagram derived by the

analyst represents the ‘target’ system at its context level

The next level (level 1) of the data-flow diagram is constructed by decomposing the library system bubble into sub-functions

Page 24: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

Library example-Context level data flow diagram

Page 25: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

Library example -Level 1 data flow diagram

Page 26: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

Structured analysis The data-flow approach is typified by the

Structured Analysis method (SA) Two major strategies dominate structured

analysis ‘Old’ method popularised by DeMarco ‘Modern’ approach by Yourdon

Page 27: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

DeMarco A top-down approach

The analyst maps the current physical system onto the current logical data-flow model

The approach can be summarised in four steps: Analysis of current physical system Derivation of logical model Derivation of proposed logical model Implementation of new physical system

Page 28: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

Modern structured analysis Distinguishes between user’s real needs and

those requirements that represent the external behaviour satisfying those needs

Includes real-time extensions Other structured analysis approaches include:

Structured Analysis and Design Technique (SADT) Structured Systems Analysis and Design

Methodology (SSADM)

Page 29: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

Relational model Data may be modelled using the relational

model Specifies data as a set of tables, with some

columns being used as common keys Disadvantages of relational model

Implicit data typing

Inadequate modelling of relations

Data model should include information about the semantics of the data

Page 30: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

Semantic model Approaches to semantic data modelling

include: Entity-relationship model (Chen, 1976) RM/ T (Codd, 1979) SDM (Hammer and McLeod, 1981)

Models identify the entities in a database, their attributes and their relationships

Uses graphical notations

Page 31: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

Notation for semantic data modelling

Page 32: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

Extensions to entity relationship model The basic ERM has been extended to include

sub and super-types to the basic entity and relation primitives

Types may have sub-types Types may inherit the attributes of their super-

types In addition, sub-types may have private

attributes

Page 33: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

ERM example - Software requirement

Page 34: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

Object-oriented approaches Closest precursor is entity relationship model Requirements methods based on object

orientation: Shlaer and Mellor (1988) Colbert (1989) Coad and Yourdon (1989) Wirf-Brock (1990) Rumbaugh (1991) Jacobson (1992) Martin-Odell (1992)

Notations for the various methods are semantically similar

Page 35: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

Object Are major actors, agents, and servers in the

problem space of the system Identified by analysing the domain Objects include:

Devices that the system interacts with Systems that interface with the system under

study Organisational units Things that must be remembered over time Physical locations or sites Specific roles played by humans

Page 36: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

Basic concepts Encapsulation Class Inheritance Operations or Services

Page 37: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

Object definition Something real or abstract about which we

store data and those operations that manipulate the data

Examples include:An account, a sensor, a software design, a car , an

organisation May be composite - composed of other

objects

Page 38: Requirements Engineering Requirements Engineering in Agile Methods Lecture-29.

38

Summary Requirement Engineering in AMs

XP Customer involvement Requirement scenarios Changes/Refactoring Testing

Requirement methods System models