SlideShare a Scribd company logo
Jyotsna Sharma &
Anil Kumar
3rd Sem
MTech, SW Technology
Delhi Technological Univeristy
SW Metrics
 SW metrics provide quantitative methods for
assessing the software quality.
 “You cannot control what you cannot measure”
 “The continuous application of measurement
based techniques to the SDLC and its products to
supply meaningful and timely management
information, together with the use of those
techniques to improve that process and its
products “
 Measured through SW Metrics techniques
 If measured, its likely to reduce
 Time Spent
 Cost
in Testing Phase.
 Improves Quality of the Software
 Types - Size, Control Flow and Data Metrics
 SW Maintenance requires SW complexity measurement to
identify degrees to which characteristics that hamper SW
Maintenance are present.
SW Complexity
 Regression testing is done after modification is
made in the implemented program.
 Existing test suites are re-run on modified
program to identify if new modification has
effected existing functionality.
 Writing new test cases to ensure adequate
coverage.
Regression Testing
T
T’
T’’
P
Selective Retest,
Coverage
Identification,
Test Suite
Execution.
Test Suite
Identification
P’
P’
P – Any Program P
P’ – Modified Program
T – Test Suite Test Cases
T’,T” – Subset of T or new Test Cases
Regression Testing
 Structural testing criteria depends on internal
structure of the program implementation to derive
testing criteria.
 Require all possible execution paths identification
to develop test cases.
 Tester determines Test Coverage.
 Change in Implementation leads to change in test
cases.
Program Characteristics
• Requires the execution of components
(blocks) of the program under test in
condition of subsequent elements of CFG
• Nodes, Edges and Paths
Control Flow
Graph[CFG]
• Requires execution of all independent paths
of the program
MaCabe’s
Complexity
Concept
• Both Data Flow and Control Flow
information are used to perform testing
Data Flow
Program Characteristics
Complexity is measure of Code Quality
Requires model to convert internal quality
attributes to code reliability
High degree of complexity is bad and vice versa
Various internal code attributes are used to
indirectly assess code quality
Enables tester to count acyclic execution paths
through fragment(function, subroutine, object,
class)
LOC, NPATH, McCabe’s Cyclomatic Complexity
number, Data Quality, Halstead SW Science
SW Complexity ( Re-visited)
Static Metrics
• Obtainable at early
Phases of SDLC
• Does not deal with OO
features and real time
systems
• Easy to gather
• Estimate amount of
effort to develop and
maintain code
Dynamic Metrics
• Late stage of SW
development
• Supports all OO
features and real time
systems
• Capture dynamic
behavior of the system
• Hard to obtain and
obtained from traces
of the code
SW Complexity metrics Classification
 Measures acyclic execution path
 NPATH complexities(NC) is measures as follows:
 NPATH = Πi
n NP(statementi)
 NP(if) = NP(expr) + NP(if-range) + 1
 NP(if-else) = NP(expr) + NP(if-range) + NP(else-range)
 NP(while) = NP(expr) + NP(while-range) + 1
 NP(do-while) = NP(expr) + NP(do-range) + 1
 NP(for) = NP(for-range) + NP(expr1) + NP(expr2) + NP(expr3) + 1
 NP(?) = NP(expr1) + NP(expr2) + NPexpr(3) + 2
 NP(repeat) = NP(repeat-range) + 1
 NP(switch) = NP(expr) + Σi
n NP(case-range) + NP(default-range)
 NP(function call) = 1
 NP(sequential) = 1
 NP(return) = 1
 NP(continue) = 1
 NP(break) = 1
 NP(goto label) = 1
 NP(expressions) = Number of && and || operators in Expression
Control Flow Graph : NPATH
 A path is feasible if there is input datum to these
paths.
 Predicate is considered as simple Boolean form in
condition.
 Path containing lower number of Predicates than it
has higher probability of being feasible.
 If A1 are paths through a code module, suppose that
A1 consists of Pred1 > 0 predicates and A2 consists of
Pred2 > Pred1, then A1 is likely to be more feasible.
Feasibility & Predicates
 Halstead Method measures number of operators and the number of
operands and their respective occurrence in the program.
 n1 = number of Unique Operators
 n2 = number of Unique Operands
 N1 = total number of Operators
 N2 = total number of Operands
 Length (N) =N1+N2
 Vocabulary (n) =n1+n2
 Volume of a Program (V) =N*log2n
 Potential Volume (V*) = (2+n2) log2 (2+n2)
 Program Level (L) =L=V*/V
 Program Difficulty (D) =1/L
 Estimated Program Length (N) =n1log2n1+n2log2n2
 Estimated Program Level (L) =2n2/ (n1N2)
 Estimated Difficulty (D) =1/L=n1N2/2n2
 Effort (E) =V/L=V*D= (n1 x N2) / 2n2
Halstead Metrics
#include<stdio.h>
void main()
1{
1 int a,b,c,n;
1 scanf(“%d %d”, & a,&b);
2 if (a < b)
2 {
3 c = a;
3 }
4 if(c= =b)
4 {
5 c= a+1;
5 }
5 else
5 {
6 c=b;
7 if (c==b)
7 {
8 c=b+1;
8 }
8 }
9 n = c;
10 while ( n < 8 )
10 {
11 if ( b > c )
11 {
12 c = 2;
12 }
12 else
12 {
13 n = n + c +7;
14 }
14 n = n + 1;
14 }
15 printf(“%d%d%d”,a,b, n);
15}
#include< stdio.h>
void main()
1{
1 int a,b,c,n;
1 scanf (“%d%d”, &a,&b);
2 if ( a < b)
2 {
3 c = a;
3 }
4 if(c= =b)
4 {
5 c= =a+1;
5 }
5 else
5 {
6 c= a - 1;
6 }
6 else
6 {
7 c=b;
8 if (c= = b)
8 {
9 c = b + 1;
9 }
9 else
9 {
10 c = b – 1;
10 }
11 n = c;
12 while (n<=8)
12 {
13 if (b>c)
13 {
14 c = 2;
14 }
14 else
14 {
15 n = n+c+7;
15 }
16 n = n+1;
16 }
17 printf(“%d%d%d”,a,b, n);
Example
CGF of P and P’
Path # Path Contents LOC NC Pred.
Halstead Metrics
D E
P1
{1,2,3,4,5,9,10,11,1
2,14,10,15}
30 12 4 31 10726
P2
{1,2,3,5,9,11,13,14,
10,15}
27 12 4 35 12810
P3
{1,2,4,9,10,11,12,1
4,10,15}
25 6 4 29 9309
P4 {1,2,4,5,9,10,15} 19 8 3 27 7118
P5 {1,2,3,4,9,10,15} 14 4 3 23 4692
P6
{1,2,6,7,8,9,10,11,1
2,14,10,15}
27 6 5 33 11781
P7 {1,2,6,7,8,9,10,15} 24 3 5 31 11470
P8 {1,2,6,7,9,10,15} 16 4 3 24 5904
P9 {1,2,6,7,9,10,15} 13 2 3 23 4508
SW Metrics Complexity – Computed
Weights for Pragram ‘P’
 All the complexity weights for all paths of old and new version
of Program P and P’ are evaluated
 Number of Predicates in each path help tester to identify
feasible and infeasible paths and subsequently ease of test data
generation.
 P4, P 5, P9 have higher number of probability of being feasible
among all paths in Table 1 and P5,P6 and P12 in Table 2.
 With above analysis between P and P’ change of code
performance is identified and tester can use this approach to
execute test case.
 SW Quality and productivity can be improved.
Conclusion
 Static and dynamic software metrics complexity analysis in regression
testing
Debbarma, M.K. ; Kar, N. ; Saha, A. Computer Communication and Informatics
(ICCCI), 2012 International Conference on
Digital Object Identifier: 10.1109/ICCCI.2012.6158825
Publication Year: 2012 , Page(s): 1 - 6
 Metric Attitude
Risi, M. ; Scanniello, G. ; Tortora, G. Software Maintenance and Reengineering
(CSMR), 2013 17th European Conference on
Digital Object Identifier: 10.1109/CSMR.2013.59
Publication Year: 2013 , Page(s): 405 - 408
References

More Related Content

What's hot

Introduction to Project Management
Introduction to Project Management Introduction to Project Management
Introduction to Project Management
Joshua Miranda
 
Task allocation and scheduling inmultiprocessors
Task allocation and scheduling inmultiprocessorsTask allocation and scheduling inmultiprocessors
Task allocation and scheduling inmultiprocessors
Don William
 
Basis path testing
Basis path testingBasis path testing
Basis path testing
Hoa Le
 
Peterson Critical Section Problem Solution
Peterson Critical Section Problem SolutionPeterson Critical Section Problem Solution
Peterson Critical Section Problem Solution
Bipul Chandra Kar
 
Syam critical path cpa
Syam critical path cpaSyam critical path cpa
Syam critical path cpasyamputra
 
Csphtp1 04
Csphtp1 04Csphtp1 04
Csphtp1 04
HUST
 
Model checker for NTCC
Model checker for NTCCModel checker for NTCC
Model checker for NTCC
Mauricio Toro-Bermudez, PhD
 
Iwsm2014 on automatically collectable metrics for software maintainability ...
Iwsm2014   on automatically collectable metrics for software maintainability ...Iwsm2014   on automatically collectable metrics for software maintainability ...
Iwsm2014 on automatically collectable metrics for software maintainability ...
Nesma
 
REMI: Defect Prediction for Efficient API Testing (

ESEC/FSE 2015, Industria...
REMI: Defect Prediction for Efficient API Testing (

ESEC/FSE 2015, Industria...REMI: Defect Prediction for Efficient API Testing (

ESEC/FSE 2015, Industria...
REMI: Defect Prediction for Efficient API Testing (

ESEC/FSE 2015, Industria...
Sung Kim
 

What's hot (10)

OS_Ch7
OS_Ch7OS_Ch7
OS_Ch7
 
Introduction to Project Management
Introduction to Project Management Introduction to Project Management
Introduction to Project Management
 
Task allocation and scheduling inmultiprocessors
Task allocation and scheduling inmultiprocessorsTask allocation and scheduling inmultiprocessors
Task allocation and scheduling inmultiprocessors
 
Basis path testing
Basis path testingBasis path testing
Basis path testing
 
Peterson Critical Section Problem Solution
Peterson Critical Section Problem SolutionPeterson Critical Section Problem Solution
Peterson Critical Section Problem Solution
 
Syam critical path cpa
Syam critical path cpaSyam critical path cpa
Syam critical path cpa
 
Csphtp1 04
Csphtp1 04Csphtp1 04
Csphtp1 04
 
Model checker for NTCC
Model checker for NTCCModel checker for NTCC
Model checker for NTCC
 
Iwsm2014 on automatically collectable metrics for software maintainability ...
Iwsm2014   on automatically collectable metrics for software maintainability ...Iwsm2014   on automatically collectable metrics for software maintainability ...
Iwsm2014 on automatically collectable metrics for software maintainability ...
 
REMI: Defect Prediction for Efficient API Testing (

ESEC/FSE 2015, Industria...
REMI: Defect Prediction for Efficient API Testing (

ESEC/FSE 2015, Industria...REMI: Defect Prediction for Efficient API Testing (

ESEC/FSE 2015, Industria...
REMI: Defect Prediction for Efficient API Testing (

ESEC/FSE 2015, Industria...
 

Similar to Sw metrics for regression testing

Software Engineering
Software EngineeringSoftware Engineering
Software Engineeringpoonam.rwalia
 
source code metrics and other maintenance tools and techniques
source code metrics and other maintenance tools and techniquessource code metrics and other maintenance tools and techniques
source code metrics and other maintenance tools and techniques
Siva Priya
 
Problem solving using computers - Unit 1 - Study material
Problem solving using computers - Unit 1 - Study materialProblem solving using computers - Unit 1 - Study material
Problem solving using computers - Unit 1 - Study material
To Sum It Up
 
Pricipal Component Analysis Using R
Pricipal Component Analysis Using RPricipal Component Analysis Using R
Pricipal Component Analysis Using RKarthi Keyan
 
FACS2017-Presentation.pdf
FACS2017-Presentation.pdfFACS2017-Presentation.pdf
FACS2017-Presentation.pdf
allberson
 
Reverse Engineering automation
Reverse Engineering automationReverse Engineering automation
Reverse Engineering automationPositive Hack Days
 
Algorithms
Algorithms Algorithms
Algorithms
yashodhaHR2
 
Software Analytics In Action: A Hands-on Tutorial on Mining, Analyzing, Model...
Software Analytics In Action: A Hands-on Tutorial on Mining, Analyzing, Model...Software Analytics In Action: A Hands-on Tutorial on Mining, Analyzing, Model...
Software Analytics In Action: A Hands-on Tutorial on Mining, Analyzing, Model...
Chakkrit (Kla) Tantithamthavorn
 
How to calculte Cyclomatic Complexity through various methods
How to calculte Cyclomatic Complexity through various methodsHow to calculte Cyclomatic Complexity through various methods
How to calculte Cyclomatic Complexity through various methods
harsimratDeo
 
Hanjun Dai, PhD Student, School of Computational Science and Engineering, Geo...
Hanjun Dai, PhD Student, School of Computational Science and Engineering, Geo...Hanjun Dai, PhD Student, School of Computational Science and Engineering, Geo...
Hanjun Dai, PhD Student, School of Computational Science and Engineering, Geo...
MLconf
 
E2 – Fundamentals, Functions & ArraysPlease refer to announcements.docx
E2 – Fundamentals, Functions & ArraysPlease refer to announcements.docxE2 – Fundamentals, Functions & ArraysPlease refer to announcements.docx
E2 – Fundamentals, Functions & ArraysPlease refer to announcements.docx
shandicollingwood
 
CS-102 DS-class_01_02 Lectures Data .pdf
CS-102 DS-class_01_02 Lectures Data .pdfCS-102 DS-class_01_02 Lectures Data .pdf
CS-102 DS-class_01_02 Lectures Data .pdf
ssuser034ce1
 
7-White Box Testing.ppt
7-White Box Testing.ppt7-White Box Testing.ppt
7-White Box Testing.ppt
HirenderPal
 
Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpally...
Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpally...Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpally...
Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpally...
http://algorithmtraining.com/advanced-python-training-hyderabad/
 
Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpally...
Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpally...Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpally...
Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpally...
http://algorithmtraining.com/advanced-python-training-hyderabad/
 
Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpally...
Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpally...Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpally...
Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpally...
http://algorithmtraining.com/advanced-python-training-hyderabad/
 
Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpall...
Algorithm Class at KPHB  (C, C++ Course Training Institute in KPHB, Kukatpall...Algorithm Class at KPHB  (C, C++ Course Training Institute in KPHB, Kukatpall...
Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpall...
http://algorithmtraining.com/advanced-python-training-hyderabad/
 
Quality Assurance
Quality AssuranceQuality Assurance
Quality Assurance
Kiran Kumar
 
White Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR ChandigarhWhite Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR Chandigarh
Pankaj Thakur
 

Similar to Sw metrics for regression testing (20)

Software Engineering
Software EngineeringSoftware Engineering
Software Engineering
 
source code metrics and other maintenance tools and techniques
source code metrics and other maintenance tools and techniquessource code metrics and other maintenance tools and techniques
source code metrics and other maintenance tools and techniques
 
Problem solving using computers - Unit 1 - Study material
Problem solving using computers - Unit 1 - Study materialProblem solving using computers - Unit 1 - Study material
Problem solving using computers - Unit 1 - Study material
 
Pricipal Component Analysis Using R
Pricipal Component Analysis Using RPricipal Component Analysis Using R
Pricipal Component Analysis Using R
 
FACS2017-Presentation.pdf
FACS2017-Presentation.pdfFACS2017-Presentation.pdf
FACS2017-Presentation.pdf
 
Reverse Engineering automation
Reverse Engineering automationReverse Engineering automation
Reverse Engineering automation
 
Algorithms
Algorithms Algorithms
Algorithms
 
Software Analytics In Action: A Hands-on Tutorial on Mining, Analyzing, Model...
Software Analytics In Action: A Hands-on Tutorial on Mining, Analyzing, Model...Software Analytics In Action: A Hands-on Tutorial on Mining, Analyzing, Model...
Software Analytics In Action: A Hands-on Tutorial on Mining, Analyzing, Model...
 
How to calculte Cyclomatic Complexity through various methods
How to calculte Cyclomatic Complexity through various methodsHow to calculte Cyclomatic Complexity through various methods
How to calculte Cyclomatic Complexity through various methods
 
Hanjun Dai, PhD Student, School of Computational Science and Engineering, Geo...
Hanjun Dai, PhD Student, School of Computational Science and Engineering, Geo...Hanjun Dai, PhD Student, School of Computational Science and Engineering, Geo...
Hanjun Dai, PhD Student, School of Computational Science and Engineering, Geo...
 
E2 – Fundamentals, Functions & ArraysPlease refer to announcements.docx
E2 – Fundamentals, Functions & ArraysPlease refer to announcements.docxE2 – Fundamentals, Functions & ArraysPlease refer to announcements.docx
E2 – Fundamentals, Functions & ArraysPlease refer to announcements.docx
 
CS-102 DS-class_01_02 Lectures Data .pdf
CS-102 DS-class_01_02 Lectures Data .pdfCS-102 DS-class_01_02 Lectures Data .pdf
CS-102 DS-class_01_02 Lectures Data .pdf
 
7-White Box Testing.ppt
7-White Box Testing.ppt7-White Box Testing.ppt
7-White Box Testing.ppt
 
Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpally...
Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpally...Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpally...
Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpally...
 
Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpally...
Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpally...Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpally...
Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpally...
 
Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpally...
Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpally...Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpally...
Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpally...
 
Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpall...
Algorithm Class at KPHB  (C, C++ Course Training Institute in KPHB, Kukatpall...Algorithm Class at KPHB  (C, C++ Course Training Institute in KPHB, Kukatpall...
Algorithm Class at KPHB (C, C++ Course Training Institute in KPHB, Kukatpall...
 
LMmanual.pdf
LMmanual.pdfLMmanual.pdf
LMmanual.pdf
 
Quality Assurance
Quality AssuranceQuality Assurance
Quality Assurance
 
White Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR ChandigarhWhite Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR Chandigarh
 

Recently uploaded

Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 

Recently uploaded (20)

Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 

Sw metrics for regression testing

  • 1. Jyotsna Sharma & Anil Kumar 3rd Sem MTech, SW Technology Delhi Technological Univeristy
  • 2. SW Metrics  SW metrics provide quantitative methods for assessing the software quality.  “You cannot control what you cannot measure”  “The continuous application of measurement based techniques to the SDLC and its products to supply meaningful and timely management information, together with the use of those techniques to improve that process and its products “
  • 3.  Measured through SW Metrics techniques  If measured, its likely to reduce  Time Spent  Cost in Testing Phase.  Improves Quality of the Software  Types - Size, Control Flow and Data Metrics  SW Maintenance requires SW complexity measurement to identify degrees to which characteristics that hamper SW Maintenance are present. SW Complexity
  • 4.  Regression testing is done after modification is made in the implemented program.  Existing test suites are re-run on modified program to identify if new modification has effected existing functionality.  Writing new test cases to ensure adequate coverage. Regression Testing
  • 5. T T’ T’’ P Selective Retest, Coverage Identification, Test Suite Execution. Test Suite Identification P’ P’ P – Any Program P P’ – Modified Program T – Test Suite Test Cases T’,T” – Subset of T or new Test Cases Regression Testing
  • 6.  Structural testing criteria depends on internal structure of the program implementation to derive testing criteria.  Require all possible execution paths identification to develop test cases.  Tester determines Test Coverage.  Change in Implementation leads to change in test cases. Program Characteristics
  • 7. • Requires the execution of components (blocks) of the program under test in condition of subsequent elements of CFG • Nodes, Edges and Paths Control Flow Graph[CFG] • Requires execution of all independent paths of the program MaCabe’s Complexity Concept • Both Data Flow and Control Flow information are used to perform testing Data Flow Program Characteristics
  • 8. Complexity is measure of Code Quality Requires model to convert internal quality attributes to code reliability High degree of complexity is bad and vice versa Various internal code attributes are used to indirectly assess code quality Enables tester to count acyclic execution paths through fragment(function, subroutine, object, class) LOC, NPATH, McCabe’s Cyclomatic Complexity number, Data Quality, Halstead SW Science SW Complexity ( Re-visited)
  • 9. Static Metrics • Obtainable at early Phases of SDLC • Does not deal with OO features and real time systems • Easy to gather • Estimate amount of effort to develop and maintain code Dynamic Metrics • Late stage of SW development • Supports all OO features and real time systems • Capture dynamic behavior of the system • Hard to obtain and obtained from traces of the code SW Complexity metrics Classification
  • 10.  Measures acyclic execution path  NPATH complexities(NC) is measures as follows:  NPATH = Πi n NP(statementi)  NP(if) = NP(expr) + NP(if-range) + 1  NP(if-else) = NP(expr) + NP(if-range) + NP(else-range)  NP(while) = NP(expr) + NP(while-range) + 1  NP(do-while) = NP(expr) + NP(do-range) + 1  NP(for) = NP(for-range) + NP(expr1) + NP(expr2) + NP(expr3) + 1  NP(?) = NP(expr1) + NP(expr2) + NPexpr(3) + 2  NP(repeat) = NP(repeat-range) + 1  NP(switch) = NP(expr) + Σi n NP(case-range) + NP(default-range)  NP(function call) = 1  NP(sequential) = 1  NP(return) = 1  NP(continue) = 1  NP(break) = 1  NP(goto label) = 1  NP(expressions) = Number of && and || operators in Expression Control Flow Graph : NPATH
  • 11.  A path is feasible if there is input datum to these paths.  Predicate is considered as simple Boolean form in condition.  Path containing lower number of Predicates than it has higher probability of being feasible.  If A1 are paths through a code module, suppose that A1 consists of Pred1 > 0 predicates and A2 consists of Pred2 > Pred1, then A1 is likely to be more feasible. Feasibility & Predicates
  • 12.  Halstead Method measures number of operators and the number of operands and their respective occurrence in the program.  n1 = number of Unique Operators  n2 = number of Unique Operands  N1 = total number of Operators  N2 = total number of Operands  Length (N) =N1+N2  Vocabulary (n) =n1+n2  Volume of a Program (V) =N*log2n  Potential Volume (V*) = (2+n2) log2 (2+n2)  Program Level (L) =L=V*/V  Program Difficulty (D) =1/L  Estimated Program Length (N) =n1log2n1+n2log2n2  Estimated Program Level (L) =2n2/ (n1N2)  Estimated Difficulty (D) =1/L=n1N2/2n2  Effort (E) =V/L=V*D= (n1 x N2) / 2n2 Halstead Metrics
  • 13. #include<stdio.h> void main() 1{ 1 int a,b,c,n; 1 scanf(“%d %d”, & a,&b); 2 if (a < b) 2 { 3 c = a; 3 } 4 if(c= =b) 4 { 5 c= a+1; 5 } 5 else 5 { 6 c=b; 7 if (c==b) 7 { 8 c=b+1; 8 } 8 } 9 n = c; 10 while ( n < 8 ) 10 { 11 if ( b > c ) 11 { 12 c = 2; 12 } 12 else 12 { 13 n = n + c +7; 14 } 14 n = n + 1; 14 } 15 printf(“%d%d%d”,a,b, n); 15} #include< stdio.h> void main() 1{ 1 int a,b,c,n; 1 scanf (“%d%d”, &a,&b); 2 if ( a < b) 2 { 3 c = a; 3 } 4 if(c= =b) 4 { 5 c= =a+1; 5 } 5 else 5 { 6 c= a - 1; 6 } 6 else 6 { 7 c=b; 8 if (c= = b) 8 { 9 c = b + 1; 9 } 9 else 9 { 10 c = b – 1; 10 } 11 n = c; 12 while (n<=8) 12 { 13 if (b>c) 13 { 14 c = 2; 14 } 14 else 14 { 15 n = n+c+7; 15 } 16 n = n+1; 16 } 17 printf(“%d%d%d”,a,b, n); Example
  • 14. CGF of P and P’
  • 15. Path # Path Contents LOC NC Pred. Halstead Metrics D E P1 {1,2,3,4,5,9,10,11,1 2,14,10,15} 30 12 4 31 10726 P2 {1,2,3,5,9,11,13,14, 10,15} 27 12 4 35 12810 P3 {1,2,4,9,10,11,12,1 4,10,15} 25 6 4 29 9309 P4 {1,2,4,5,9,10,15} 19 8 3 27 7118 P5 {1,2,3,4,9,10,15} 14 4 3 23 4692 P6 {1,2,6,7,8,9,10,11,1 2,14,10,15} 27 6 5 33 11781 P7 {1,2,6,7,8,9,10,15} 24 3 5 31 11470 P8 {1,2,6,7,9,10,15} 16 4 3 24 5904 P9 {1,2,6,7,9,10,15} 13 2 3 23 4508 SW Metrics Complexity – Computed Weights for Pragram ‘P’
  • 16.  All the complexity weights for all paths of old and new version of Program P and P’ are evaluated  Number of Predicates in each path help tester to identify feasible and infeasible paths and subsequently ease of test data generation.  P4, P 5, P9 have higher number of probability of being feasible among all paths in Table 1 and P5,P6 and P12 in Table 2.  With above analysis between P and P’ change of code performance is identified and tester can use this approach to execute test case.  SW Quality and productivity can be improved. Conclusion
  • 17.  Static and dynamic software metrics complexity analysis in regression testing Debbarma, M.K. ; Kar, N. ; Saha, A. Computer Communication and Informatics (ICCCI), 2012 International Conference on Digital Object Identifier: 10.1109/ICCCI.2012.6158825 Publication Year: 2012 , Page(s): 1 - 6  Metric Attitude Risi, M. ; Scanniello, G. ; Tortora, G. Software Maintenance and Reengineering (CSMR), 2013 17th European Conference on Digital Object Identifier: 10.1109/CSMR.2013.59 Publication Year: 2013 , Page(s): 405 - 408 References