146 - CS8494, CS6403 Software Engineering - Notes
146 - CS8494, CS6403 Software Engineering - Notes
com
Software Engineering
UNIT I
0 Systems Engineering
– Software as part of larger system, determine requirements for all system
elements, allocate requirements to software.
1 Software Requirements Analysis
– Develop understanding of problem domain, user needs, function, performance,
interfaces, ...
– Software Design
– Multi-step process to determine architecture, interfaces, data structures,
functional detail. Produces (high-level) form that can be checked for quality,
conformance before coding.
2 Coding
– Produce machine readable and executable form, match HW, OS and design needs.
3 Testing
www.BrainKart.com
www.BrainKart.com
Software Engineering
0 Often, a customer defines a set of general objectives for software but does not identify
detailed input, processing, or output requirements.
1 In other cases, the developer may be unsure of the efficiency of an algorithm, the
adaptability of an operating system, or the form that human –machine interaction should
take
2 In this case prototyping paradigm may offer the best approach
3 Requirements gathering
4 Quick design
5 Prototype building
6 Prototype evaluation by customers
7 Prototype may be refined
www.BrainKart.com
www.BrainKart.com
Software Engineering
5888 Prototype thrown away and software developed using formal process{ it is used
to define the requirement} Prototyping
Strengths:
23 Requirements can be set earlier and more reliably
24 Customer sees results very quickly.
25 Customer is educated in what is possible helping to refine requirements.
26 Requirements can be communicated more clearly and completely
27 Between developers and clients Requirements and design options can be
investigated quickly and Cheaply
Weaknesses:
– Requires a rapid prototyping tool and expertise in using it–a cost for the
development organisation
– Smoke and mirrors - looks like a working version, but it is not.
The RAD Model:
23 Rapid Application Development is a linear sequential software development process
model that emphasizes an extremely short development cycle
24 Rapid application achieved by using a component based construction approach
25 If requirements are well understood and project scope is constrained the RAD process
enables a development team to create a ―fully functional systemǁ
Team # n
M o d e lin g
busin es s m
odeling dat a m
odeling
proc es s m odeling
Team # 2 C o n st ru ct io n
e aut om at ic c
c om ponent r eus
g d a t a m od eli n g
p ro cess m odeling
Planning
Co nst r uct i o n Deployment
Team # 1 co m p o n e n t re u int egrat ion
se aut omat ic cod
e deliv ery
Modeling g enerat io f ee dback
n t est ing
busine ss mo d e lin g
d at a mo deling
p ro ce ss mod e ling
6 0 - 9 0 d ays
RAD phases :
5888 Business modeling
5889 Data modeling
5890 Process modeling
www.BrainKart.com
www.BrainKart.com
Software Engineering
23 Application generation
24 Testing and turnover
Business modeling:
25 What information drives the business process?
26 What information is generated?
27 Who generates it?
5888 The information flow defined as part of the business modeling phase is refined
into a set of data objects that are needed to support the business.
5889 The characteristics ( called attributes) of each object are identified and the
relationships between these objects are defined
23 The data modeling phase are transformed to achieve the information flow necessary to
implement a business function.
24 Processing descriptions are created for adding , modifying, deleting, or retrieving a data
object
0 Since the RAD process emphasizes reuse, many of the program components have already
been testing.
1 This reduces over all testing time.
2 However, new components must be tested and all interfaces must be fully exercised
Advantages &Disadvantages of
RAD: Advantages
3 Extremely short development time.
4 Uses component-based construction and emphasises reuse and code generation
Disadvantages
5 Large human resource requirements (to create all of the teams).
6 Requires strong commitment between developers and customers for “rapid-fire”
activities.
7 High performance requirements maybe can’t be met (requires tuning the components).
The Incremental Model
incr em ent #n
d e li ve r y of
n t h i ncrem e nt
incr em ent # 2
d e li ve r y of
incr em ent # 1 2 n d incr em e nt
d e li ve r y of
1 st incre me nt
www.BrainKart.com
www.BrainKart.com
Software Engineering
www.BrainKart.com
www.BrainKart.com
Software Engineering
System Engineering
0 Software engineering occurs as a consequence of a process called system engineering.
1 Instead of concentrating solely on software, system engineering focuses on a variety of
elements, analyzing, designing, and organizing those elements into a system that can be a
product, a service, or a technology for the transformation of information or control.
www.BrainKart.com
www.BrainKart.com
Software Engineering
The system engineering process usually begins with a ―world view.ǁ That is, the entire business
or product domain is examined to ensure that the proper business or technology context can
be established.
The world view is refined to focus more fully on specific domain of interest. Within a specific
domain, the need for targeted system elements (e.g., data, software, hardware, people) is
analyzed. Finally, the analysis, design, and construction of a targeted system element is
initiated.
At the top of the hierarchy, a very broad context is established and, at the bottom, detailed
technical activities, performed by the relevant engineering discipline (e.g., hardware or
software engineering), are conducted.
Stated in a slightly more formal manner, the world view (WV) is composed of a set of
domains (Di), which can each be a system or system of systems in its own right. WV =
{D1, D2, D3, . . . , Dn}
0 Each domain is composed of specific elements (Ej) each of which serves some role in
accomplishing the objective and goals of the domain or component:
Di = {E1, E2, E3, . . . , Em}
0 Finally, each element is implemented by specifying the technical components (Ck) that
achieve the necessary function for an element:
Ej = {C1, C2, C3, . . . , Ck}
www.BrainKart.com
www.BrainKart.com
Software Engineering
www.BrainKart.com
www.BrainKart.com
Software Engineering
0 The final BPE step—construction and integration focuses on implementation detail. The
architecture and infrastructure are implemented by constructing an appropriate database and
internal data structures, by building applications using software components, and by selecting
appropriate elements of a technology infrastructure to support the design created during BSD.
Each of these system components must then be integrated to form a complete information
system or application.
1 The integration activity also places the new information system into the business area
context, performing all user training and logistics support to achieve a smooth transition.
www.BrainKart.com
www.BrainKart.com
Software Engineering
0 System component engineering is actually a set of concurrent activities that address each of
the system components separately: software engineering, hardware engineering, human
engineering, and database engineering.
0 Each of these engineering disciplines takes a domain-specific view, but it is important to note
that the engineering disciplines must establish and maintain active communication with one
another. Part of the role of requirements engineering is to establish the interfacing
mechanisms that will enable this to happen.
1 The element view for product engineering is the engineering discipline itself applied to the
allocated component. For software engineering, this means analysis and design modeling
activities (covered in detail in later chapters) and construction and integration activities that
encompass code generation, testing, and support steps.
2 The analysis step models allocated requirements into representations of data, function, and
behavior. Design maps the analysis model into data, architectural, interface, and soft ware
component-level designs.
www.BrainKart.com
www.BrainKart.com
Software Engineering
UNIT II SOFTWARE
REQUIREMENTS
0 The process of establishing the services that the customer requires from a system and the
constraints under which it operates and is developed
1 Requirements may be functional or non-functional
0 Functional requirements describe system services or functions
1 Non-functional requirements is a constraint on the system or on the development
process
Types of requirements
0 User requirements
0 Statements in natural language (NL) plus diagrams of the services the system
provides and its operational constraints. Written for customers
1 System requirements
0 A structured document setting out detailed descriptions of the system services.
Written as a contract between client and contractor
2 Software specification
0 A detailed software description which can serve as a basis for a design or
implementation. Written for developers
Functional requirements
0 Functionality or services that the system is expected to provide.
1 Functional requirements may also explicitly state what the system shouldn‘t do.
2 Functional requirements specification should be:
0 Complete: All services required by the user should be defined
1 Consistent: should not have contradictory definition (also avoid ambiguity
don‘t leave room for different interpretations)
Non-Functional requirements
www.BrainKart.com
www.BrainKart.com
Software Engineering
0 Requirements that are not directly concerned with the specific functions delivered by the
system
1 Typically relate to the system as a whole rather than the individual system features
2 Often could be deciding factor on the survival of the system (e.g. reliability, cost, response
time)
Non-functional
requir ements
Domain requirements
0 Domain requirements are derived from the application domain of the system rather than from
the specific needs of the system users.
1 May be new functional requirements, constrain existing requirements or set out how
particular computation must take place.
2 Example: tolerance level of landing gear on an aircraft (different on dirt, asphalt, water), or
what happens to fiber optics line in case of sever weather during winter Olympics (Only
domain-area experts know)
Product requirements
0 Specify the desired characteristics that a system or subsystem must possess.
1 Most NFRs are concerned with specifying constraints on the behaviour of the executing
system.
Specifying product requirements
0 Some product requirements can be formulated precisely, and thus easily quantified
0 Performance
1 Capacity
www.BrainKart.com
www.BrainKart.com
Software Engineering
0 Others are more difficult to quantify and, consequently, are often stated informally
0 Usability
Process requirements
0 Process requirements are constraints placed upon the development process of the system
1 Process requirements include:
0 Requirements on development standards and methods which must be followed
1 CASE tools which should be used
2 The management reports which must be provided
External requirements
0 May be placed on both the product and the process
1 Derived from the environment in which the system is developed
2 External requirements are based on:
0 application domain information
1 organisational considerations
2 the need for the system to work with other systems
3 health and safety or data protection regulations
4 or even basic natural laws such as the laws of physics
Software Document
0 Should provide for communication among team members
www.BrainKart.com
www.BrainKart.com
Software Engineering
Us et h e req ui rement s
Manag er s d ocum en t t opl an abi dfo rt h e s
ys tem an d to pl a n th e
sy st em dev elo pmen t p ro ces s
Us e t h e req ui rement s to
Sy st e m eng in eers un ders tan d wh at s ys tem i sto b e
dev elo ped
Sy st e m t es t Us et he req ui rement s to
eng in eers d ev elo p v al id ati on tes ts fo r t h
es ys tem
Process Documentation
0 Used to record and track the development process
0 Planning documentation
1 Cost, Schedule, Funding tracking
2 Schedules
3 Standards
www.BrainKart.com
www.BrainKart.com
Software Engineering
Product Documentation
0 System Documentation
0 Describes how the system works, but not how to operate it
1 Examples:
0 Requirements Spec
1 Architectural Design
2 Detailed Design
3 Commented Source Code
0 Including output such as JavaDoc
4 Test Plans
0 Including test cases
5 V&V plan and results
6 List of Known Bugs
2 User Documentation has two main types
0 End User
1 System Administrator
0 In some cases these are the same people
2 The target audience must be well understood!
3 There are five important areas that should be documented for a formal release of a software
application
0 These do not necessarily each have to have their own document, but the topics should
be covered thoroughly
4 Functional Description of the Software
5 Installation Instructions
6 Introductory Manual
7 Reference Manual
8 System Administrator‘s Guide
Document Quality
0 Providing thorough and professional documentation is important for any size product
development team
www.BrainKart.com
www.BrainKart.com
Software Engineering
0 The problem is that many software professionals lack the writing skills to create
professional level documents
Document Structure
0 All documents for a given product should have a similar structure
0 A good reason for product standards
1 The IEEE Standard for User Documentation lists such a structure
0 It is a superset of what most documents need
2 The authors ―best practicesǁ are:
3 Put a cover page on all documents
4 Divide documents into chapters with sections and subsections
5 Add an index if there is lots of reference information
6 Add a glossary to define ambiguous terms
Standards
0 Standards play an important role in the development, maintenance and usefulness of
documentation
1 Standards can act as a basis for quality documentation
0 But are not good enough on their own
0 Usually define high level content and organization
2 There are three types of documentation standards
1.Process Standards
0 Define the approach that is to be used when creating the documentation
1 Don‘t actually define any of the content of the documents
2. Product Standards
0 Goal is to have all documents created for a specific product attain a consistent structure and
appearance
0 Can be based on organizational or contractually required standards
1 Four main types:
0 Documentation Identification Standards
1 Document Structure Standards
2 Document Presentation Standards
3 Document Update Standards
2 One caveat:
0 Documentation that will be viewed by end users should be created in a way that is
best consumed and is most attractive to them
1 Internal development documentation generally does not meet this need
3. Interchange Standards
0 Deals with the creation of documents in a format that allows others to effectively use
0 PDF may be good for end users who don‘t need to edit
1 Word may be good for text editing
www.BrainKart.com
www.BrainKart.com
Software Engineering
Other Standards
0 IEEE
0 Has a published standard for user documentation
1 Provides a structure and superset of content areas
2 Many organizations probably won‘t create documents that completely match the
standard
1 Writing Style
0 Ten ―best practicesǁ when writing are provided
1 Author proposes that group edits of important documents should occur in a similar
fashion to software walkthroughs
Requ i rement s
Feasibili ty
stu dy eli citation an d
analysi s
Requir ement s
speci fi cati on
Requ i rement s
d ocumen t
Feasibility Studies
0 A feasibility study decides whether or not the proposed system is worthwhile
1 A short focused study that checks
0 If the system contributes to organisational objectives
1 If the system can be engineered using current technology and within budget
2 If the system can be integrated with other systems that are used
2 Based on information assessment (what is required), information collection and report
writing
3 Questions for people in the organisation
0What if the system wasn‘t implemented?
1What are current process problems?
2How will the proposed system help?
www.BrainKart.com
www.BrainKart.com
Software Engineering
System models
0 Different models may be produced during the requirements analysis activity
1 Requirements analysis may involve three structuring activities which result in these different
models
0 Partitioning – Identifies the structural (part-of) relationships between entities
1 Abstraction – Identifies generalities among entities
2 Projection – Identifies different ways of looking at a problem
2 System models will be covered on January 30
Scenarios
0 Scenarios are descriptions of how a system is used in practice
1 They are helpful in requirements elicitation as people can relate to these more readily than
abstract statement of what they require from a system
2 Scenarios are particularly useful for adding detail to an outline requirements description
Ethnography
0 A social scientists spends a considerable time observing and analysing how people actually
work
1 People do not have to explain or articulate their work
2 Social and organisational factors of importance may be observed
3 Ethnographic studies have shown that work is usually richer and more complex than
suggested by simple system models
www.BrainKart.com
www.BrainKart.com
Software Engineering
Requirements validation
0 Concerned with demonstrating that the requirements define the system that the customer
really wants
1 Requirements error costs are high so validation is very important
0 Fixing a requirements error after delivery may cost up to 100 times the cost of fixing
an implementation error
2 Requirements checking
0 Validity
1 Consistency
2 Completeness
3 Realism
4 Verifiability
Requirements management
0 Requirements management is the process of managing changing requirements during the
requirements engineering process and system development
1 Requirements are inevitably incomplete and inconsistent
0 New requirements emerge during the process as business needs change and a better
understanding of the system is developed
1 Different viewpoints have different requirements and these are often contradictory
Software prototyping
Incomplete versions of the software program being developed. Prototyping can also be
used by end users to describe and prove requirements that developers have not considered
Benefits:
The software designer and implementer can obtain feedback from the users early in the
project. The client and the contractor can compare if the software made matches the software
specification, according to which the software program is built.
It also allows the software engineer some insight into the accuracy of initial project
estimates and whether the deadlines and milestones proposed can be successfully met.
Process of prototyping
1. Identify basic requirements
Determine basic requirements including the input and output information desired. Details,
such as security, can typically be ignored.
www.BrainKart.com
www.BrainKart.com
Software Engineering
Dimensions of prototypes
1. Horizontal Prototype
It provides a broad view of an entire system or subsystem, focusing on user interaction more
than low-level system functionality, such as database access. Horizontal prototypes are useful
for:
0 Confirmation of user interface requirements and system scope
1 Develop preliminary estimates of development time, cost and effort.
2 Vertical Prototypes
A vertical prototype is a more complete elaboration of a single subsystem or function. It is
useful for obtaining detailed requirements for a given function, with the following benefits:
0 Refinement database design
1 Obtain information on data volumes and system interface needs, for network sizing and
performance engineering
Types of prototyping
Software prototyping has many variants. However, all the methods are in some way
based on two major types of prototyping: Throwaway Prototyping and Evolutionary Prototyping.
1. Throwaway prototyping
Also called close ended prototyping. Throwaway refers to the creation of a model that
will eventually be discarded rather than becoming part of the final delivered software. After
preliminary requirements gathering is accomplished, a simple working model of the system is
constructed to visually show the users what their requirements may look like when they are
implemented into a finished system.
The most obvious reason for using Throwaway Prototyping is that it can be done quickly.
If the users can get quick feedback on their requirements, they may be able to refine them early in
the development of the software. Making changes early in the development lifecycle is extremely
cost effective since there is nothing at that point to redo. If a project is changed after a
considerable work has been done then small changes could require large efforts to implement
since software systems have many dependencies. Speed is crucial in implementing a throwaway
prototype, since with a limited budget of time and money little can be expended on a prototype
that will be discarded.
Strength of Throwaway Prototyping is its ability to construct interfaces that the users can
test. The user interface is what the user sees as the system, and by seeing it in front of them, it is
much easier to grasp how the system will work.
www.BrainKart.com
www.BrainKart.com
Software Engineering
2. Evolutionary prototyping
Evolutionary Prototyping (also known as breadboard prototyping) is quite different from
Throwaway Prototyping. The main goal when using Evolutionary Prototyping is to build a very
robust prototype in a structured manner and constantly refine it. "The reason for this is that the
Evolutionary prototype, when built, forms the heart of the new system, and the improvements
and further requirements will be built.
Evolutionary Prototypes have an advantage over Throwaway Prototypes in that they are
functional systems. Although they may not have all the features the users have planned, they may
be used on a temporary basis until the final system is delivered.
In Evolutionary Prototyping, developers can focus themselves to develop parts of the
system that they understand instead of working on developing a whole system. To minimize risk,
the developer does not implement poorly understood features. The partial system is sent to
customer sites. As users work with the system, they detect opportunities for new features and
give requests for these features to developers. Developers then take these enhancement requests
along with their own and use sound configuration-management practices to change the software-
requirements specification, update the design, recode and retest.
3. Incremental prototyping
The final product is built as separate prototypes. At the end the separate prototypes are
merged in an overall design.
4. Extreme prototyping
Extreme Prototyping as a development process is used especially for developing web
applications. Basically, it breaks down web development into three phases, each one based on the
preceding one. The first phase is a static prototype that consists mainly of HTML pages. In the
second phase, the screens are programmed and fully functional using a simulated services layer.
In the third phase the services are implemented. The process is called Extreme Prototyping to
draw attention to the second phase of the process, where a fully-functional UI is developed with
very little regard to the services other than their contract.
Advantages of prototyping
0 Reduced time and costs: Prototyping can improve the quality of requirements and
specifications provided to developers. Because changes cost exponentially more to implement as
they are detected later in development, the early determination of what the user really wants can
result in faster and less expensive software.
1 Improved and increased user involvement: Prototyping requires user involvement and
allows them to see and interact with a prototype allowing them to provide better and more
complete feedback and specifications. The presence of the prototype being examined by the user
prevents many misunderstandings and miscommunications that occur when each side believe the
other understands what they said. Since users know the problem domain better than anyone on
the development team does, increased interaction can result in final product that has greater
tangible and intangible quality. The final product is more likely to satisfy the users‘ desire for
look, feel and performance.
www.BrainKart.com
www.BrainKart.com
Software Engineering
Disadvantages of prototyping
0 Insufficient analysis: The focus on a limited prototype can distract developers from properly
analyzing the complete project. This can lead to overlooking better solutions, preparation of
incomplete specifications or the conversion of limited prototypes into poorly engineered final
projects that are hard to maintain. Further, since a prototype is limited in functionality it may not
scale well if the prototype is used as the basis of a final deliverable, which may not be noticed if
developers are too focused on building a prototype as a model.
1 User confusion of prototype and finished system: Users can begin to think that a prototype,
intended to be thrown away, is actually a final system that merely needs to be finished or
polished. (They are, for example, often unaware of the effort needed to add error -checking and
security features which a prototype may not have.) This can lead them to expect the prototype to
accurately model the performance of the final system when this is not the intent of the
developers. Users can also become attached to features that were included in a prototype for
consideration and then removed from the specification for a final system. If users are able to
require all proposed features be included in the final system this can lead to conflict.
2 Developer misunderstanding of user objectives: Developers may assume that users share
their objectives (e.g. to deliver core functionality on time and within budget), without
understanding wider commercial issues. For example, user representatives attending Enterprise
software (e.g. PeopleSoft) events may have seen demonstrations of "transaction auditing" (where
changes are logged and displayed in a difference grid view) without being told that this feature
demands additional coding and often requires more hardware to handle extra database accesses.
Users might believe they can demand auditing on every field, whereas developers might think
this is feature creep because they have made assumptions about the extent of user requirements.
If the developer has committed delivery before the user requirements were reviewed, developers
are between a rock and a hard place, particularly if user management derives some advantage
from their failure to implement requirements.
3 Developer attachment to prototype: Developers can also become attached to prototypes they
have spent a great deal of effort producing; this can lead to problems like attempting to convert a
limited prototype into a final system when it does not have an appropriate underlying
architecture. (This may suggest that throwaway prototyping, rather than evolutionary prototyping,
should be used.)
4 Excessive development time of the prototype: A key property to prototyping is the fact that it
is supposed to be done quickly. If the developers lose sight of this fact, they very well may try to
develop a prototype that is too complex. When the prototype is thrown away the precisely
developed requirements that it provides may not yield a sufficient increase in productivity to
make up for the time spent developing the prototype. Users can become stuck in debates over
details of the prototype, holding up the development team and delaying the final product.
5 Expense of implementing prototyping: the start up costs for building a development team
focused on prototyping may be high. Many companies have development methodologies in place,
and changing them can mean retraining, retooling, or both. Many companies tend to just jump
into the prototyping without bothering to retrain their workers as much as they should.
A common problem with adopting prototyping technology is high expectations for productivity
with insufficient effort behind the learning curve. In addition to training for the use of a
prototyping technique, there is an often overlooked need for developing corporate and project
www.BrainKart.com
www.BrainKart.com
Software Engineering
specific underlying structure to support the technology. When this underlying structure is
omitted, lower productivity can often result.
Methods
There are few formal prototyping methodologies even though most Agile Methods rely
heavily upon prototyping techniques.
1. Dynamic systems development method
Dynamic Systems Development Method (DSDM) is a framework for delivering business
solutions that relies heavily upon prototyping as a core technique, and is itself ISO 9001
approved. It expands upon most understood definitions of a prototype. According to DSDM the
prototype may be a diagram, a business process, or even a system placed into production. DSDM
prototypes are intended to be incremental, evolving from simple forms into more comprehensive
ones.
DSDM prototypes may be throwaway or evolutionary. Evolutionary prototypes may be evolved
horizontally (breadth then depth) or vertically (each section is built in detail with additional
iterations detailing subsequent sections). Evolutionary prototypes can eventually evolve into final
systems.
0 Identify prototype
1 Agree to a plan
2 Create the prototype
3 Review the prototype
www.BrainKart.com
www.BrainKart.com
Software Engineering
2. Operational prototyping
Operational Prototyping was proposed by Alan Davis as a way to integrate throwaway and
evolutionary prototyping with conventional system development. "[It] offers the best of both the
quick-and-dirty and conventional-development worlds in a sensible manner. Designers develop
only well-understood features in building the evolutionary baseline, while using throwaway
prototyping to experiment with the poorly understood features."
Davis' belief is that to try to "retrofit quality onto a rapid prototype" is not the correct approach
when trying to combine the two approaches. His idea is to engage in an evolutionary prototyping
methodology and rapidly prototype the features of the system after each evolution.
The specific methodology follows these steps:
0 An evolutionary prototype is constructed and made into a baseline using conventional
development strategies, specifying and implementing only the requirements that are well
understood.
1 Copies of the baseline are sent to multiple customer sites along with a trained prototyper.
2 At each site, the prototyper watches the user at the system.
3 Whenever the user encounters a problem or thinks of a new feature or requirement, the
prototyper logs it. This frees the user from having to record the problem, and allows them
to continue working.
4 After the user session is over, the prototyper constructs a throwaway prototype on top of
the baseline system.
5 The user now uses the new system and evaluates. If the new changes aren't effective, the
prototyper removes them.
6 If the user likes the changes, the prototyper writes feature-enhancement requests and
forwards them to the development team.
7 The development team, with the change requests in hand from all the sites, then produce a
new evolutionary prototype using conventional methods.
Obviously, a key to this method is to have well trained prototypers available to go to the user
sites. The Operational Prototyping methodology has many benefits in systems that are complex
and have few known requirements in advance.
www.BrainKart.com
www.BrainKart.com
Software Engineering
5. Scrum
Scrum is an agile method for project management. The approach was first described by
Takeuchi and Nonaka in "The New New Product Development Game" (Harvard Business
Review, Jan-Feb 1986).
www.BrainKart.com
www.BrainKart.com
Software Engineering
Tools
Efficiently using prototyping requires that an organization have proper tools and a staff
trained to use those tools. Tools used in prototyping can vary from individual tools like 4th
generation programming languages used for rapid prototyping to complex integrated CASE tools.
4th generation programming languages like Visual Basic and ColdFusion are frequently used
since they are cheap, well known and relatively easy and fast to use. CASE tools are often
developed or selected by the military or large organizations. Users may prototype elements of an
application themselves in a spreadsheet.
3. Sketchflow
Sketch Flow, a feature of Microsoft Expression Studio Ultimate, gives the ability to quickly
and effectively map out and iterate the flow of an application UI, the layout of individual screens
and transition from one application state to another.
0 Interactive Visual Tool
1 Easy to learn
2 Dynamic
3 Provides enviroment to collect feedback
1 Visual Basic
One of the most popular tools for Rapid Prototyping is Visual Basic (VB). Microsoft Access,
which includes a Visual Basic extensibility module, is also a widely accepted prototyping tool
that is used by many non-technical business analysts. Although VB is a programming language it
has many features that facilitate using it to create prototypes, including:
0 An interactive/visual user interface design tool.
1 Easy connection of user interface components to underlying functional behavior.
2 Modifications to the resulting software are easy to perform.
www.BrainKart.com
www.BrainKart.com
Software Engineering
1 LYMB
LYMB is an object-oriented development environment aimed at developing applications
that require combining graphics-based user interfaces, visualization, and rapid prototyping.
7. Non-relational environments
Non-relational definition of data (e.g. using Cache or associative models can help make
end-user prototyping more productive by delaying or avoiding the need to normalize data at
every iteration of a simulation. This may yield earlier/greater clarity of business requirements,
though it does not specifically confirm that requirements are technically and economically
feasible in the target production system.
8. PSDL
PSDL is a prototype description language to describe real-time software.
System prototyping
0 Prototyping is the rapid development of a system
1 In the past, the developed system was normally thought of as inferior in some way to the
required system so further development was required
2 Now, the boundary between prototyping and normal system development is blurred and
many systems are developed using an evolutionary approach
www.BrainKart.com
www.BrainKart.com
Software Engineering
Prototyping process
Establish Define
prototype prototype Develop Evaluate
prototype prototype
objectives functionality
Data Model
0 Used to describe the logical structure of data processed by the system
1 Entity-relation-attribute model sets out the entities in the system, the relationships between
these entities and the entity attributes
2 Widely used in database design. Can readily be implemented using relational databases
3 No specific notation provided in the UML but objects and associations can be used
www.BrainKart.com
www.BrainKart.com
Software Engineering
Behavioural Model
0 Behavioural models are used to describe the overall behaviour of a system
1 Two types of behavioural model are shown here
0Data processing models that show how data is processed as it moves through the system
1State machine models that show the systems response to events
2 Both of these models are required for a description of the system‘s behaviour
Data-processing models
0 Data flow diagrams are used to model the system‘s data processing
1 These show the processing steps as data flows through a system
2 Intrinsic part of many analysis methods
3 Simple and intuitive notation that customers can understand
4 Show end-to-end processing of data
www.BrainKart.com
www.BrainKart.com
Software Engineering
www.BrainKart.com
www.BrainKart.com
Software Engineering
Statecharts
Allow the decomposition of a model into submodels
A brief description of the actions is included following the ‗do‘ in each state
Can be complemented by tables describing the states and the stimuli
Structured Analysis
The data-flow approach is typified by the Structured Analysis method (SA)
Two major strategies dominate structured analysis
0 ‗Old‘ method popularised by DeMarco
0 ‗Modern‘ approach by Yourdon
DeMarco
A top-down approach
0 The analyst maps the current physical system onto the current logical data-flow
model
The approach can be summarised in four steps:
0 Analysis of current physical system
1 Derivation of logical model
2 Derivation of proposed logical model
3 Implementation of new physical system
Method weaknesses
They do not model non-functional system requirements.
They do not usually include information about whether a method is appropriate for a given
problem.
The may produce too much documentation.
The system models are sometimes too detailed and difficult for users to understand.
CASE workbenches
A coherent set of tools that is designed to support related software process activities such as
analysis, design or testing.
Analysis and design workbenches support system modelling during both requirements
engineering and system design.
These workbenches may support a specific design method or may provide support for a
creating several different types of system model.
www.BrainKart.com
www.BrainKart.com
Software Engineering
Centr al Query
infor mation langua ge
repo sit ory f acilities
Diagram editors
Model analysis and checking tools
Repository and associated query language
Data dictionary
Report definition and generation tools
Forms definition tools
Import/export translators
Code generation tools
Data Dictionary
Data dictionaries are lists of all of the names used in the system models. Descriptions of the
entities, relationships and attributes are also included
Advantages
0Support name management and avoid duplication
1Store of organisational knowledge linking analysis, design and implementation
Many CASE workbenches support data dictionaries
www.BrainKart.com
www.BrainKart.com
Software Engineering
UNIT III
Design Models – 1:
www.BrainKart.com
www.BrainKart.com
Software Engineering
Data Design
– created by transforming the data dictionary and ERD into implementation data
structures
– requires as much attention as algorithm design
Architectural Design
– derived from the analysis model and the subsystem interactions defined in the
DFD
Interface Design
– derived from DFD and CFD
– describes software elements communication with
0 other software elements
0 other systems
0 human users
Procedure-level design
– created by transforming the structural elements defined by the software
architecture into procedural descriptions of software components
– Derived from information in the PSPEC, CSPEC, and STD
0 Process should not suffer from tunnel vision – consider alternative approaches
1 Design should be traceable to analysis model
2 Do not try to reinvent the wheel
use design patterns ie reusable components
0 Design should exhibit both uniformity and integration
1 Should be structured to accommodate changes
Abstraction
– allows designers to focus on solving a problem without being concerned about
irrelevant lower level details
Procedural abstraction is a named sequence of instructions that has a specific and limited
function
e.g open a door
Open implies a long sequence of procedural steps
data abstraction is collection of data that describes a data object
e.g door type, opening mech, weight,dimen
Design Patterns
– description of a design structure that solves a particular design problem within a
specific context and its impact when applied
Design Concepts -3 :
www.BrainKart.com
www.BrainKart.com
Software Engineering
Software Architecture
– overall structure of the software components and the ways in which that structure
– provides conceptual integrity for a system
Information Hiding
– information (data and procedure) contained within a module is inaccessible to
modules that have no need for such information
Functional Independence
– achieved by developing modules with single-minded purpose and an aversion to
excessive interaction with other models
Objects
– encapsulate both data and data manipulation procedures needed to describe the
content and behavior of a real world entity
Class
– generalized description (template or pattern) that describes a collection of similar
objects
Inheritance
– provides a means for allowing subclasses to reuse existing superclass data and
procedures; also provides mechanism for propagating changes
Messages
– the means by which objects exchange information with one another
Polymorphism
– a mechanism that allows several objects in an class hierarchy to have different
methods with the same name
– instances of each subclass will be free to respond to messages by calling their own
version of the method
www.BrainKart.com
www.BrainKart.com
Software Engineering
Functional independence
– modules have high cohesion and low coupling
Cohesion
– qualitative indication of the degree to which a module focuses on just one thing
Coupling
– qualitative indication of the degree to which a module is connected to other
modules and to the outside world
The architecture is not the operational software. Rather, it is a representation that enables a
software engineer to:
analyze the effectiveness of the design in meeting its stated requirements,
consider architectural alternatives at a stage when making design changes is still relatively easy,
and
reduce the risks associated with the construction of the software.
Data centered
– file or database lies at the center of this architecture and is accessed frequently by
other components that modify data
Data flow
– input data is transformed by a series of computational components into output data
– Pipe and filter pattern has a set of components called filters, connected by pipes that
transmit data from one component to the next.
– If the data flow degenerates into a single line of transforms, it is termed batch
sequential
Object-oriented
– components of system encapsulate data and operations, communication between
components is by message passing
www.BrainKart.com
www.BrainKart.com
Software Engineering
Layered
– several layers are defined
– each layer performs operations that become closer to the machine instruction set in
the lower layers
– program structure decomposes function into control hierarchy with main program
invoking several subprograms
Layered Architecture:
Number of different layers are defined, each accomplishing operations that progressively
become closer to the machine instruction set
At the outer layer –components service user interface operations.
At the inner layer – components perform operating system interfacing.
Intermediate layers provide utility services and application software function
Architecture Tradeoff Analysis – 1:
1. Collect scenarios
2. Elicit requirements, constraints, and environmental description
3. Describe architectural styles/patterns chosen to address scenarios and requirements
0 module view
1 process view
2 data flow view
Architecture Tradeoff Analysis – 2:
Evaluate quality attributes independently (e.g. reliability, performance, security,
maintainability, flexibility, testability, portability, reusability, interoperability)
Identify sensitivity points for architecture
0 any attributes significantly affected by changing in the architecture
Refining Architectural Design:
• Processing narrative developed for each module
• Interface description provided for each module
• Local and global data structures are defined
• Design restrictions/limitations noted
• Design reviews conducted
www.BrainKart.com
www.BrainKart.com
Software Engineering
www.BrainKart.com
www.BrainKart.com
Software Engineering
Systems in the same domain often have similar architectures that reflect domain concepts.
Application product lines are built around a core architecture with variants that satisfy particular
customer requirements.
The architectural model of a system may conform to a generic architectural model or style.
An awareness of these styles can simplify the problem of defining system architectures.
However, most large systems are heterogeneous and do not follow a single architectural style.
www.BrainKart.com
www.BrainKart.com
Software Engineering
www.BrainKart.com
www.BrainKart.com
Software Engineering
Distributed system model which shows how data and processing is distributed across a range of
components.
Set of stand-alone servers which provide specific services such as printing, data management,
etc.
Set of clients which call on these services.
Network which allows clients to access servers.
www.BrainKart.com
www.BrainKart.com
Software Engineering
Structure the system into a set of loosely coupled objects with well-defined interfaces.
Object-oriented decomposition is concerned with identifying object classes, their attributes and
operations.
When implemented, objects are created from these classes and some control model used to
coordinate object operations.
www.BrainKart.com
www.BrainKart.com
Software Engineering
Produce
Design dynamic design Evaluate design
prototype with end-users
prototype
Impl ement
Ex ecutable final user
prototype
int erface
UI design principles
User familiarity
0 The interface should be based on user-oriented terms and concepts rather than
computer concepts
1 E.g., an office system should use concepts such as letters, documents, folders etc.
rather than directories, file identifiers, etc.
Consistency
0 The system should display an appropriate level of consistency
1 Commands and menus should have the same format, command punctuation should be
similar, etc.
Minimal surprise
0 If a command operates in a known way, the user should be able to predict the
operation of comparable commands
Recoverability
0 The system should provide some interface to user errors and allow the user to recover
from errors
User guidance
0 Some user guidance such as help systems, on-line manuals, etc. should be supplied
User diversity
0 Interaction facilities for different types of user should be supported
1 E.g., some users have seeing difficulties and so larger text should be available
User-system interaction
Two problems must be addressed in interactive systems design
0 How should information from the user be provided to the computer system?
1 How should information from the computer system be presented to the user?
Interaction styles
Direct manipulation
0 Easiest to grasp with immediate feedback
1 Difficult to program
Menu selection
0 User effort and errors minimized
1 Large numbers and combinations of choices a problem
www.BrainKart.com
www.BrainKart.com
Software Engineering
Form fill-in
0 Ease of use, simple data entry
1 Tedious, takes a lot of screen space
Natural language
0 Great for casual users
1 Tedious for expert users
Information presentation
Information presentation is concerned with presenting system information to system users
The information may be presented directly or may be transformed in some way for presentation
The Model-View-Controller approach is a way of supporting multiple presentations of data
Information display
1
0 10 20
42
Textual highlighting
!
echo os ean oth er na me
Ch . 1 6U s er i nt erface d esi gn
OK Ca ncel
Data visualisation
Concerned with techniques for displaying large amounts of information
www.BrainKart.com
www.BrainKart.com
Software Engineering
Visualisation can reveal relationships between entities and trends in the data
Possible data visualisations are:
0 Weather information
1 State of a telephone network
2 Chemical plant pressures and temperatures
3 A model of a molecule
Colour adds an extra dimension to an interface and can help the user understand complex
information structures
Can be used to highlight exceptional events
0 The use of colour to communicate meaning
Error message design is critically important. Poor error messages can mean that a user
rejects rather than accepts a system
Messages should be polite, concise, consistent and constructive
The background and experience of users should be the determining factor in message
design
Some evaluation of a user interface design should be carried out to assess its suitability
Full scale evaluation is very expensive and impractical for most systems
Ideally, an interface should be evaluated against req
However, it is rare for such specifications to be produced
Given a stimulus, the system must produce a response within a specified time
2 classes
Periodic stimuli. Stimuli which occur at predictable time intervals
0 For example, a temperature sensor may be polled 10 times per second
Aperiodic stimuli. Stimuli which occur at unpredictable times
0 For example, a system power failure may trigger an interrupt which must be
processed by the system
Architectural considerations
www.BrainKart.com
www.BrainKart.com
Software Engineering
Because of the need to respond to timing demands made by different stimuli / responses, the
system architecture must allow for fast switching between stimulus handlers
Timing demands of different stimuli are different so a simple sequential loop is not usually
adequate
Real-time systems:
Systems which monitor and control their environment
Inevitably associated with hardware devices
– Sensors: Collect data from the system environment
– Actuators: Change (in some way) the system's
environment
Time is critical. Real-time systems MUST respond within specified times
Definition:
A real-time system is a software system where the correct functioning of the system
depends on the results produced by the system and the time at which these results
are produced
A ‗soft‘ real-time system is a system whose operation is degraded if results are not
produced according to the specified timing requirements
A ‗hard‘ real-time system is a system whose operation is incorrect if results are not
produced according to the timing specification
Given a stimulus, the system must produce a esponse within a specified time
Periodic stimuli. Stimuli which occur at predictable time intervals
– For example, a temperature sensor may be polled 10 times per second
Aperiodic stimuli. Stimuli which occur at unpredictable times
– For example, a system power failure may trigger an interrupt which must be
processed by the system
Because of the need to respond to timing demands made by different stimuli/responses, the
system architecture must allow for fast switching between stimulus handlers
Timing demands of different stimuli are different so a simple sequential loop is not usually
adequate
Real-time systems are usually designed as cooperating processes with a real-time executive
controlling these processes
A real-time system model:
www.BrainKart.com
www.BrainKart.com
Software Engineering
Real-ti me co n
tro l sys tem
System elements:
Sensors control processes
– Collect information from sensors. May buffer information collected in response to a
sensor stimulus
Data processor
– Carries out processing of collected information and computes the system response
Actuator control
– Generates control signals for the actuator
Identify the stimuli to be processed and the required responses to these stimuli
For each stimulus and response, identify the timing constraints
Aggregate the stimulus and response processing into concurrent processes. A process may
be associated with each class of stimulus and response
Design algorithms to process each class of stimulus and response. These must meet the given
timing requirements
Design a scheduling system which will ensure that processes are started in time to meet their
deadlines
Integrate using a real-time executive or operating system
Timing constraints:
May require extensive simulation and experiment to ensure that these are met by the system
May mean that certain design strategies such as object-oriented design cannot be used
because of the additional overhead involved
May mean that low-level programming language features have to be used for performance
reasons
Hard-real time systems may have to programmed in assembly language to ensure that
deadlines are met
Languages such as C allow efficient programs to be written but do not have constructs to
support concurrency or shared resource management
Ada as a language designed to support real-time systems design so includes a general
purpose concurrency mechanism
Non-stop system components:
www.BrainKart.com
www.BrainKart.com
Software Engineering
Configuration manager
– Responsible for the dynamic reconfiguration of the system software and
hardware. Hardware modules may be replaced and software upgraded without
stopping the systems
Fault manager
– Responsible for detecting software and hardware faults and taking appropriate
actions (e.g. switching to backup disks) to ensure that the system continues in
operation
Burglar alarm system e.g
A system is required to monitor sensors on doors and windows to detect the presence of
intruders in a building
When a sensor indicates a break-in, the system switches on lights around the area and calls
police automatically
The system should include provision for operation without a mains power supply
Sensors
0 Movement detectors, window sensors, door sensors.
1 50 window sensors, 30 door sensors and 200 movement detectors
2 Voltage drop sensor
Actions
0 When an intruder is detected, police are called automatically.
1 Lights are switched on in rooms with active sensors.
2 An audible alarm is switched on.
3 The system switches automatically to backup power when a voltage drop is
detected.
A burglar alarm system is primarily a monitoring system. It collects data from sensors but no
real-time actuator control
Control systems are similar but, in response to sensor values, the system sends control
signals to actuators
An example of a monitoring and control system is a system which monitors temperature and
switches heaters on and off
www.BrainKart.com
www.BrainKart.com
Software Engineering
Sensor
proces
s
Senso
00Hz r
values
Thermostat
process
Switch
command
500Hz Thermostat process Room
number
Heater Furnace
control control
process process
Mutual exclusion:
• Producer processes collect data and add it to the buffer. Consumer processes take data
from the buffer and make elements available
www.BrainKart.com
www.BrainKart.com
Software Engineering
Producer and consumer processes must be mutually excluded from accessing the same
element.
The buffer must stop producer processes adding information to a full buffer and consumer
processes trying to take information from an empty buffer
System Design
Design both the hardware and the software associated with system. Partition functions to either
hardware or software
Design decisions should be made on the basis on non-functional system requirements
Hardware delivers better performance but potentially longer development and less scope for
change
System elements
Sensors control processes
0 Collect information from sensors. May buffer information collected in response t o a
sensor stimulus
Data processor
0 Carries out processing of collected information and computes the system response
Actuator control
0 Generates control signals for the actuator
Sensor/actuator processes
St imulus Response
www.BrainKart.com
www.BrainKart.com
Software Engineering
Es t ab l is h s ys te m
requ irement s
Parti ti on requ
i rement s
Timing constraints
For aperiodic stimuli, designers make assumptions about probability of occurrence of stimuli.
May mean that certain design strategies such as object-oriented design cannot be used because of
the additional overhead involved
www.BrainKart.com
www.BrainKart.com
Software Engineering
Fu ll
p ower Fu ll pow er
d o: set po wer
= 6 00
Ti m er
Wait ing
d o: di sp lay Nu mb er
ti me Fu ll Set ti me Op erati on
p ow er d o: get nu m ber d o: op erate
exi t: s et t ime oven
Hal f
Hal f
p ow er Door
p ow er Cancel
Ti m er clo sed
Door St art
open Sy st e m
Di s ab l ed
d o: di sp lay
'Wait ing'
Real-time programming
Hard-real time systems may have to programmed in assembly language to ensure that deadlines
are met
Languages such as C allow efficient programs to be written but do not have constructs to
support concurrency or shared resource management
Ada as a language designed to support real-time systems design so includes a general purpose
concurrency mechanism
Executive components
Real-time clock
0 Provides information for process scheduling.
Interrupt handler
www.BrainKart.com
www.BrainKart.com
Software Engineering
Ex ecut in g
p ro ces s
Process priority
The processing of some types of stimuli must sometimes take priority
Interrupt level priority. Highest priority which is allocated to processes requiring a very fast
response
Clock level priority. Allocated to periodic processes
Within these, further levels of priority may be assigned
Interrupt servicing
Control is transferred automatically to a pre-determined memory location
This location contains an instruction to jump to an interrupt service routine
Further interrupts are disabled, the interrupt serviced and control returned to the interrupted
process
www.BrainKart.com
www.BrainKart.com
Software Engineering
Process management
Concerned with managing the set of concurrent processes
Periodic processes are executed at pre-specified time intervals
The executive uses the real-time clock to determine when to execute a process
Process period - time between executions
Process deadline - the time by which processing must be complete
Process switching
The scheduler chooses the next process to be executed by the processor. This depends on a
scheduling strategy which may take the process priority into account
The resource manager allocates memory and a processor for the process to be executed
The despatcher takes the process from ready list, loads it onto a processor and starts execution
Scheduling strategies
Non pre-emptive scheduling
0 Once a process has been scheduled for execution, it runs to completion or until it is
blocked for some reason (e.g. waiting for I/O)
Pre-emptive scheduling
0 The execution of an executing processes may be stopped if a higher priority process
requires service
Scheduling algorithms
0 Round-robin
1 Shortest deadline first
www.BrainKart.com
www.BrainKart.com
Software Engineering
A ring buffer
Producer
process
Consumer
process
Mutual exclusion
Producer processes collect data and add it to the buffer. Consumer processes take data from the
buffer and make elements available.
Producer and consumer processes must be mutually excluded from accessing the same
element.
The buffer must stop producer processes adding information to a full buffer and consumer
processes trying to take information from an empty buffer.
www.BrainKart.com
www.BrainKart.com
Software Engineering
int numberOfEntries = 0 ;
int front = 0, back = 0 ;
CircularBuffer (int n) {
bufsize = n ;
store = new SensorRecord [bufsize] ;
} // CircularBuffer
www.BrainKart.com
www.BrainKart.com
Software Engineering
The system should include provision for operation without a mains power supply
Timing requirements
www.BrainKart.com
www.BrainKart.com
Software Engineering
Process architecture
4 00 Hz 6 0Hz 1 00 Hz
Sen so r st at us
Det ecto r s tat us Sen so r st at us
5 60 Hz Al ar m s ys tem
Power fai lu re
i nt erru pt Bu il di ng mon it or Roo m n umb er
Ro om nu mber
Al arm Al arm Al ar m s ys tem
sys tem sys tem Ro om nu mber
Au di bl e alarm Li ghti ng co nt ro l Vo ice s yn th esi zer p
proces s pro ces s ro ces s
BuildingMonitor()
{
initialise all the sensors and start the processes
siren.start () ; lights.start () ; synthesizer.start
() ; windows.start () ; doors.start () ;
movements.start () ; pm.start () ;
}
www.BrainKart.com
www.BrainKart.com
Software Engineering
} // run
} //BuildingMonitor
Sen so r
process
Sen so r
5 00 Hz values
Th ermostat
pro ces s
Sw it ch co m mand
5 00 Hz Ro om n u mber Th ermo st at pro cess
Control systems
www.BrainKart.com
www.BrainKart.com
Software Engineering
A burglar alarm system is primarily a monitoring system. It collects data from sensors but no
real-time actuator control
• Control systems are similar but, in response to sensor values, the system sends control
signals to actuators
An example of a monitoring and control system is a system which monitors temperature and
switches heaters on and off
UNIT IV
TESTING
Taxonomy of Software Testing
Classified by purpose, software testing can be divided into: correctness testing, performance
testing, and reliability testing and security testing.
Classified by life-cycle phase, software testing can be classified into the following categories:
requirements phase testing, design phase testing, program phase testing, evaluating test
results, installation phase testing, acceptance testing and maintenance testing.
By scope, software testing can be categorized as follows: unit testing, component testing,
integration testing, and system testing.
Correctness testing
Correctness is the minimum requirement of software, the essential purpose of testing. It is
used to tell the right behavior from the wrong one. The tester may or may not know the inside
details of the software module under test, e.g. control flow, data flow, etc. Therefore, either a
white-box point of view or black-box point of view can be taken in testing software. We must
note that the black-box and white-box ideas are not limited in correctness testing only.
Black-box testing
White-box testing
Performance testing
Not all software systems have specifications on performance explicitly. But every system
will have implicit performance requirements. The software should not take infinite time or
infinite resource to execute. "Performance bugs" sometimes are used to refer to those design
problems in software that cause the system performance to degrade.
Performance has always been a great concern and a driving force of computer evolution.
Performance evaluation of a software system usually includes: resource usage, throughput,
stimulus-response time and queue lengths detailing the average or maximum number of tasks
waiting to be serviced by selected resources. Typical resources that need to be considered include
network bandwidth requirements, CPU cycles, disk space, disk access operations, and memory
usage. The goal of performance testing can be performance bottleneck identification,
performance comparison and evaluation, etc.
Reliability testing
www.BrainKart.com
www.BrainKart.com
Software Engineering
Security testing
Software quality, reliability and security are tightly coupled. Flaws in software can be
exploited by intruders to open security holes. With the development of the Internet, software
security problems are becoming even more severe.
Many critical software applications and services have integrated security measures against
malicious attacks. The purpose of security testing of these systems include identifying and
removing software flaws that may potentially lead to security violations, and validating the
effectiveness of security measures. Simulated security attacks can be performed to find
vulnerabilities.
Acceptance testing
Testing to verify a product meets customer specified requirements. A customer usually
does this type of testing on a product that is developed externally.
Compatibility testing
This is used to ensure compatibility of an application or Web site with different browsers,
OSs, and hardware platforms. Compatibility testing can be performed manually or can be driven
by an automated functional or regression test suite.
Conformance testing
This is used to verify implementation conformance to industry standards. Producing tests
for the behavior of an implementation to be sure it provides the portability, interoperability,
and/or compatibility a standard defines.
Integration testing
Modules are typically code modules, individual applications, client and server
applications on a network, etc. Integration Testing follows unit testing and precedes system
testing.
Load testing
Load testing is a generic term covering Performance Testing and Stress Testing.
Performance testing
www.BrainKart.com
www.BrainKart.com
Software Engineering
Regression testing
Similar in scope to a functional test, a regression test allows a consistent, repeatable
validation of each new release of a product or Web site. Such testing ensures reported product
defects have been corrected for each new release and that no new quality problems were
introduced in the maintenance process. Though regression testing can be performed manually an
automated test suite is often used to reduce the time and resources needed to perform the required
testing.
System testing
Entire system is tested as per the requirements. Black-box type testing that is based on
overall requirements specifications, covers all combined parts of a system.
End-to-end testing
Similar to system testing, involves testing of a complete application environment in a
situation that mimics real-world use, such as interacting with a database, using network
communications, or interacting with other hardware, applications, or systems if appropriate.
Sanity testing
Testing is to determine if a new software version is performing well enough to accept it
for a major testing effort. If application is crashing for initial use then system is not stable
enough for further testing and build or application is assigned to fix.
Alpha testing
In house virtual user environment can be created for this type of testing. Testing is done at
the end of development. Still minor design changes may be made as a result of such testing.
Beta testing
Testing is typically done by end -users or others. This is the final testing before releasing
the application to commercial purpose.
www.BrainKart.com
www.BrainKart.com
Software Engineering
Testing Principles:
All tests should be traceable to customer requirements.
Tests should be planned before testing begins.
80% of all errors are in 20% of the code.
Testing should begin in the small and progress to the large.
Exhaustive testing is not possible.
Types of Errors:
Algorithmic error.
Computation & precision error.
Documentation error.
Capacity error or boundary error.
Timing and coordination error.
Throughput or performance error.
Recovery error.
Hardware & system software error.
Standards & procedure errors.
Operability
– if it works better it can be tested more efficiently
Observability
– what you see is what you test
Controllability
– if software can be controlled better the it is more that testing can be automated and
optimized
Decomposability
– controlling the scope of testing allows problems to be isolated quickly and retested
intelligently
Stability
– the fewer the changes, the fewer the disruptions to testing
Understandability
– the more information that is known, the smarter the testing can be done
www.BrainKart.com
www.BrainKart.com
Software Engineering
Cyclomatic Complexity:
A number of industry studies have indicated that the higher V(G), the higher the probability or
errors.
Control Structure Testing – 1:
White-box techniques focusing on control structures present in the software
Condition testing (e.g. branch testing)
– focuses on testing each decision statement in a software module
– it is important to ensure coverage of all logical combinations of data that may be
processed by the module (a truth table may be helpful)
www.BrainKart.com
www.BrainKart.com
Software Engineering
Move out one loop and set it up as in step 2, holding all other loops at typical values. Continue
this step until the outermost loop has been tested.
Concatenated Loops
If the loops are independent of one another
then treat each as a simple loop
else* treat as nested loops
end if*
for example, the final loop counter value of loop 1 is
used to initialize loop 2.
Black-Box Testing:
Graph-Based Testing – 1:
Black-box methods based on the nature of the relationships (links) among the program
objects (nodes), test cases are designed to traverse the entire graph
Transaction flow testing
– nodes represent steps in some transaction and links represent logical connections
between steps that need to be validated
Finite state modeling
– nodes represent user observable states of the software and links represent state
transitions
Black-box technique that divides the input domain into classes of data from which test cases
can be derived
An ideal test case uncovers a class of errors that might require many arbitrary test cases to be
executed before a general error is observed
If input condition specifies a range, one valid and two invalid equivalence classes are
defined
If an input condition requires a specific value, one valid and two invalid equivalence classes
are defined
If an input condition specifies a member of a set, one valid and one invalid equivale nce class
is defined
If an input condition is Boolean, one valid and one invalid equivalence class is defined
Boundary Value Analysis - 1
Black-box technique
– focuses on the boundaries of the input domain rather than its center
Guidelines:
www.BrainKart.com
www.BrainKart.com
Software Engineering
– If input condition specifies a range bounded by values a and b, test cases should
include a and b, values just above and just below a and b
– If an input condition specifies and number of values, test cases should be exercise
the minimum and maximum numbers, as well as values just above and just below
the minimum and maximum values
Black-box technique that enables the design of a reasonably small set of test cases that
provide maximum test coverage
Focus is on categories of faulty logic likely to be present in the software component
(without examining the code)
Testing begins at the component level and works outward toward the integration of the entire
computer-based system.
Different testing techniques are appropriate at different points in time.
The developer of the software conducts testing and may be assisted by independent test
groups for large projects.
The role of the independent tester is to remove the conflict of interest inherent when the
builder is testing his or her own product.
www.BrainKart.com
www.BrainKart.com
Software Engineering
As a whole life-cycle process - V & V must be applied at each stage in the software
process.
Has two principal objectives
– The discovery of defects in a system
– The assessment of whether or not the system is usable in an operational situation.
Strategic Testing Issues - 1 Specify product requirements in a quantifiable manner before
testing starts.
Specify testing objectives explicitly.
Identify the user classes of the software and develop a profile for each.
Develop a test plan that emphasizes rapid cycle testing.
Strategic Testing Issues – 2:
Build robust software that is designed to test itself (e.g. use anti-bugging).
Use effective formal reviews as a filter prior to testing.
Conduct formal technical reviews to assess the test strategy and test cases.
Testing Strategy:
Unit Testing:
www.BrainKart.com
www.BrainKart.com
Software Engineering
Program reviews.
Formal verification.
Testing the program itself.
– black box and white box testing.
Black Box or White Box?:
Maximum # of logic paths - determine if white box testing is possible.
Nature of input data.
Amount of computation involved.
Complexity of algorithms.
Unit Testing:
www.BrainKart.com
www.BrainKart.com
Software Engineering
Integration Testing:
Bottom - up testing (test harness).
Top - down testing (stubs).
Regression Testing.
Smoke Testing
www.BrainKart.com
www.BrainKart.com
Software Engineering
Regression testing may be used to ensure that new errors not introduced.
Bottom-Up Integration:
Regression Testing:
Regression test suit contains 3 different classes of test cases
– Representative sample of existing test cases is used to exercise all software
functions.
– Additional test cases focusing software functions likely to be affected by the
change.
– Tests cases that focus on the changed software components.
Software components already translated into code are integrated into a build.
A series of tests designed to expose errors that will keep the build from performing its
functions are created.
The build is integrated with the other builds and the entire product is smoke tested daily
using either top-down or bottom integration.
Validation Testing:
www.BrainKart.com
www.BrainKart.com
Software Engineering
Making sure the software works correctly for intended user in his or her normal work
environment.
Alpha test
– version of the complete software is tested by customer under the supervision of the
developer at the developer‘s site
Beta test
– version of the complete software is tested by customer at his or her own site
without the developer being present
Recovery testing
– checks system‘s ability to recover from failures
Security testing
– verifies that system protection mechanism prevents improper penetration or data
alteration
Stress testing
– program is checked to see how well it deals with abnormal resource demands
Performance testing
– tests the run-time performance of software
Stress test.
Volume test.
Configuration test (hardware & software).
Compatibility.
Regression tests.
Security tests.
Timing tests.
Environmental tests.
Quality tests.
Recovery tests.
Maintenance tests.
Documentation tests.
Human factors tests.
www.BrainKart.com
www.BrainKart.com
Software Engineering
Procedural programming
Procedural programming can sometimes be used as a synonym for imperative
programming (specifying the steps the program must take to reach the desired state), but can also
refer (as in this article) to a programming paradigm, derived from structured programming, based
upon the concept of the procedure call. Procedures, also known as routines, subroutines, methods,
or functions (not to be confused with mathematical functions, but similar to those used in
functional programming) simply contain a series of computational steps to be carried out. Any
given procedure might be called at any point during a program's execution, including by other
procedures or itself. Some good examples of procedural programs are the Linux Kernel, GIT,
Apache Server, and Quake III Arena.
Object-oriented programming
www.BrainKart.com
www.BrainKart.com
Software Engineering
Logic programming is, in its broadest sense, the use of mathematical logic for computer
programming. In this view of logic programming, which can be traced at least as far back as John
McCarthys' [1958] advice-taker proposal, logic is used as a purely declarative representation
language, and a theorem-prover or model-generator is used as the problem-solver. The problem-
solving task is split between the programmer, who is responsible only for ensuring the truth of
programs expressed in logical form, and the theorem-prover or model-generator, which is
responsible for solving problems efficiently.
www.BrainKart.com
www.BrainKart.com
Software Engineering
Rapid Implementations
In the late 1990s as Y2K approached, customers demanded and consulting firms discovered
faster ways to implement packaged software applicat ions. The rapid implementation became
possible for certain types of customers. The events that converged in the late 1990s to provide
faster implementations include the following:
Many smaller companies couldn‘t afford the big ERP project. If the software vendors and
consulting firms were going to sell to the ―middle marketǁ companies, they had to develop
more efficient methods.
Many dotcoms needed a financial infrastructure; ERP applications filled the need, and rapid
implementation methods provided the way.
The functionality of the software improved a lot, many gaps were eliminated, and more
companies could implement with fewer customizations.
After the big, complex companies implemented their ERP systems, the typical implementation
became less difficult.
The number of skilled consultants and project managers increased significantly.
Other software vendors started packaging preprogrammed integration points to the Oracle ERP
modules.
www.BrainKart.com
www.BrainKart.com
Software Engineering
Phased Implementations
Phased implementations seek to break up the work of an ERP implementation project.
This technique can make the system more manageable and reduce risks, and costs in some cases,
to the enterprise. In the mid-1990s, 4 or 5 was about the maximum number of application
modules that could be launched into production at one time. If you bought 12 or 13 applications,
there would be a financial phase that would be followed by phases for the distribution and
manufacturing applications. As implementation techniques improved and Y2K pressures grew in
the late 1990s, more and more companies started launching most of their applications at the same
time. This method became known as the big-bang approach. Now, each company selects a phased
or big-bang approach based on its individual requirements.
Another approach to phasing can be employed by companies with business units at
multiple sites. With this technique, one business unit is used as a template, and all applications are
completely implemented in an initial phase lasting 10–14 months. Then, other sites implement the
applications in cookie-cutter fashion. The cookie-cutter phases are focused on end-user training
and the differences that a site has from the prototype site. The cookie-cutter phase can be as short
as 9–12 weeks, and these phases can be conducted at several sites simultaneously. For your
reference, we participated in an efficient project where 13 app lications were implemented big
bang–style in July at the Chicago site after about 8 months work. A site in Malaysia went live in
October. The Ireland site started up in November. After a holiday break, the Atlanta business unit
went live in February, and the final site in China started using the applications in April.
Implementing thirteen application modules at five sites in four countries in sixteen months was
pretty impressive.
Case Studies Illustrating Implementation Techniques
Some practical examples from the real world might help to illustrate some of the principles and
techniques of various software implementation methods. These case studies are composites from
about 60 implementation projects we have observed during the past 9 years.
Big companies often have a horrible time resolving issues and deciding on configuration
parameters because there is so much money involved and each of many sites might want to
control decisions about what it considers its critical success factors. For example, we once saw a
large company argue for over two months about the chart of accounts structure, while eight
consultants from two consulting firms tried to referee among the feuding operating units. Another
large company labored for more than six months to unify a mast er customer list for a centralized
receivables and decentralized order entry system.
Transition activities at large companies need special attention. Training end users can be a
logistical challenge and can require considerable planning. For example, if you have 800 users to
train and each user needs an average of three classes of two hours each and you have one month,
how many classrooms and instructors do you need? Another example is that loading data
www.BrainKart.com
www.BrainKart.com
Software Engineering
from a legacy system can be a problem. If you have one million customers to load into Oracle
receivables at the rate of 5,000/hour and the database administrator allows you to load 20 hours
per day, you have a 10-day task.
Because they spend huge amounts of money on their ERP systems, many big companies
try to optimize the systems and capture specific returns on the investment. However, sometimes
companies can be incredibly insensitive and uncoordinated as they try to make money from their
ERP software. For example, one business announced at the beginning of a project that the
accounts payable department would be cut from 50–17 employees as soon as the system went
live. Another company decided to centralize about 30 accounting sites into one shared service
center and advised about 60 accountants that they would lose their jobs in about a year. Several of
the 60 employees were offered positions on the ERP implementation team.
Small companies have other problems when creating an implementation team. Occasionally, the
small company tries to put clerical employees on the team and they have problems with issue
resolution or some of the ERP concepts. In another case, one small company didn‘t create the
position of project manager. Each department worked on its own modules and ignored the
integration points, testing, and requirements of other users. When Y2K deadlines forced the
system startup, results were disastrous with a cost impact that doubled the cost of the entire
project.
Project team members at small companies sometimes have a hard time relating to the cost
of the implementation. We once worked with a company where the project manager (who was
also the database administrator) advised me within the first hour of our meeting that he thought
consulting charges of $3/minute were outrageous, and he couldn‘t rationalize how we could
possibly make such a contribution. We agreed a consultant could not contribute $3 in value each
and every minute to his project. However, when I told him we would be able to save him
$10,000/week and make the difference between success and failure, he realized we should get to
work.
Because the small company might be relatively simple to implement and the technical
staff might be inexperienced with the database and software, it is possible that the technical staff
will be on the critical path of the project. If the database administrator can‘t learn how to handle
the production database by the time the users are ready to go live, you might need to hire some
temporary help to enable the users to keep to the schedule. In addition, we often see small
companies with just a single database administrator who might be working 60 or more hours per
week. They feel they can afford to have more DBAs as employees, but they don‘t know how to
establish the right ratio of support staff to user requirements. These companies can burn out a
DBA quickly and then have to deal with the problem of replacing an important skill.
www.BrainKart.com
www.BrainKart.com
Software Engineering
UNIT V
Software metric
Any type of measurement which relates to a software system, process or related
documentation
0 Lines of code in a program, the Fog index, number of person-days required to
develop a component.
Allow the software and the software process to be quantified.
May be used to predict product attributes or to control the software process.
Product metrics can be used for general predictions or to identify anomalous components.
Metrics assumptions
A software property can be measured.
The relationship exists between what we can measure and what we want to know. We can only
measure internal attributes but are often more interested in external software attributes.
This relationship has been formalised and validated.
It may be difficult to relate what can be measured to desirable external quality attributes.
www.BrainKart.com
www.BrainKart.com
Software Engineering
Data collection
A metrics programme should be based on a set of product and process data.
Data should be collected immediately (not in retrospect) and, if possible, automatically.
Three types of automatic data collection
0 Static product analysis;
1 Dynamic product analysis;
2 Process data collation.
Data accuracy
Don‘t collect unnecessary data
0 The questions to be answered should be decided in advance and the required data
identified.
Tell people why the data is being collected.
0 It should not be part of personnel evaluation.
Don‘t rely on memory
0 Collect data when it is generated not after a project has finished.
www.BrainKart.com
www.BrainKart.com
Software Engineering
Product metrics
A quality metric should be a predictor of product quality.
Classes of product metric
0 Dynamic metrics which are collected by measurements made of a program in
execution;
1 Static metrics which are collected by measurements made of the system
representations;
2 Dynamic metrics help assess efficiency and reliability; static metrics help assess
complexity, understand ability and maintainability.
www.BrainKart.com
www.BrainKart.com
Software Engineering
Object-oriented metrics
Measurement analysis
It is not always obvious what data means
0 Analysing collected data is very difficult.
Professional statisticians should be consulted if available.
Data analysis must take local circumstances into account.
Measurement surprises
Reducing the number of faults in a program leads to an increased number of help desk calls
0 The program is now thought of as more reliable and so has a wider more diverse
market. The percentage of users who call the help desk may have decreased but the
total may increase;
1 A more reliable system is used in a different way from a system where users work
around the faults. This leads to more help desk calls.
ZIPF’s Law
Zipf's Law as "the observation that frequency of occurrence of some event (P), as a function of
the rank (i) when the rank is determined by the above frequency of occurrence, is a power-law
a
function Pi ~ 1/i with the exponent a close to unity (1)."
www.BrainKart.com
www.BrainKart.com
Software Engineering
www.BrainKart.com
www.BrainKart.com
Software Engineering
There is not a simple relationship between the development cost and the price charged to the
customer.
Broader organisational, economic, political and business considerations influence the price
charged.
Software productivity
A measure of the rate at which individual engineers involved in software development
produce software and associated documentation.
Not quality-oriented although quality assurance is a factor in productivity assessment.
Essentially, we want to measure useful functionality produced per time unit.
Productivity measures
Size related measures based on some output from the software process. This may be lines of
delivered source code, object code instructions, etc.
Function-related measures based on an estimate of the functionality of the delivered software.
Function-points are the best known of this type of measure.
Measurement problems
Estimating the size of the measure (e.g. how many function points).
Estimating the total number of programmer months that have elapsed.
Estimating contractor productivity (e.g. documentation team) and incorporating this
estimate in overall estimate.
Lines of code
The measure was first proposed when programs were typed on cards with one line per card;
How does this correspond to statements as in Java which can span several lines or where there
can be several statements on one line.
Productivity comparisons
The lower level the language, the more productive the programmer
0 The same functionality takes more code to implement in a lower-level language than
in a high-level language.
The more verbose the programmer, the higher the productivity
0 Measures of productivity based on lines of code suggest that programmers who write
verbose code are more productive than programmers who write compact code.
www.BrainKart.com
www.BrainKart.com
Software Engineering
COCOMO model
An empirical model based on project experience.
Well-documented, ‗independent‘ model which is not tied to a specific software vendor.
Long history from initial version published in 1981 (COCOMO-81) through various
instantiations to COCOMO 2.
COCOMO 2 takes into account different approaches to software development, reuse, etc.
COCOMO 81
COCOMO 2
COCOMO 81 was developed with the assumption that a waterfall process would be used and
that all software would be developed from scratch.
Since its formulation, there have been many changes in software engineering practice and
COCOMO 2 is designed to accommodate different approaches to software development.
COCOMO 2 models
COCOMO 2 incorporates a range of sub-models that produce increasingly detailed software
estimates.
The sub-models in COCOMO 2 are:
0 Application composition model. Used when software is composed from existing
parts.
1 Early design model. Used when requirements are available but design has not yet
started.
2 Reuse model. Used to compute the effort of integrating reusable components.
www.BrainKart.com
www.BrainKart.com
Software Engineering
Post-architecture model. Used once the system architecture has been designed and more
information about the system is available.
Multipliers
Multipliers reflect the capability of the developers, the non-functional requirements, the
familiarity with the development platform, etc.
0 RCPX - product reliability and complexity;
www.BrainKart.com
www.BrainKart.com
Software Engineering
Post-architecture level
Uses the same formula as the early design model but with 17 rather than 7 associated
multipliers.
The code size is estimated as:
0 Number of lines of new code to be developed;
1 Estimate of equivalent number of lines of new code computed using the reuse model;
2 An estimate of the number of lines of code that have to be modified according to
requirements changes.
This depends on 5 scale factors (see next slide). Their sum/100 is added to 1.01
A company takes on a project in a new domain. The client has not defined the process to be used
and has not allowed time for risk analysis. The company has a CMM level 2 rating.
0 Precedenteness - new project (4)
1 Development flexibility - no client involvement - Very high (1)
2 Architecture/risk resolution - No risk analysis - V. Low .(5)
3 Team cohesion - new team - nominal (3)
4 Process maturity - some control - nominal (3)
www.BrainKart.com
www.BrainKart.com
Software Engineering
Multipliers
Product attributes
0 Concerned with required characteristics of the software product being developed.
Computer attributes
0 Constraints imposed on the software by the hardware platform.
Personnel attributes
0 Multipliers that take the experience and capabilities of the people working on the
project into account.
Project attributes
0 Concerned with the particular characteristics of the software development project.
Delphi method
The Delphi method is a systematic, interactive forecasting method which relies on a panel
of experts. The experts answer questionnaires in two or more rounds. After each round, a
facilitator provides an anonymous summary of the experts‘ forecasts from the previous round as
well as the reasons they provided for their judgments. Thus, experts are encouraged to revise their
earlier answers in light of the replies of other members of their panel. It is believed that during
this process the range of the answers will decrease and the group will converge towards the
"correct" answer. Finally, the process is stopped after a pre-defined stop criterion (e.g. number of
rounds, achievement of consensus, stability of results) and the mean or median scores of the final
rounds determine the results.
www.BrainKart.com
www.BrainKart.com
Software Engineering
Key characteristics
The following key characteristics of the Delphi method help the participants to focus on
the issues at hand and separate Delphi from other methodologies:
Structuring of information flow
The initial contributions from the experts are collected in the form of answers to
questionnaires and their comments to these answers. The panel director controls the interactions
among the participants by processing the information and filt ering out irrelevant content. This
avoids the negative effects of face-to-face panel discussions and solves the usual problems of
group dynamics.
Regular feedback
Participants comment on their own forecasts, the responses of others and on the progress
of the panel as a whole. At any moment they can revise their earlier statements. While in regular
group meetings participants tend to stick to previously stated opinions and often conform too
much to group leader, the Delphi method prevents it.
Anonymity of the participants
Usually all participants maintain anonymity. Their identity is not revealed even after the
completion of the final report. This stops them from dominating others in the process using their
authority or personality, frees them to some extent from their personal biases, minimizes the
"bandwagon effect" or "halo effect", allows them to freely express their opinions, and encourages
open critique and admitting errors by revising earlier judgments.
The first step is to found a steering committee (if you need one) and a management team
with sufficient capacities for the process. Then expert panels to prepare and formulate the
statements are helpful unless it is decided to let that be done by the management team. The whole
procedure has to be fixed in advance: Do you need panel meetings or do the teams work virtually.
Is the questionnaire an electronic or a paper one? This means, that logistics (from Internet
programming to typing the results from the paper versions) have to be organised. Will there be
follow-up work-shops,interviews, presentations? If yes, these also have to be organised and pre-
pared. Printing of brochures, leaflets, questionnaire, reports have also be considered. The last
organisational point is the interface with the financing organisation if this is different from the
management team.
www.BrainKart.com
www.BrainKart.com
Software Engineering
Scheduling
Scheduling Principles
compartmentalization—define distinct tasks
interdependency—indicate task interrelationship
effort validation—be sure resources are available
defined responsibilities—people must be assigned
defined outcomes—each task must have an output
defined milestones—review for quality
Effort
4 4
Ea = m ( t d / t a )
Im possi bl e Ea = effort i n person-m onths
r egi on t d = nom i nal del i very ti m e for schedul e
t o = opti m al devel opm ent ti m e (i n term s of cost)
t a = actual del i very ti m e desi red
Ed
Eo
Tm i n = 0. 75T d
Empirical Relationship: P vs E
Given Putnam‘s Software Equation (5-3),
3 34
E = L / (P t )
www.BrainKart.com
www.BrainKart.com
Software Engineering
Timeline Charts
Effort Allocation
―front endǁ activities
0 customer communication
1 analysis
2 design
3 review and modification
construction activities
0 coding or code generation
testing and installation
0 unit, integration
1 white-box, black box
2 regression
www.BrainKart.com
www.BrainKart.com
Software Engineering
www.BrainKart.com
www.BrainKart.com
Software Engineering
Actual cost of work performed, ACWP, is the sum of the effort actually expended on work tasks
that have been completed by a point in time on the project schedule. It is then possible to
compute
0 Cost performance index, CPI = BCWP/ACWP
1 Cost variance, CV = BCWP – ACWP
Problem
Assume you are a software project manager and that you‘ve been asked to computer earned value
statistics for a small software project. The project has 56 planned work tasks that are
estimated to require 582 person-days to complete. At the time that you‘ve been asked to do
the earned value analysis, 12 tasks have been completed. However, the project schedu le
indicates that 15 tasks should have been completed. The following scheduling data (in
person-days) are available:
• Task Planned Effort Actual Effort
• 1 12 12.5
• 2 15 11
• 3 13 17
• 4 8 9.5
• 5 9.5 9.0
• 6 18 19
• 7 10 10
• 8 4 4.5
• 9 12 10
• 10 6 6.5
• 11 5 4
• 12 14 14.5
• 13 16
• 14 6
• 15 8
Error Tracking
Schedule Tracking
0 conduct periodic project status meetings in which each team member reports progress
and problems.
1 evaluate the results of all reviews conducted throughout the software engineering
process.
2 determine whether formal project milestones (diamonds in previous slide) have been
accomplished by the scheduled date.
3 compare actual start-date to planned start-date for each project task listed in the
resource table
4 meet informally with practitioners to obtain their subjective assessment of progress to
date and problems on the horizon.
5 use earned value analysis to assess progress quantitatively.
Progress on an OO Project-I
www.BrainKart.com
www.BrainKart.com
Software Engineering
www.BrainKart.com
www.BrainKart.com
Software Engineering
Elements of SCM
Component element
0Tools coupled with file management
Process element
-Procedures define change management
Construction element
-Automate construction of software
Human elements
-Give guidance for activities and process features
Baselines
A work product becomes a baseline only after it is reviewed and approved.
Before baseline – changes informal
Once a baseline is established each change request must be evaluated and verified before it is
processed.
www.BrainKart.com
www.BrainKart.com
Software Engineering
Importance of evolution
Organizations have huge investments in their software systems - they are critical business
assets.
To maintain the value of these assets to the business, they must be changed and updated.
The majority of the software budget in large companies is devoted to evolving existing software
rather than developing new software.
www.BrainKart.com
www.BrainKart.com
Software Engineering
Software change
Software change is inevitable
0 New requirements emerge when the software is used;
1 The business environment changes;
2 Errors must be repaired;
3 New computers and equipment is added to the system;
4 The performance or reliability of the system may have to be improved.
A key problem for organisations is implementing and managing change to their existing
software systems.
Lehman’s laws
Law Description
Continuing change A program that is used in a real-world environment
necessarily must change or become progressively less
useful in that environment.
Increasing complexity As an evolving program changes, its structure tends to
become more complex. Extra resources must be devoted to
preserving and simplifying the structure.
Large program Program evolution is a self-regulating process. System
evolution attributes such as size, time between releases and the
number of reported errors is approximately invariant for
each system release.
Organisational stability Over a program‘s lifetime, its rate of development is
approximately constant and independent of the resources
devoted to system development.
Conservation of Over the lifetime of a system, the incremental change in
familiarity each release is approximately constant.
Continuing growth The functionality offered by systems has to continually
increase to maintain user satisfaction.
Declining quality The quality of systems will appear to be declining unless
they are adapted to changes in their operational
environment.
Feedback system Evolution processes incorporate multi-agent, multi-loop
feedback systems and you have to treat them as feedback
systems to achieve significant product improvement.
www.BrainKart.com
www.BrainKart.com
Software Engineering
Small organisations;
Medium sized systems.
Software maintenance
Modifying a program after it has been put into use or delivered.
Maintenance does not normally involve major changes to the system‘s architecture.
Changes are implemented by modifying existing components and adding new components to the
system.
Maintenance is inevitable
The system requirements are likely to change while the system is being developed because the
environment is changing. Therefore a delivered system won't meet its requirements!
Systems are tightly coupled with their environment. When a system is installed in an
environment it changes that environment and therefore changes the system requirements.
Systems MUST be maintained therefore if they are
to remain useful in an environment.
Types of maintenance
Maintenance to repair software faults
0 Code ,design and requirement errors
1 Code & design cheap. Requirements most expensive.
Maintenance to adapt software to a different operating environment
0 Changing a system‘s hardware and other support so that it operates in a
different environment (computer, OS, etc.) from its initial implementation.
Maintenance to add to or modify the system‘s functionality
0 Modifying the system to satisfy new requirements for org or business change.
Maintenance costs
Usually greater than development costs (2* to 100* depending on the application).
www.BrainKart.com
www.BrainKart.com
Software Engineering
Development/maintenance costs
Maintenance prediction
Maintenance prediction is concerned with assessing which parts of the system may cause
problems and have high maintenance costs
0 Change acceptance depends on the maintainability of the components affected by
the change;
1 Implementing changes degrades the system structure and reduces its
maintainability;
2 Maintenance costs depend on the number of changes and costs of change depend
on maintainability.
Change prediction
Predicting the number of changes requires and understanding of the relationships between a
system and its environment.
Tightly coupled systems require changes whenever the environment is changed.
www.BrainKart.com
www.BrainKart.com
Software Engineering
Complexity metrics
Predictions of maintainability can be made by assessing the complexity of system components.
Studies have shown that most maintenance effort is spent on a relatively small number of
system components of complex system.
Reduce maintenance cost – replace complex components with simple alternatives.
Complexity depends on
0 Complexity of control structures;
1 Complexity of data structures;
2 Object, method (procedure) and module size.
Process metrics
Process measurements may be used to assess maintainability
0 Number of requests for corrective maintenance;
1 Average time required for impact analysis;
2 Average time taken to implement a change request;
3 Number of outstanding change requests.
If any or all of these is increasing, this may indicate a decline in maintainability.
COCOMO2 model maintenance = understand existing code + develop new code.
Project management
Objectives
To explain the main tasks undertaken by project managers
To introduce software project management and to describe its distinctive characteristics
To discuss project planning and the planning process
www.BrainKart.com
www.BrainKart.com
Software Engineering
Project planning
Probably the most time-consuming project management activity.
• Continuous activity from initial concept through to system delivery. Plans must be
regularly revised as new information becomes available.
Various different types of plan may be developed to support the main software project plan
that is concerned with schedule and budget.
Plan Description
Quality plan Describes the quality procedures and standards that
will be used in a project.
Validation plan Describes the approach, resources and schedule used
for system validation.
Configuration management Describes the configuration management procedures
Plan and structures to be used.
Maintenance plan Predicts the maintenance requirements of the system,
maintenance costs and effort required.
Development plan. Describes how the skills and experience of the project
team members will be developed.
www.BrainKart.com
www.BrainKart.com
Software Engineering
project plan
The project plan sets out:
resources available to the project
work breakdown
schedule for the work.
Project scheduling
Split project into tasks and estimate time and resources required to complete each task.
Organize tasks concurrently to make optimal
use of workforce.
Minimize task dependencies to avoid delays caused by
one task waiting for another to complete.
Dependent on project managers intuition and experience.
www.BrainKart.com
www.BrainKart.com
Software Engineering
Scheduling problems
Estimating the difficulty of problems and hence the cost of developing a solution is hard.
Productivity is not proportional to the number of people working on a task.
Adding people to a late project makes it later because of communication overheads.
The unexpected always happens. Always allow contingency in planning.
www.BrainKart.com
www.BrainKart.com
Software Engineering
Activity network
14/7 /03 15 da y s
15 da ys
M1 T3
8 da ys
T9
T1 5 da ys 4/8/03 25/8/03
25/7 /03
4/7 /03 T6 M4 M6
M3
star t 20 da ys 7 da ys
15 da ys
T7 T11
T2
25/7 /03 11/8/03 5/9/03
10 da y s 10 da ys
M2 T5 M7 15 da y s M8
T4
T10 10da ys
18/7 /03
T12
M5
25 da ys
T8 Finish
19/9/03
Activity timeline
4/7 11/7 18/7 2 5/7 1/8 8/8 1 5/8 22/8 2 9/8 5/9 12/9 1 9/9
Sta r t
T4
T1
T2
M1
T7
T3
M5
T8
M3
M2
T6
T5
M4
T9
M7
T10
M6
T11
M8
T12
F inis h
www.BrainKart.com
www.BrainKart.com
Software Engineering
Staff allocation
4/7 1 1/7 18/7 2 5/7 1/8 8/8 15/8 2 2/8 2 9/8 5/9 1 2/9 19/9
Fr ed T4
T8 T11
T12
Ja ne T1
T3
T9
A nne T2
T6 T10
Jim T7
Ma ry T5
Risk management
Risk management - identifying risks and drawing up plans to minimise their effect on a
project.
A risk is a probability that some adverse circumstance will occur
0 Project risks : affect schedule or resources. eg: loss of experienced designer.
1 Product risks: affect the quality or performance of the software being developed.
eg: failure of purchased component.
2 Business risks : affect organisation developing software. Eg: competitor
introducing new product.
Software risks
www.BrainKart.com
www.BrainKart.com
Software Engineering
Risk identification
• Discovering possible risk
• Technology risks.
• People risks.
• Organisational risks.
• Tool risk.
• Requirements risks.
• Estimation risks.
www.BrainKart.com
www.BrainKart.com
Software Engineering
Requirements Changes to requirements that require major design rework are proposed.
Customers fail to understand the impact of requirements changes.
Estimation The time required to develop the software is underestimated.
The rate of defect repair is underestimated.
The size of the software is underestimated.
Risk analysis
Make judgement about probability and seriousness of each identified risk.
Made by experienced project managers
Probability may be very low(<10%), low(10-25%), moderate(25-50%), high(50-75%) or
very high(>75%). not precise value. Only range.
Risk effects might be catastrophic, serious, tolerable or insignificant.
Risk planning
Consider each identified risk and develop a strategy to manage that risk.
categories
www.BrainKart.com
www.BrainKart.com
Software Engineering
Avoidance strategies
0 The probability that the risk will arise is reduced;
Minimisation strategies
0 The impact of the risk on the project will be reduced;
Contingency plans
0 If the risk arises, contingency plans are plans to deal with that risk. eg: financial
problems
Risk monitoring
Assess each identified risks regularly to decide whether or not it is becoming less or more
probable.
Also assess whether the effects of the risk have changed.
Cannot be observed directly. Factors affecting will give clues.
Each key risk should be discussed at management progress meetings & review.
Risk indicators
www.BrainKart.com
www.BrainKart.com
Software Engineering
www.BrainKart.com