0 ratings0% found this document useful (0 votes) 58 views37 pagesSE Gtu Imp Notes
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
software Development Proces
1.3.4 MYTHS mim P
yths «bout software
Joper should b
ind software engineering in so
There are many 1) 0
4 it, before go
development community. Dev! ave to clear about go al
sted below.
| some of them J 4
: chanical hardwa
«The cost of computers 1s lowe
devices or manual -ystem.
em Computer reduces sisk over mech: intcal systems.
it is flexible.
= Software is easy to change becauie
oie of project but it requires proper care
but the impact of change varies with th
ithout introducing crop 4
lete re-verification anda
op thin that, of electrom
It is casy to edit .he source ©
Software requirements change,
tis introduced. So making changes
time at which i
omp!
is extremely difficult. Each changes required ct
testing.
|
| = Computers provide greater reliability tha.
; It is true that software docs not fail in no
unlimited time before it ‘wear out’. In previous days manual system errorig
days we have software error as well.
4 the devices they replace.
rmal situaiion and can execute
was normal but nowat
= Increasing software reliability will increase safety.
It is true that as increasing software reliability, it increases test cases.
Reliability is the probability of failure-free operation of software in ay
fied environment. Finally it increases safety.
igs of the software projeci to a third [Link] re
relax you. But if an organization does nol
re projects internally, it will
rojects. You should have 10
speci
= Outsourcin, lax the customers.
t It is right that outsourcing
understand how to manage and control softwar
always struggle when it outsources software p:
take care of cach phase of project.
+ Tesiing software and formal verification of software can remove all the
errors. :
‘ojet!
er Ol
1 > {
i [Testing software or tools definitely find out presence of errors in pr
d out maximum numb
So design such effective test cases which can fin
possible érrors) More we test, more we can trust of design and functionalitf
|
\
\ \
\ | ‘opment
——
irements
ts
mance
iterpret
tive to
ciness
tform
cation
prised
forms
:s for
for a
ercial
oject.
n the
Software Development Process
4 SOFTWARE ENGINEERING
Software is there bef
roblems i ere before software engineeri
p ms in the cost, timeliness. ering. But there ar
Software engineering solves the:
1.4.1 DEFINITION
[Software engineerin i
ig iS systematic approacl evel
eee pproach to the development, operation and
a son ¢) The term software engineering was defined at NATO science
sponsored conference at Germany i i
mn y in 1968, to discuss the growi
° « ; 5 ing softwa
crisis and the need to focus on software development. . es
At first conference on software engineering, NATO chairman Prof, [Link]
defined the sofiware engineering as “The establishment and use of sound engineering
principle in order to obtain economically developed software that is reliable and
works efficiently on real machines.” Stephen Schach defined “A discipline whose
aim is fo produce quality software that is delivered on time, within budget and satisfies
requirements of sofiware.”
[Software engineering body of knowledge defines software engineering as “Mis
an application of systematic, disciplined and quantifiable approach to the development,
operation and maintenance of software and the study of these approach." ]
ogramming, {Ihe role of software
engineering is often confused with pr
eds and specify the “blueprints”
the customer’s business ne
plement it.)
Software
engineering is to capture
for the system so that programmers can im,
1.4.2 NEED OF SOFTWARE ENGINEERING
eady described in introduction section that
1? Software engineering 1S meth
developing the software. Thi :
as requirements analysis,
Iding software
Jementation
why software engineering is
odology provides the
is framework defines
Je is alr
required? What its requiremen|
framework that guides engineers 10 ae
vcog of software development suc nent
different phases of soft Se
af and imp!
i intenance etc. Th
Sv amentation, maintenance ¢ ;
testing, implementatl Od et «representation
igni g, not th
specification, designin rey
wang, Stag,
vuuruiaung, OUdgeting and directing software development activit
5 , 1.4.3 LAYERED TECHNOLOGY APPROACH
a
(software engineering is a layered technology. Software engineering encompasses
process, methods and tools that enable complex computer system to be built in a
timely manner with quality. To build any software product engineer should use and
are off these four layers: Quality, Process, Methods and Tools, Figure 1.6 shows
aw (
layered approach.rent | software Development Process
=] =
what
dlete 5
TooLs
that
ing j METHOD
are }
are 5
PROCESS
is)
(QUALITY
FIGURE 1.6 : SOFTWARE ENGINEERING LAYERS
[The main focus of sofiware engineering is to develop quality product. Any
engineering approach, including software engineering, must rest on quality attribute,
Quality of product refers to the characteristics that engineer specify for the product,
[In software development, quality of product encompasses the degree to which the
output meets the functions and features specified in the requirement model]
implementation follows the design, and resulting system meets its requirements andl
performance. £
The foundation layer is process layer. It is the heart of the software engineering
approach. It is intermediate layer which combine and together the technology layers!
Process defines framework that establish the foundation for a complete engincering §
process by identifying small activities. The intent is to deliver software in timely
manner with quality to satisfy users./It deals with technical and management
of software development. "| :
The layer after process is method. 'It is a prescription for how to build the §
software product.) Method includes different tasks such as user communication, a
requirement analysis, design modeling, coding, testing and maintenance. Method gives
the exact way to build the software! Method is a way to execute processes in propet
below layers; method and Process.)Tool is any software or hardware device which ig
Funda_Software Development \ 2014 \ 3vs seuavare, Few well-known software life eycle models
|| are discussed here,
I 1.5.1 LINEAR SEQUENTIAL MODEL/WATERFALL MODEL re
i The first process model which wa
5
z
2
3
oo
g
s
g
é
=
a
g
&
S
7
must complete each phase before the next phase
begins. That’s why it is also known as waterfall model, Sometimes it is also called
classical life eyele model or conventional Process model,
(a this approach software development begins with communication with customer
and requirement gathering through planning, modeling, construction and end with
deployment with successful customer delivery and feedback:JNo one phase can neither
overteke nor overlap another one. In this model each phase has well defined starting
and ending point, with identifiable deliveries to the next Phase,(This is only possible
When requirements for a problem are well understood in advaned) (his approach
cnforce “defines before design” and “design before code"\[It expects complete and
accurate requirement early in the process, which is unrealistic. ")
Evidence of failure in applying the waterfall comes from one of its most frequent
users, the U.S. Department of Defense (DoD). Throughout the 1980s and into the
1990s, most DoD Projects were follow a waterfall cycle of development. DoD project's
report concludes that 75 percent of the projects failed or were never used.Panning
estimation &
‘scheduling
re quivmen >
adhe
a c
spalays? te
2) Ealeetae Spec dice AiO}
. . a
3) desiguir
uy Codi !
sy fests
pethytin”
oH The model consists of five dis
given below.
@ Communication phase :
»
Modeling (Des!9")
truction
(coding & Tostna)
NTIAL MODEL
maintenance)
: LINEAR SEQUE!
The working approac!
(FIGURE 1-11
th of each
tinct phases.
= Requirements are gathered. .
A a — F;
* The problem is specified along with the desired service objectives (goals
The constraints are identified.
The system specification is produced from the requirement analysis. Thi
document should clearly define the product function.
® Planning phase :
Planning is a critical activ:
the requirements)
detailed require;
ity in software dev
of the system and should be done
‘ment is not necessary for pl,
Cost estimation to find best affor
Task scheduling and timeline mai
Work Organization and team stru
clopment. A good plan is based 9
before later phases begin. Howeve
fanning) Tt includes activities like
dable cost,
® yi
.
. nagement,
cturelopmentl comware Development Process
=)
of each ig _-* Coding is done.
es (goals! coding effort:
sis, THS the software meets its required specification,
$ based gy
n. Howeigg After construction the software is delivered to the customer, The system is handed
ike
@ Modelling phase
(the system specifications are translated into a software Tepresentation) Th,
| software engineer at this stage is concerned with: “4
= Data structure
F, Software architecture
= Algorithmic detail and
/® Interface representations
{ Cithe hardware requirements are also determined)at this stage along with a picture
} of the overall system architecture. By the end of this stage the software engineer
} should be able to identify the relationship between the hardware, software and the
{ associated interfaces. Any faults in the specification should ideally not be passed
| down-stream’,
1 @ Construction phase
} .-" The implementation and testing is done.
The designs are translated into the software domain.
7 ® Detailed documentation from the design phase can significantly reduce the
Testing at this stage focuses on making sure that errors are identified and
All the program units are integrated and tested to ensure that the compleie
system meets the software requirements,
® Deployment phase :
over to the customer and will be used the first time by them. {All the problems which
4id not arise during the previous phases will be solved\in this last phase. Maintenance
Part is largest and inever ending phase of software development, In this phase the
Software is updated to:
“<
Meet the changing customer nec
—* Adapted to accommodate changes in the external environment.
j
1 Fonda_sonwareDevelopnient \ 2014 \ 4 ‘26
Fundamentals of Software D:
_-* Correct erroi Versi; viously ing phases.
' 1s und oversights previously undetected in the testing ph
= Enhanci ¢ efficienc; oftware.
ing the efficiency of the s : 7
are
Observe that feedback loops
ops allow for correcti i into the | 4,5,
: ctions to. be .incorporated i :
model, When changes are made at any phase, the relevant documentation ae { :
updated to reflect that change.
@ Advantages : : ‘oft
_™ Easy to explain to the user. eS
_-* Stages and activities are well defined. and
_s Helps to plan and schedule the project than haphazard approach. ie
«Verification at each stage ensures early detection of errors: / \2
misunderstanding. 1
* Testing is inherent to every phase. { the
| j the
documentation is produced at every stage. + int
| ee
It is documentation driven, that is,
@ ‘Disadvantages :
» [Iris difficult to
er must be able to express their requirem
define all requirements at the, beginning of @ project}:
ents completely, correctly *
Custom:
: and clearly.
Delays can occur in designing, coding and testing,
entation, and at the end of project large
red, so it is time consuming.
ntil the end of project, so the cl
has been coded.
jivered in one shot at the }
Each phese produces docum
integration and testing is requi
ustomer can
ations can occur
= No demonstr
ersion of the product after it
only sees a working ¥
«It follows ‘big-bang’ approach; entire system is del
sion. It
last. It produces heavy risk.
y follow this approach. Changes can cause confu
we Real projects rarcl
orporate any kind of risk assessment. |
does not inc
jted for Short duration and routine type OF
¢ clear idea is present,
derstood)in advance, ti
Tf the |
ding to next phas
! @ Application +
The linear sequential
requirements are
of each phase is
| model is well su
well un
frozen before procee’
projects where all
and deliverablespata teks 4) bY F ; ot Soe
! G Prototype is a worki ‘odel that is functi
| of the product | Actually Pro
ing m
lolype is a usable Proj
(iis actually a pilot or test ,
mode!
ionally equivalent to @ component
ram but not a final software Product.
\n goal of Prototyping model js
-Mnstead of freezi irements before any designing, firs;
Working Prototype ii
ie actual product. And this Prototype
Teview to help understand the i \.
tequiremen:
the Processing needs, and the Outpt
ts, the Prototyping model may be em;
0 increase
the flexibility of the development pr
Communication
(Requirements)
Planning
(Estimation
Refinement of
Rogitiromont as por
Suggestion
Modeling (Design)
Construction
(Couing & testing)
Deployment (Dalivery,
foodbook,
maintenance)
FIGURE 1,12 ;
PROTOTYPING MODELFIGURE
_
Business Moding
i
ily
28 2
5 2
a
i3
{i
oj wind
————____ereeeerereseewrrrrm_n—ss——
4
Cumulative
cost
Ts
Progress
through
stops:
Evaluate alternatives,
Identify, resolve risks
Determine
objectives,
ailernatives,
constraints,
Risk
analysis
Risk
analysis
Risk
analysis
/ sk
[i Inger | Protos Protaype, \ Proraype
Review Commune! i prototype
partition T [i at =] Simulations, models, Benchmarks p
\ \ Mo-oycle “wlan Concept of ce ae
; Sottwaro ,
NN requirements / Sottwore / Delated !
= product lesign
Devens Bagutomenty a “To
any
Intagrasei
Dusicn validation
fol test | cag ¢otieation
imal. tan acon
Plan noxt phases
Dovetop, verily
suxt-leval product
PIRAL MODEL +
URE 1.15Software Development Process | 13
4 Product and Process :
} (what is delivered to the customer is c:lled a product. It may include source
code, specification document, manuals, [Link] etc. Basically, it. is nothing
but a set of deliverables only.]
[Process is the way in which we produce software or product. It is the collection
of activities that leads to a product. An efficient process is required to produce good
quality products) If the process is weak, the end product will undoubtedly suffer, but
an obsessive overreliance on process is als) dangerous.
Ue? Measures, Metrics and Measurement :
The terms measures, metrics and measurement are often used interchangeably. I
is interesting to understand the difference amongst these.
[Measure provides a quantitative indication of the level, dimension, size, capac’
efficiency, productivity or reliability of some attributes of a product or process.)
[Measurement is the act of evaluating a measure,
(Metric is a quantitative measure of the degree to)which a system, component, of
process possesses a given attribute.
sie alk: dew bon] ld Geeteislanioaieie tial ices: | how@ measure of de,
modules with highly coupled are g
other, Two modules with low Coupling are not
is measured by number of interconnection bet
with high to low is shown and desc:
BICE Of interde
; Pendency be;
trongly intere
by
onnected and
dependent on
Ween modules,
tibed below. |
High coupling between module:
understand but also increase development effort as they
another modules, so low coupled modules
are best,
Data Coupling Lowest Coupled (Best)
Stamp Coupling
te ees
Control Coupling
External Coupling
Common Coupling
Content Coupling
Highest Coupled (Worst)
TABLE-2.2 : LEVEL OF MODULE COUPLING
Data Coupling :\The dependency is said to be data
is based on the fact they communic
modules are independent
coupled if their dependency
ate by only passing of data. \Other than data, two
Int Float hud
Stamp Coupling
data structure is Passed fr
he dependency is said to be stamp coupled when complete
‘©m one module to another module,)It is not necessary to
Send all data structure, If calling module requires only part of data structure, called
Module just Pass that part
Control Coupling Tie dependency is said to be contro! coupling when modules
ate communicate by pass:
ing of control information) This is usually accomplished by
Means of flags that are set by onc module and reacted upon by, the dependent module.
External Coupling
mal to the software b,
“sically related to the co
Common Coupling ;
ommon data affects
Un this, a module has a dependency to other module,
cing developed or to particular types of hardware) [This is
mmunication to external tools and devices.)
eXtey
ao ing change
In this two or more module has shared data. Tae a
all modules who share this common data] It is didetermine whi ch module 87
Content Couptin ie onsible for having set a value to a particular variable.
Passed from s B *LOne module changes data of other module and control is
: modul -
coupling, -) le to’ the middle of another. Content coupling is highest
® COHESION
(Cohesion j
iS 2 meacuc. .
functionally related of the degree to which the elements of the module are
together Con Uted.|Cohesion may be viewed as glue that keeps the internal modul
* SOvesion is strength within a module. It represents how tightly bound the
internal cleme: t
oe ents of the module are to one another, There are several leveis of
Ohesions. Each are describe
the elements of the module,
d and shown below with degree of relationship between
Functional Cohesion High (Best)
ee |
Sequential Cohesion
Communication Cohesion
Procedural Cohesion
Temporal Cohesion
Logical Cohesion
Coincidental Cohesion Low (Worst)
TABLE-2.3 : LEVEL OF MODULE COHESION
Functional Cohesion : jit is strongest cohesion, In a functionally bound module,
all the elements of the module are related (o performing a single function) All modules
accomplishing a single goal by mean of function.
Sequential Cohesion 1 When the elements are together in u module because tie
output of one form is the input to another, we get sequential cohesion.) However,
sequential cohesion does not provide any idea on how to combine them into modules.
[Module may contain several functions or part of function. )
* Communication Cohesion :{When multiple modules operate on same input data
or same output data, it is called communication cohesion modules
on those modules are separate. This module may perform more’
3) But the procedures
an one function.Fur damentals of Software D velopment
68
Procedura’ Coh sion :/A procedural [Link] contains elements that belong toa
mon _proce'lural unit.\This module often occurs when modular structure is
comi ———ae
determined from some form of flowchar!. A msdule with procedural cohes:on contains
jeter i
only part of a complete fur
tion or parts of several functions,
Temporal \ohesion : l[t is same as log'cal cohesion, except that the elements
are also felated in time and are executed together] Modules that perform activities
are usually tem orally bound, That means it performs al" activities in same time
span.
Logical Cohesion :[A moduli has logical cohesior. if there is some logical
relationship be-ween the elements of module, and the elements
that fall in the same logical class) In Beneral, logi
avoided, if possible,
Coineiden Cohesion : {It is low.
folationship other than shared data: Thi
relationship among the elements ofa
far as possibl
20 MATAMONETInA A
perform functions
Shesion modules should be
est level than the rest, There is no conceptual
is cohesion occurs when there is no meaningful
module. [Coincident cohesion is avoidable asFundamentals of Software Development
ate
| Tremory size, and defects reported. Indirect measures include functionality, quality,
complexity, efficiency, reliability, and maintainabilit
The contrast between direct measurement and ct or derived measurement
is between a (direct) metric function whose domain is only one variable and a
(derived) function whose domain is an n-tuple. For example, density is a function of
mass and volume.
Direct measures are generally casier to collect than indirect measures. Size-
oricnted metrics are used to collect direct measures of software engineering output
and quality. -Function-oriented metrics provide indirect measures.
¢ @ SIZE-ORIENTED METRICS - 1 7,9 - @3
{si oriented metrics are direct measure of software and the process by which it
was developed. These metrics can include effort (time), money spent, KLOC (1000s
lines of code), pages of documentation created, errors, and people on the project.)
For example, two projects have been developed and organization maintains simple
size oriented record. Table of size-oriented metrics can be created as below:
Project] LOC | Effort] Cost (Rs.)| Page Documents| Errors | Defects! People
ABC {17,907 38. | 19,225 795 ao | ot | 3
xyz fosais] 60 | 15,775 1212 325 Be 5
TABLE-3.1: SIZE-ORIENTED METRICS
From these data some simple size-oriented metrics can be generated.
Productivity = Errors / KLOC, Productivity = LOC / person-month
Quality = Defects / KLOC, Quality = Frrors / person-month
Cost = Cost / LOC, Cost = Cost / pages of documentation
Documentation = Pages of documentation / KLOC
The oldest metric for software projects is that of “lines of code” (LOC).)This
: was first introduced circa 1960 and was used for economic, productivity, and
quality studies. The definition of LOC by most researchers is }“A line of code is any
line of i
; ‘Program text that is not a comment or blank line, regardless of the number of
Statements or ftagments of statements on the I
That means all lines containingsoftware Project Management
ion and executable and non. ‘executable Source
program header, declar:
statements”.
[Size-oriented metrics are not universally accepted.\The use of LOC a,
measure is the center of the conflict Supporter of the LOC measure Claim; *
= It is a man-made measurement of all software engineering Processes
can easily be counted. ich
* Many existing metrics exist which use LOC as an input,
* A large body of literature and data exist which is predicated °n Log,
Opponents of the LOC measure claim:
* That it is programming language dependent,
= They penalise well-designed but shorter programs.
"They do not work well with non-procedural languages,
® Their use in planning is difficult because the Planner must estimate Loc
before the design is completed,
@ FUNCTION-ORIENTED METRICS Fp
Function-oriented metrics are indirect measures of Software) which focus on
functionality and utility, Functionality cannot be measured directly; it must be derived
indirectly using other direct measures,
IBM in 1979s, He developed a technique which appeared to. be a solution to the size
measurement problem. He suggested/a productivity measurement approach called the
im
function point method.}Function points (FPs) are derived from countable measures
a
and assessments of sorfware complexity:
|
|
\ The first function-oriented metric Was proposed by Albrecht while working for
i
!
i
1
|
ues are number of inputs, number of outputs, number of
inquiries (on-line inputs), number of files, number of external interfaces (machine
Teadable interfaces - tape, disk),118
_2/ Number of inputs: |These are Project input that provides distinct application.
oriented data to the software. Inputs as inquiries are counted separately, )
J Number of outputs:(These are project Output that provides application.
Fundamentals of Software Development |
oriented information to the 1
cer} In this context output refers to reports,
screens,
TOF Messages, ete
These are on-line inputs that results in the generation
Number of ingui
of some immediate software response in the form of aa online output)
Number of files: These are logical master files)e.g., a logical grouping of
data that may be one part of a large database or a separate file.
Number of external interfa
“These are all machine readable interfaces )
(eg., data files on Storage media) that are used to transmit information ‘9
another system
“software
this mea
accomm
time, pr
produce
Orn
olaim:")
a
i)
OpponeSV AS the estimation variable (either LOC or FP)
® The COCOMO Masa: Man4? Taal Oona Con, WO’:
Dr, Berry Boehm, has found this model oe aii be ‘Bochm’s book
(COCOMO). This model gained rapid popularity after pul
i Q (variable)
¥ ‘ic, single-valued
i 2 ies? model is a static, si
‘Software Engineering Economies [This mo124
_—__ Fundamentals of Software Development
—____
model that computes software develo
oe eemeninls of Gofware Development:
size expressed in eda feet effort (and cost) as a Tuneton of program
fine ue ines of code (LOC), Dr. [Link] has classified
Pirieal estimation model. [This model is widely used in industry.)
COCOMO may be applied three modes of software project.
J Organic Mode:
software in
Project is aj
In this sma team of experienced developers develops
st very familiar e wvironment, It is relatively simple and size of
P sroximately 2-5(+ KLOC. e.g,, payroll. inventory project, etc.
f) Semidetached Mode: 1 js intermediate mode of organic and embedded
system mode. Team size is medium. It contains average experienced person
and mixed type of requirements, It is medium size project. approximately
50-300 KLOC. e.g., compiler, database system, editors, etc.
a Embedded Mode: In this project constraints are tight, which might be related
to target processor and its interface with the hardware. The size of project
is large and it is real time system. Ver
for thi
little previous experience is required |
The size is of approximately over 300 KLOC, e.g., any real time |
system, aircraft control system, automatic medical instruments etc. |
1
{
|
\
{
|
{COCOMO is hierarchy of software cost estimation model Which includes basic,
intermediate and detailed sub models. Basic COCOMO takes an equation form:
( Effort E = a x (KLOC)? Per month;
Duration D = ¢ x (E)4 Per month;
Number of person N = Effort/Duration;
Productivity = KLOC/Effort.
ode Project Size | Nature Innovation| Development |
Environment
Organic | 2-50 KLOC | Small size project, Little Familiar for
Experienced developer, In-home.
Familiar environment,
For ex. payroll, inventory
Semi 30-300 KLOC| Medium size project, Medium | Medium
Detached Medium size project team,
Average experience required,
For ex. utility system, compile:7? @@ Risk Mitigation, Monitoring and Management (RMMM) Plan
ey
a“ Lita software team follows a proactive approach to risk, avoidance is always the
best strategy. This is achieved by developing a plan for risk mitigation, To mitigate
this risk, project management must develop a strategy for reducing losses. Among
the possible steps to be taken are;
wy
a
4
“a
a
Meet with current staff to determine causes for loss (e.g., poor working
conditions, low pay, and competitive job market).
Mitigate those causes that are under our contro] before the project starts.
Once the project begins, assume loss will occur and develop techniques to
ensure continuity when people leave the project.
Organize project teams so that information about cach development activity
is widely distributed.
Define documentation standards and establish mechanisms io be sure that
documents are developed in a timely manner.
Conduct peer reviews of all work (so that more than one person is “up to
speed”).
Assign a backup staff member for overy critical technologist.
As the project proceeds, risk_monitoring activities commence, (he project
manager monitors factors that may provide an indication of whether the risk is
becoming more or less likely) In the case of high staff turnover (staff loss), the
following factors can be monitored:Software Project Management tm
Gen attitude of team members based on project pressur:
» The degree to which the team has jelled,
ae +
Z* Interpersonal relationships among team members.
"Potential problems with compensation and benefits.
the availability of jobs within the company and outside it. |
w
In addition to monitoring these factors, the project manager should monitor the
effectiveness of risk mitigation steps. The project manager should monitor documents
carefully to ensure that each can stand on its own and that each suggests information
that would be necessary if a newcomer were forced to join the software team
somewhere in the middle of the Project.
[Risk management and contingency planning assumes that mitigation efforts
have failed and that the risk has become a reality.| If the mitigation Strategy has been
followed, backup is available, information is documented, and knowledge has been
distributed across the team. In addition, the project manager may temporarily refocus
‘sources (and readjust the project schedule) to those functions that are fully staffed,
enabling newcomers who must be added to the team to “get up to speed” (Those
individuals who are!leaving are asked to Stop all work and spend their last weeks in
“knowledge transfer mode”, This might include video-based knowledge capture, the
development of “commentary documents,” and/or meeting with other team members
who will remain on the project. Ut is important to note that RMMM plan increase
additional Project cost cause of these activities,Testing Testing
: TYPES OF TESTING
| FIGURE 4.
4.4.1 WHITE BOX TESTING
Out of two approach of testing, [white box testing is concerned with testing the
implementation of program, The intent of this testing is not to exercise all the different
input and output condition but to exercise/the different internal programming structure
and data structure used in program. That’s why it is also called structural testing. It
is also known as glass box testing.\Using white box testing, tester can derive test
cases that,)
* Guarantee that all independent paths within a module have been exercised
at least once.
* Exercise all decision whether it is true or false.
«Execute all paths within their bounds and their boundaries.
* Exercise internal data structure to ensure their validity.
‘Tf you ave. WIND A cadets
MAE Eoyd Working of
Outpus wes cabeulWhite Box Testing = To-hwieuay
i Contro}
ey Site en
Independent Cyclomatic Graph Condition Data Foy
> Path
Fiow Graph 0D Falh Complexity Matix Testing sTeau
Notation
FIGURE 4.3 : WHITE BOX TESTING METHODS
@ BASIS PATH TESTING ®€
| Basis path testing is a white-box testing technique first proposed by Tom Moc:
The basis path method enables the test case designer to derive a logical Complery
measure of a procedural design and use this measure as a guide for defining a bs
set of execution paths. Test cases derived to exercise the basis set are guaranteed »
execute every statement in the program at least one time during testing. !
It requires complete knowledge of the program’s structure and used by develoges
to unit test their own. (This type of testing involves (i) generating a set of paths tt
will cover every branch in the program, (ii) finding a set of test cases thal wil
execute every path in this set of program. \These two steps are not necessary to exe:
in sequence.
® Flow Graph Notation
(the Control flow of the program can be analyzed using a graphical represent
2 OO }
pee
swential — Itthen-else or L00P
FIGURE 4.4 ;
While Loop switch Statement
FLOW GRAPH NOTATIONof Software Development
‘he flow graph is a directed graph in which nodes are either
entire statement or fragments of statement. The flow graph depicts logical control
flow using the notation illustrated in Figure 4.4. Each structured construct has a
conesponding flow graph symbol,
The bellowed Figure 4.5 illustrates how the flow chart maps into flow graph
using specific notation. Each circle, called a flow graph node, represents procedural
statements. Number of processes and a decision procedure can map into a single
node. The arrows on the flow graph, called edges, represent flow of control and are
equivalent to flowchart arrows. Areas bounded by edges and nodes are called regions.
Area outside the graph is also counted as a region.
FIGURE 4.5-: FLOW GRAPH CORRESPONDING FLOW CHART
? DD Path Graph :
In path testing afier flow graph, next step is to draw a DD path graph from the
fev graph. DD path means decision fo decision path graph.) The nodes of an
aa : . a s
) bh, which are in sequence is combined into a single node. So, /DD path aa
Mircted graph in which nodes are sequences of statement and edges represent Col
fevbetween node.ae
175
se
Software Coding And Testing
E46: DD PATH GRAPH
FIGURI
The DD path graph is used to find Tadependent paths. The flow graph nodes
which are in sequence are forming on independent hat each
routed at least once.
ath, It ensures U
independent path has been exe
Wo i :
8% @ Cyclomatic Complexity 15 °° fu in W-8-T
Iso known as structural complexity peeause it
ity is al
d to find the number of
‘The cyclomatic complex!
uted by one of
view of the code.
gran
his approach is use!
complexity is comp!
gives internal
independent paths through a pro! three ways:
(a) The number of regions in any flow graph.
exity VG) = B-N +3
where E is number of edges
Lb) Cyclomatic Compl
and N is number of nodes
atic Complexity VIG) =P * 1s
ow graph G, (Diamonds ar
ec cyclomatic complexity ca
where P is number of predicates
(c) Cyclom
¢ decision nodes)
(decision) node in Ml
If we refer Figure 4.5, th n be computed using each
of three ways is:
(a) Total numbers
®) Cyclomatic Com
of regions are 4.
plexity (6) =
exity V(G) = P+ 1 = 3 predicate
N+2=11 edges - 9 nodes +2 =4
(decision) nodes + 1 = 4
VO Cyclomatic Compl
Several properties of cyclomatic complexity are as below:
) wor)Fundamentals of Software Development
276
CC
ii) V(G) is maximum number of independent path in graph G.
iii) Inserting and deleting functional statement does not affect V(G).
iv) Inserting a new row in graph increases V(G) by unity.
v¥) V(G) depends only on the decision structure of G.
@ Graph Matrices
As a tester we are interested to find out independent paths. The objective of
ing is not easy task and is subject
testing is to trace all paths at least once. Path tra
to error, If the size of graph is very large, it is difficult to tracing manually. For that
it is advisable to use tool. To develop such a tool, a data structure, called graph
matrix can be very useful tool.
(A graph matrix is a square matrix whose size is equal to the number of nodes
on the flow graph?\Each row and column corresponds to an identified node, and
matrix entries correspond to connections between nodes. A simple example of a flow
graph and its corresponding graph matrix is shown in Figure 4.7.
Connection Connection
Node 4G Nog dB
1 8 1 1 1-1-0
2| bla 2 1]4 24=1
3 efe 3 a [4 fester
4 4
5 ' afr 5 1 1 [4 [atez
ViGeaH=5
Flow Graph Graph Matrix Connection Matrix
FIGURE 4.7 : GRAPH MATRIX
Each node of the flow graph is identified by numbers, while each edge is
identified by letters, A letter entry is made in the matrix to correspond to a connection
between two nodes. The graph matrix is redrawn as connection matrix, Each letter
has been replaced with a 1, which is called link weight. The link weight provides
additicnal information about control flow. Simply, the link weight is 1 if connection
exists or 0 if connection does not exist.
@ CONTROL STRUCTURE TESTING
[Although basis path testing is simple and highly effective, it is not sufficient in
itself.’ Here, other variations on control structure testing)are discussed, These expand