Вы находитесь на странице: 1из 11

Software Testing

Naresh Chauhan, Assistant Professor in the


Department of Computer Engineering at the
YMCA University of Science and Technology,
Faridabad

1
© Oxford University Press 2011. All rights reserved.
Chapter 10
Software Metrics

2
© Oxford University Press 2011. All rights reserved.
Chapter 10
Software Metrics

Objectives
• Software projects need measurement to quantify things for better
monitoring and control over software development
• Software metrics are quantitative measurements
• Various types of software metrics
• Entities to be measured for the software: process, product, and
resource
• Recognition of attributes
• Line-of-code metrics
• Halstead metrics
• Function point analysis metrics

3
© Oxford University Press 2011. All rights reserved.
Evolution
Need ofof Software
Software Testing
Measurement

• Understanding

• Control

• Improvement

4
© Oxford University Press 2011. All rights reserved.
Evolution Software
of Software
Metrics Testing

A Quantitative measure of the degree to which a system


component or process possesses a given attribute.

Classification of Software Metrics


Product vs. Process Metrics
Objective vs. Subjective Metrics
Private vs. Public Metrics

5
© Oxford University Press 2011. All rights reserved.
Entities to be Measured

• Processes
• Product
• Resource

The attributes of entities


• Internal Attributes
• External Attributes

6
© Oxford University Press 2011. All rights reserved.
Size Metrics

Line of Code (LOC)

Token Count (Halstead Product Metrics)

Program Vocabulary
n = n1 + n2
where n = program vocabulary
n1 = number of unique operators
n2 = number of unique operands
Program Length
N = N1 + N2
Where N = program length
N1 = all operators appearing in the implementation
N2 = all operands appearing in the implementation
7
© Oxford University Press 2011. All rights reserved.
Token Count

Program Volume

V = N log2 n
where V = Program volume
N = Program length
n = Program vocabulary

8
© Oxford University Press 2011. All rights reserved.
Function Point Analysis

Determine the type of project.

Identify the counting scope and the application boundary.

Identify all data functions (internal logical functions and


external interface files) and their complexity.

Identify all transactional functions (external inputs, external


outputs and the external queries) and their complexity.

Determine the unadjusted function point count (UFP).

Determine the value adjustment factor, which is based on the 14


general system characteristics (GSCs).

Calculate the adjusted function point count (AFP).

9
© Oxford University Press 2011. All rights reserved.
Software Testing
Function Myths
Point Analysis

10
© Oxford University Press 2011. All rights reserved.
Function Point Analysis

VAF = (TDI x 0.01 ) + 0.065


AFP = UFP x VAF

11
© Oxford University Press 2011. All rights reserved.

Вам также может понравиться