Docsity

Software Metrics: An Overview of End-Product and In-Process Quality Metrics, Slides of Computer Science

Partial preview of the text

Download Software Metrics: An Overview of End-Product and In-Process Quality Metrics and more Slides Computer Science in PDF only on Docsity!

Department of Computer & Information Sciences Department of Computer & Information SciencesPakistan Institute of Engineering and Applied SciencesPakistan Institute of Engineering and Applied Sciences

Software Quality

Lecture 10Lecture 10

Software Metrics

Umar Faiz

http://www.pieas.edu.pk/umarfaiz/cis

Software Quality

Software

Metrics

Software

Metrics

ƒ^

Software metrics can be classified into different ƒ^

Software

metrics

can

be

classified

into

different

categories:

ƒ^

Product

metrics

ƒ^

Process

metrics

ƒ^

Project

metrics

http://www.pieas.edu.pk/umarfaiz/cis

Software

Metrics

Software

Metrics

ƒ^

Process Metrics ƒ^

Process

Metrics

ƒ^

Process

metrics

can

be

used

to

improve

software

development

and

maintenance.

ƒ^

Example

include

the

effectiveness

of

defect

removal

during

development,

the

pattern

of

testing

defect

arrival,

and

the

response time of the fix processresponse

time

of

the

fix

process

.

http://www.pieas.edu.pk/umarfaiz/cis

Software

Metrics

Software

Metrics

ƒ^

Project Metrics ƒ^

Project

Metrics

ƒ^

Project

metrics

describe

the

project

characteristics

and

execution.

Examples

include

the

number

of

software

developers,

the

staffing

p^

p^

,^

g

pattern

over

the

life

cycle

of

the

software,

cost,

schedule,

an

productivity. ƒ^

Some metrics belong to multiple categories For example the in ƒ^

Some

metrics

belong

to

multiple

categories

.^ For

example

,^ the

in

process

quality

metrics

of

a

project

are

both

process

metrics

and

project

metrics.

http://www.pieas.edu.pk/umarfaiz/cis

Software

Metrics

Software

Quality

Metrics

ƒ^

Software quality metrics can be divided further into ƒ^

Software

quality

metrics

can

be

divided

further

into

ƒ^

End

‐product

quality

metrics

ƒ^

In

‐process quality metrics In

process

quality

metrics

ƒ^

The

essence

of

software

q

uality

engineering

is

to

q

y^

g^

g

investigate

the

relationships

among

in

‐process

metrics,

project

characteristics,

and

end

‐product

quality,

and,

based on the findings to engineer improvements in bothbased

on

the

findings

,^ to

engineer

improvements

in

both

process

and

product

quality.

http://www.pieas.edu.pk/umarfaiz/cis

Software

Metrics

Product

Quality

Metrics

ƒ^

The de facto definition of software quality consists of two ƒ^

The

de

facto

definition

of

software

quality

consists

of

two

levels:

ƒ^

Intrinsic

p

roduct

q

uality

p^

q^

y

ƒ^

Customer

satisfaction

ƒ^

The

following

metrics

cover

both

levels:

ƒ^

Mean

time

to

failure

ƒ^

Defect

density

bl

ƒ^

Customer

problems

ƒ^

Customer

satisfaction

http://www.pieas.edu.pk/umarfaiz/cis

Software

Metrics

Failures

and

Defects

(or

Faults)

ƒ^

According to the IEEE/American National Standards ƒ^

According

to

the

IEEE/American

National

Standards

Institute

(ANSI)

standard

ƒ^

An

error

is

a

human

mistake

that

results

in

incorrect

software.

ƒ^

The

resulting

defect

(or

fault)

is

an

accidental

condition

that

causes

a

unit

of

the

system

to

fail

to

function

as

required.

d f

l^

d

ƒ^

A^

defect

is

an

anomaly

in

a

product.

ƒ^

A^

failure

occurs

when

a

functional

unit

of

a

software

‐related

system

can

no

longer

p

erform

its

required

function

or

cannot

y^

g^

p^

q

perform

it

within

specified

limits.

http://www.pieas.edu.pk/umarfaiz/cis

Software

Metrics

Failures

and

Defects

(or

Faults)

ƒ^

For practical purposes there is no difference between the ƒ^

For

practical

purposes

,^

there

is

no

difference

between

the

two

terms.

ƒ^

In

the

software

development

p

rocess,

when

an

error

p

p

occurs,

a

defect

(or

fault)

is

injected

in

the

software.

ƒ^

In

operational

mode,

failures

are

caused

by

defects

(or

f^

lt )

f il

t^

i li

ti

f d f

t^

faults),

or

f

ailures

are

materializations

of

d

efects

or

faults).

http://www.pieas.edu.pk/umarfaiz/cis

Software

Metrics

Failures

and

Defects

(or

Faults)

ƒ^

Gathering data about time between failures is very ƒ^

Gathering

data

about

time

between

failures

is

very

expensive.

It

requires

recording

the

occurrence

time

of

each

software

failure.

ƒ^

It

is

sometimes

quite

difficult

to

record

the

time

for

all

the

failures

observed

during

testing

or

operation.

Ti

b t

f il

d t

l^

i^

hi h d

f

ƒ^

Ti

me

b

etween

f

ailures

d

ata

also

requires

a

hi

gh

d

egree

of

accuracy.

It

is

for

this

reason

the

MTTF

metric

is

not

widely

used

by

commercial

developers.

http://www.pieas.edu.pk/umarfaiz/cis

Software

Metrics

Failures

and

Defects

(or

Faults)

ƒ^

The defect rate of a product or the expected number of ƒ^

The

defect

rate

of

a

product

or

the

expected

number

of

defects

over

a

certain

time

period

is

important

for

cost

and

resource

estimates

of

the

maintenance

phase

of

the

ft

lif

l

software

lif

e

cycle.

http://www.pieas.edu.pk/umarfaiz/cis

Software

Metrics

Defect

Density

Metric

Li

f C d

Lines

of

C

ode

ƒ^

A

line

of

code

is

any

line

of

program

text

that

is

not

a

t^

bl

k li

dl

f th

b

f

comment

or

bl

ank

li

ne,

regardless

of

th

e

number

of

statements

or

fragments

of

statements

on

the

line.

This

specifically

includes

all

lines

containing

program

headers,

d

l^

d

bl

d

bl

d

eclarations,

and

executable

and

non

‐executable

statements.

Software Engineering Metrics and Models by Conte et al. (1986)Software

Engineering

Metrics

and

Models

by

Conte

et

al.

(1986)

http://www.pieas.edu.pk/umarfaiz/cis

Software

Metrics

Defect

Density

Metric

Li

f C d

Lines

of

C

ode

ƒ^

Even

within

the

same

language,

the

methods

and

l^

ith

d b

diff

t^

ti

t^

l

algorithms

used

b

y^

diff

erent

counting

t

ools

can

cause

significant

differences

in

the

final

counts.

ƒ^

Count only executable lines.Count

only

executable

lines.

ƒ^

Count

executable

lines

plus

data

definitions.

ƒ^

Count

executable

lines,

data

definitions,

and

comments.

ƒ^

Count

executable

lines,

data

definitions,

comments,

and

job

control

language.

ƒ^

Count lines as physical lines on an input screen ƒ^

Count

lines

as

physical

lines

on

an

input

screen

.

ƒ^

Count

lines

as

terminated

by

logical

delimiters.

Jones

(1986)

http://www.pieas.edu.pk/umarfaiz/cis

Software

Metrics

Defect

Density

Metric

h

i^

l Li

f C d

Physical

Li

nes

of

C

ode

ƒ^

A

line

of

code

is

any

line

of

program

text

that

is

not

a

t^

bl

k li

dl

f th

b

f

comment

or

bl

ank

li

ne,

regardless

of

th

e

number

of

statements

or

fragments

of

statements

on

the

line.

This

specifically

includes

all

lines

containing

program

headers,

d

l^

d

bl

d

bl

d

eclarations,

and

executable

and

non

‐executable

statements. ƒ^

Count physical lines including prologues and data ƒ^

Count

physical

lines

including

prologues

and

data

definitions

(declarations)

but

not

comments.

»^

Conte

et

al.

(1986)

http://www.pieas.edu.pk/umarfaiz/cis

Software

Metrics

Defect

Density

Metric

ƒ^

The quality of the software product is measured by the ƒ^

The

quality

of

the

software

product

is

measured

by

the

defect

rate

of

the

new

and

changed

code

(first

release

subsequent

releases).

http://www.pieas.edu.pk/umarfaiz/cis