SlideShare ist ein Scribd-Unternehmen logo
1 von 28
Downloaden Sie, um offline zu lesen
Introduction
Empirical Study
Results
Conclusion

A Study on the Relation Between Antipatterns and
the Cost of Class Unit Testing
A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc
e
e e
´
Ecole Polytechnique de Montr´al, Qu´bec, Canada
e
e
University of Sannio, Benevento, Italy

March 7th, 2013

A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc
e
e e

March 7th, 2013

1 / 26
Introduction
Empirical Study
Results
Conclusion

Outline

Motivations
Goal
Empirical Study
Results
Other Findings
Conclusion
Ongoing Project

A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc
e
e e

March 7th, 2013

2 / 26
Introduction
Empirical Study
Results
Conclusion

Definition
Exemple of Antipatterns
Motivations
Goal of the Study

Definition

What are Antipatterns?
Identify poor solutions to recurring design problems[Brown et al.]
Some causes
Time-market pressure
Insufficient knowledge and or experience
Misapplication of some design patterns

A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc
e
e e

March 7th, 2013

3 / 26
Introduction
Empirical Study
Results
Conclusion

Definition
Exemple of Antipatterns
Motivations
Goal of the Study

Exemple of Antipatterns

Blob (God Class) : Large and complex class that centralises
the behaviour of a portion of a system
Lazy Class : Class with few responsabilities
Spaguetti Code : Class declaring long methods with no
parameters and using global variables

A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc
e
e e

March 7th, 2013

4 / 26
Introduction
Empirical Study
Results
Conclusion

Definition
Exemple of Antipatterns
Motivations
Goal of the Study

Motivations
Impact of Antipatterns...

A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc
e
e e

March 7th, 2013

5 / 26
Introduction
Empirical Study
Results
Conclusion

Definition
Exemple of Antipatterns
Motivations
Goal of the Study

Motivations
What about Testability and Testing?

A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc
e
e e

March 7th, 2013

6 / 26
Introduction
Empirical Study
Results
Conclusion

Definition
Exemple of Antipatterns
Motivations
Goal of the Study

Goal of the Study

Study the impact of antipatterns on class testability

A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc
e
e e

March 7th, 2013

7 / 26
Introduction
Empirical Study
Results
Conclusion

Class Testability Measure
MaDUM
Objects
Subjects
RQ1: Assess AP class impact on testing effort?
RQ2: Which APs are the most expensive
RQ3: Cost-effectiveness of APs testing

Class Testability Measure
What is Testability?
Degree to which a system or component facilitates the
establishment of test criteria and performance of tests to
determine whether those criteria have been met [IEEE
Glossary]
Testing effort [Bache et al.]
How to Measure Testability?
Metric-Based approaches [Bruntink et al.]
number of test cases required to satisfy a given coverage
criterion [Bache et al.]
A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc
e
e e

March 7th, 2013

8 / 26
Introduction
Empirical Study
Results
Conclusion

Class Testability Measure
MaDUM
Objects
Subjects
RQ1: Assess AP class impact on testing effort?
RQ2: Which APs are the most expensive
RQ3: Cost-effectiveness of APs testing

MaDUM

What is it?
Unit testing technique for object oriented programs [Bashir et
al.]
Based on data slices
Core idea: The correctness of a class is equivalent to the
correctness of all its slices
Focus on the test of methods interactions

A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc
e
e e

March 7th, 2013

9 / 26
Introduction
Empirical Study
Results
Conclusion

Class Testability Measure
MaDUM
Objects
Subjects
RQ1: Assess AP class impact on testing effort?
RQ2: Which APs are the most expensive
RQ3: Cost-effectiveness of APs testing

MaDUM

A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc
e
e e

March 7th, 2013

10 / 26
Introduction
Empirical Study
Results
Conclusion

Class Testability Measure
MaDUM
Objects
Subjects
RQ1: Assess AP class impact on testing effort?
RQ2: Which APs are the most expensive
RQ3: Cost-effectiveness of APs testing

MaDUM

A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc
e
e e

March 7th, 2013

11 / 26
Introduction
Empirical Study
Results
Conclusion

Class Testability Measure
MaDUM
Objects
Subjects
RQ1: Assess AP class impact on testing effort?
RQ2: Which APs are the most expensive
RQ3: Cost-effectiveness of APs testing

Why MaDUM?

Why MaDUM?
Specific to OO programs
Not require specific design documentation
Possibility to compute the number of required test cases
Upper-bound for testing cost

A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc
e
e e

March 7th, 2013

12 / 26
Introduction
Empirical Study
Results
Conclusion

Class Testability Measure
MaDUM
Objects
Subjects
RQ1: Assess AP class impact on testing effort?
RQ2: Which APs are the most expensive
RQ3: Cost-effectiveness of APs testing

Objects

4 systems: Ant, ArgoUML, Checkstyle & JFreechart
Systems belong to different application domains, have
bug-fixing data available and have been used in previous
studies [Abbes et al.], [Bruntink et al.]

A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc
e
e e

March 7th, 2013

13 / 26
Introduction
Empirical Study
Results
Conclusion

Class Testability Measure
MaDUM
Objects
Subjects
RQ1: Assess AP class impact on testing effort?
RQ2: Which APs are the most expensive
RQ3: Cost-effectiveness of APs testing

Subjects

13 antipatterns
Studied in previous studies [Khomh et al.], [Abbes et al.],
Detection tool: Decor [Moha et al.]

Name (Abbr)
Antipattern classes
No Antipattern (None)

Ant
452
297

A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc
e
e e

ArgoUML
901
376

CheckStyle
161
99

JFreeChart
245
233

March 7th, 2013

14 / 26
Introduction
Empirical Study
Results
Conclusion

Class Testability Measure
MaDUM
Objects
Subjects
RQ1: Assess AP class impact on testing effort?
RQ2: Which APs are the most expensive
RQ3: Cost-effectiveness of APs testing

RQ1: Assess AP class impact on testing effort?

How large is the MaDUM test suite for classes participating in APs
compared to that of other classes?

A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc
e
e e

March 7th, 2013

15 / 26
Introduction
Empirical Study
Results
Conclusion

Class Testability Measure
MaDUM
Objects
Subjects
RQ1: Assess AP class impact on testing effort?
RQ2: Which APs are the most expensive
RQ3: Cost-effectiveness of APs testing

RQ2: Which APs are the most expensive

How does the size of the MaDUM test suite vary among classes
participating in different kinds of APs?

A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc
e
e e

March 7th, 2013

16 / 26
Introduction
Empirical Study
Results
Conclusion

Class Testability Measure
MaDUM
Objects
Subjects
RQ1: Assess AP class impact on testing effort?
RQ2: Which APs are the most expensive
RQ3: Cost-effectiveness of APs testing

RQ3: Cost-effectiveness of APs testing

What is the potential cost-benefit achieved when focusing testing
on APs, as opposed to other classes?

A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc
e
e e

March 7th, 2013

17 / 26
Introduction
Empirical Study
Results
Conclusion

RQ1
RQ2
RQ3

Results

Results...

A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc
e
e e

March 7th, 2013

18 / 26
Introduction
Empirical Study
Results
Conclusion

RQ1
RQ2
RQ3

RQ1: How large is the MaDUM test suite for classes
participating in APs compared to that of other classes?
q
q
q

q

q
q

q

q
q
q
q
q
q

q

q
q
q
q

q
q
q

q
q

q
q
q
q
q

q
q
q
q
q
q
q
q

q
q
q
q
q
q
q
q
q
q
q

q
q
q
q
q
q

q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q

q

q
q

q

q
q
q
q
q
q
q
q
q

q
q
q
q

q

q
q
q
q
q
q
q
q
q

q
q
q
q
q
q

0

# of Test Cases (<=100)
20
40
60
80

q

Classes
System

AP

NAP
Ant

AP
NAP
ArgoUML

A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc
e
e e

AP
NAP
Checkstyle

AP
NAP
JFreeChart

March 7th, 2013

19 / 26
Introduction
Empirical Study
Results
Conclusion

RQ1
RQ2
RQ3

RQ1: How large is the MaDUM test suite for classes
participating in APs compared to that of other classes?

System
Ant
ArgoUML
CheckStyle
JFreeChart

Mean TCs AP
18
10
9
26

Mean TCs NAP
9
3
6
13

A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc
e
e e

p-Value
< 0.01
< 0.01
= 0.01
< 0.01

Cliff’s d
0.23 (Small)
0.35 (Medium)
NA
0.22 (Small)

March 7th, 2013

20 / 26
Introduction
Empirical Study
Results
Conclusion

RQ1
RQ2
RQ3

100

RQ2: How does the size of the MaDUM test suite vary
among classes participating in different kinds of APs?

80

q
q

q
q

q
q

q

q
q

q

q

q
q

q

q
q
q
q
q
q

60

q
q
q
q

q
q
q
q
q
q
q
q
q
q
q

q
q

20

40

q

q
q
q
q
q
q
q

q

0

# of Test Cases (<=100)

q

AS BCSBA B CDSBP CC

LzC

LM

LPL

MC

RPB

SC

SG

SAK NONE

Kind of Antipattern
A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc
e
e e

March 7th, 2013

21 / 26
Introduction
Empirical Study
Results
Conclusion

RQ1
RQ2
RQ3

100

RQ2: How does the size of the MaDUM test suite vary
among classes participating in different kinds of APs?

80
60

q

q

40

q

q

20

# of Test Cases (<=100)

q

q

q

q
q
q
q
q
q
q

q
q
q
q
q
q

0

q

AS BCSBA B CDSBP CC

LzC

LM

LPL

MC

RPB

SC

SG

SAK NONE

Kind of Antipattern
A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc
e
e e

March 7th, 2013

22 / 26
Introduction
Empirical Study
Results
Conclusion

RQ1
RQ2
RQ3

80 100
60
40
20
0

Defects in tested classes (cum.)

RQ3: What is the potential cost-benefit achieved when
focusing testing on APs, as opposed to other classes?

0

1000

2000

3000

4000

5000

6000

7000

# of T
est Case (cum.)

It is cost-effective to analyze/test APs classes with a higher priority
than other classes

A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc
e
e e

March 7th, 2013

23 / 26
Introduction
Empirical Study
Results
Conclusion

Other Findings: Refactoring for Reducing Testing Cost

Effect of traditional refactoring on testing cost?

A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc
e
e e

March 7th, 2013

24 / 26
Introduction
Empirical Study
Results
Conclusion

Other Findings: Refactoring for Reducing Testing Cost

Before
refactoring
Class (system)
Type TRS
TokenFilter (Ant)
CDSBP
5
PropPanel (ArgoUML)
Blob
5
BooleanExpressionComplexityCheck
LPL
6
(Checkstyle)
AxisState (JFreeChart)
NAP
5
DynamicTimeSeriesCollection Blob
4
(JFreeChart)

A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc
e
e e

After
refactoring
TCs
TRS
263
2
271
3

TCs
27
43

732

5

132

248
208

1
2

11
122

March 7th, 2013

25 / 26
Introduction
Empirical Study
Results
Conclusion

Conclusion

Findings
Most of APs classes are expensive for unit testing
APs classes with excess of responsibilities require more testing
effort than other
Prioritize the testing of APs classes can be more cost-effective
Specific refactoring can help to reduce testing cost

A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc
e
e e

March 7th, 2013

26 / 26
Introduction
Empirical Study
Results
Conclusion

Conclusion

Future Work
Study more systems
Investigate the symptoms that make APs classes more
expensive
Study the impact of APs on testing effort from other aspects
Investigate specific refactoring for testability

A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc
e
e e

March 7th, 2013

27 / 26
Introduction
Empirical Study
Results
Conclusion

Thank you very much for your attention!

A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc
e
e e

March 7th, 2013

28 / 26

Weitere ähnliche Inhalte

Ähnlich wie Csmr13a.ppt

IRJET- Effectiveness of Constructivist Instructional Approach on Achievem...
IRJET-  	  Effectiveness of Constructivist Instructional Approach on Achievem...IRJET-  	  Effectiveness of Constructivist Instructional Approach on Achievem...
IRJET- Effectiveness of Constructivist Instructional Approach on Achievem...IRJET Journal
 
Test First Model for Application in the Academic Setting
Test First Model for Application in the Academic SettingTest First Model for Application in the Academic Setting
Test First Model for Application in the Academic SettingjournalBEEI
 
using-qualitative-metasummary-to-synthesize-empirical-findings-in-literature-...
using-qualitative-metasummary-to-synthesize-empirical-findings-in-literature-...using-qualitative-metasummary-to-synthesize-empirical-findings-in-literature-...
using-qualitative-metasummary-to-synthesize-empirical-findings-in-literature-...Danilo Monteiro
 
201 - Using Qualitative Metasummary to Synthesize Empirical Findings in Liter...
201 - Using Qualitative Metasummary to Synthesize Empirical Findings in Liter...201 - Using Qualitative Metasummary to Synthesize Empirical Findings in Liter...
201 - Using Qualitative Metasummary to Synthesize Empirical Findings in Liter...ESEM 2014
 
2015: Distance based classifiers: Basic concepts, recent developments and app...
2015: Distance based classifiers: Basic concepts, recent developments and app...2015: Distance based classifiers: Basic concepts, recent developments and app...
2015: Distance based classifiers: Basic concepts, recent developments and app...University of Groningen
 
Improving the Sensitivity of Online Controlled Experiments by Utilizing Pre-E...
Improving the Sensitivity of Online Controlled Experiments by Utilizing Pre-E...Improving the Sensitivity of Online Controlled Experiments by Utilizing Pre-E...
Improving the Sensitivity of Online Controlled Experiments by Utilizing Pre-E...Shuhei Iitsuka
 
Innovative sample size methods for adaptive clinical trials webinar web ver...
Innovative sample size methods for adaptive clinical trials webinar   web ver...Innovative sample size methods for adaptive clinical trials webinar   web ver...
Innovative sample size methods for adaptive clinical trials webinar web ver...nQuery
 
Sound Empirical Evidence in Software Testing
Sound Empirical Evidence in Software TestingSound Empirical Evidence in Software Testing
Sound Empirical Evidence in Software TestingJaguaraci Silva
 
Power and sample size calculations for survival analysis webinar Slides
Power and sample size calculations for survival analysis webinar SlidesPower and sample size calculations for survival analysis webinar Slides
Power and sample size calculations for survival analysis webinar SlidesnQuery
 
A study on the efficiency of a test analysis method utilizing test-categories...
A study on the efficiency of a test analysis method utilizing test-categories...A study on the efficiency of a test analysis method utilizing test-categories...
A study on the efficiency of a test analysis method utilizing test-categories...Tsuyoshi Yumoto
 
LENGUAGE TESTING (II Bimestre Abril Agosto 2011)
LENGUAGE TESTING (II Bimestre Abril Agosto 2011)LENGUAGE TESTING (II Bimestre Abril Agosto 2011)
LENGUAGE TESTING (II Bimestre Abril Agosto 2011)Videoconferencias UTPL
 
The Reliability Programme: Leading the way to better tests and assessments
The Reliability Programme: Leading the way to better tests and assessmentsThe Reliability Programme: Leading the way to better tests and assessments
The Reliability Programme: Leading the way to better tests and assessmentsOfqual Slideshare
 
Performance Evaluation for Classifiers tutorial
Performance Evaluation for Classifiers tutorialPerformance Evaluation for Classifiers tutorial
Performance Evaluation for Classifiers tutorialBilkent University
 

Ähnlich wie Csmr13a.ppt (20)

Csmr13a.ppt
Csmr13a.pptCsmr13a.ppt
Csmr13a.ppt
 
IRJET- Effectiveness of Constructivist Instructional Approach on Achievem...
IRJET-  	  Effectiveness of Constructivist Instructional Approach on Achievem...IRJET-  	  Effectiveness of Constructivist Instructional Approach on Achievem...
IRJET- Effectiveness of Constructivist Instructional Approach on Achievem...
 
Test First Model for Application in the Academic Setting
Test First Model for Application in the Academic SettingTest First Model for Application in the Academic Setting
Test First Model for Application in the Academic Setting
 
Us
UsUs
Us
 
using-qualitative-metasummary-to-synthesize-empirical-findings-in-literature-...
using-qualitative-metasummary-to-synthesize-empirical-findings-in-literature-...using-qualitative-metasummary-to-synthesize-empirical-findings-in-literature-...
using-qualitative-metasummary-to-synthesize-empirical-findings-in-literature-...
 
201 - Using Qualitative Metasummary to Synthesize Empirical Findings in Liter...
201 - Using Qualitative Metasummary to Synthesize Empirical Findings in Liter...201 - Using Qualitative Metasummary to Synthesize Empirical Findings in Liter...
201 - Using Qualitative Metasummary to Synthesize Empirical Findings in Liter...
 
Ietcpresentation
IetcpresentationIetcpresentation
Ietcpresentation
 
2015: Distance based classifiers: Basic concepts, recent developments and app...
2015: Distance based classifiers: Basic concepts, recent developments and app...2015: Distance based classifiers: Basic concepts, recent developments and app...
2015: Distance based classifiers: Basic concepts, recent developments and app...
 
Improving the Sensitivity of Online Controlled Experiments by Utilizing Pre-E...
Improving the Sensitivity of Online Controlled Experiments by Utilizing Pre-E...Improving the Sensitivity of Online Controlled Experiments by Utilizing Pre-E...
Improving the Sensitivity of Online Controlled Experiments by Utilizing Pre-E...
 
Methodology
MethodologyMethodology
Methodology
 
Innovative sample size methods for adaptive clinical trials webinar web ver...
Innovative sample size methods for adaptive clinical trials webinar   web ver...Innovative sample size methods for adaptive clinical trials webinar   web ver...
Innovative sample size methods for adaptive clinical trials webinar web ver...
 
Sound Empirical Evidence in Software Testing
Sound Empirical Evidence in Software TestingSound Empirical Evidence in Software Testing
Sound Empirical Evidence in Software Testing
 
Power and sample size calculations for survival analysis webinar Slides
Power and sample size calculations for survival analysis webinar SlidesPower and sample size calculations for survival analysis webinar Slides
Power and sample size calculations for survival analysis webinar Slides
 
C41041120
C41041120C41041120
C41041120
 
A study on the efficiency of a test analysis method utilizing test-categories...
A study on the efficiency of a test analysis method utilizing test-categories...A study on the efficiency of a test analysis method utilizing test-categories...
A study on the efficiency of a test analysis method utilizing test-categories...
 
LENGUAGE TESTING (II Bimestre Abril Agosto 2011)
LENGUAGE TESTING (II Bimestre Abril Agosto 2011)LENGUAGE TESTING (II Bimestre Abril Agosto 2011)
LENGUAGE TESTING (II Bimestre Abril Agosto 2011)
 
The Reliability Programme: Leading the way to better tests and assessments
The Reliability Programme: Leading the way to better tests and assessmentsThe Reliability Programme: Leading the way to better tests and assessments
The Reliability Programme: Leading the way to better tests and assessments
 
Performance Evaluation for Classifiers tutorial
Performance Evaluation for Classifiers tutorialPerformance Evaluation for Classifiers tutorial
Performance Evaluation for Classifiers tutorial
 
om
omom
om
 
om
omom
om
 

Mehr von Ptidej Team

From IoT to Software Miniaturisation
From IoT to Software MiniaturisationFrom IoT to Software Miniaturisation
From IoT to Software MiniaturisationPtidej Team
 
Presentation by Lionel Briand
Presentation by Lionel BriandPresentation by Lionel Briand
Presentation by Lionel BriandPtidej Team
 
Manel Abdellatif
Manel AbdellatifManel Abdellatif
Manel AbdellatifPtidej Team
 
Azadeh Kermansaravi
Azadeh KermansaraviAzadeh Kermansaravi
Azadeh KermansaraviPtidej Team
 
CSED - Manel Grichi
CSED - Manel GrichiCSED - Manel Grichi
CSED - Manel GrichiPtidej Team
 
Cristiano Politowski
Cristiano PolitowskiCristiano Politowski
Cristiano PolitowskiPtidej Team
 
Will io t trigger the next software crisis
Will io t trigger the next software crisisWill io t trigger the next software crisis
Will io t trigger the next software crisisPtidej Team
 
Thesis+of+laleh+eshkevari.ppt
Thesis+of+laleh+eshkevari.pptThesis+of+laleh+eshkevari.ppt
Thesis+of+laleh+eshkevari.pptPtidej Team
 
Thesis+of+nesrine+abdelkafi.ppt
Thesis+of+nesrine+abdelkafi.pptThesis+of+nesrine+abdelkafi.ppt
Thesis+of+nesrine+abdelkafi.pptPtidej Team
 

Mehr von Ptidej Team (20)

From IoT to Software Miniaturisation
From IoT to Software MiniaturisationFrom IoT to Software Miniaturisation
From IoT to Software Miniaturisation
 
Presentation
PresentationPresentation
Presentation
 
Presentation
PresentationPresentation
Presentation
 
Presentation
PresentationPresentation
Presentation
 
Presentation by Lionel Briand
Presentation by Lionel BriandPresentation by Lionel Briand
Presentation by Lionel Briand
 
Manel Abdellatif
Manel AbdellatifManel Abdellatif
Manel Abdellatif
 
Azadeh Kermansaravi
Azadeh KermansaraviAzadeh Kermansaravi
Azadeh Kermansaravi
 
Mouna Abidi
Mouna AbidiMouna Abidi
Mouna Abidi
 
CSED - Manel Grichi
CSED - Manel GrichiCSED - Manel Grichi
CSED - Manel Grichi
 
Cristiano Politowski
Cristiano PolitowskiCristiano Politowski
Cristiano Politowski
 
Will io t trigger the next software crisis
Will io t trigger the next software crisisWill io t trigger the next software crisis
Will io t trigger the next software crisis
 
MIPA
MIPAMIPA
MIPA
 
Thesis+of+laleh+eshkevari.ppt
Thesis+of+laleh+eshkevari.pptThesis+of+laleh+eshkevari.ppt
Thesis+of+laleh+eshkevari.ppt
 
Thesis+of+nesrine+abdelkafi.ppt
Thesis+of+nesrine+abdelkafi.pptThesis+of+nesrine+abdelkafi.ppt
Thesis+of+nesrine+abdelkafi.ppt
 
Medicine15.ppt
Medicine15.pptMedicine15.ppt
Medicine15.ppt
 
Qrs17b.ppt
Qrs17b.pptQrs17b.ppt
Qrs17b.ppt
 
Icpc11c.ppt
Icpc11c.pptIcpc11c.ppt
Icpc11c.ppt
 
Icsme16.ppt
Icsme16.pptIcsme16.ppt
Icsme16.ppt
 
Msr17a.ppt
Msr17a.pptMsr17a.ppt
Msr17a.ppt
 
Icsoc15.ppt
Icsoc15.pptIcsoc15.ppt
Icsoc15.ppt
 

Kürzlich hochgeladen

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dashnarutouzumaki53779
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 

Kürzlich hochgeladen (20)

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dash
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 

Csmr13a.ppt

  • 1. Introduction Empirical Study Results Conclusion A Study on the Relation Between Antipatterns and the Cost of Class Unit Testing A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc e e e ´ Ecole Polytechnique de Montr´al, Qu´bec, Canada e e University of Sannio, Benevento, Italy March 7th, 2013 A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc e e e March 7th, 2013 1 / 26
  • 2. Introduction Empirical Study Results Conclusion Outline Motivations Goal Empirical Study Results Other Findings Conclusion Ongoing Project A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc e e e March 7th, 2013 2 / 26
  • 3. Introduction Empirical Study Results Conclusion Definition Exemple of Antipatterns Motivations Goal of the Study Definition What are Antipatterns? Identify poor solutions to recurring design problems[Brown et al.] Some causes Time-market pressure Insufficient knowledge and or experience Misapplication of some design patterns A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc e e e March 7th, 2013 3 / 26
  • 4. Introduction Empirical Study Results Conclusion Definition Exemple of Antipatterns Motivations Goal of the Study Exemple of Antipatterns Blob (God Class) : Large and complex class that centralises the behaviour of a portion of a system Lazy Class : Class with few responsabilities Spaguetti Code : Class declaring long methods with no parameters and using global variables A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc e e e March 7th, 2013 4 / 26
  • 5. Introduction Empirical Study Results Conclusion Definition Exemple of Antipatterns Motivations Goal of the Study Motivations Impact of Antipatterns... A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc e e e March 7th, 2013 5 / 26
  • 6. Introduction Empirical Study Results Conclusion Definition Exemple of Antipatterns Motivations Goal of the Study Motivations What about Testability and Testing? A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc e e e March 7th, 2013 6 / 26
  • 7. Introduction Empirical Study Results Conclusion Definition Exemple of Antipatterns Motivations Goal of the Study Goal of the Study Study the impact of antipatterns on class testability A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc e e e March 7th, 2013 7 / 26
  • 8. Introduction Empirical Study Results Conclusion Class Testability Measure MaDUM Objects Subjects RQ1: Assess AP class impact on testing effort? RQ2: Which APs are the most expensive RQ3: Cost-effectiveness of APs testing Class Testability Measure What is Testability? Degree to which a system or component facilitates the establishment of test criteria and performance of tests to determine whether those criteria have been met [IEEE Glossary] Testing effort [Bache et al.] How to Measure Testability? Metric-Based approaches [Bruntink et al.] number of test cases required to satisfy a given coverage criterion [Bache et al.] A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc e e e March 7th, 2013 8 / 26
  • 9. Introduction Empirical Study Results Conclusion Class Testability Measure MaDUM Objects Subjects RQ1: Assess AP class impact on testing effort? RQ2: Which APs are the most expensive RQ3: Cost-effectiveness of APs testing MaDUM What is it? Unit testing technique for object oriented programs [Bashir et al.] Based on data slices Core idea: The correctness of a class is equivalent to the correctness of all its slices Focus on the test of methods interactions A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc e e e March 7th, 2013 9 / 26
  • 10. Introduction Empirical Study Results Conclusion Class Testability Measure MaDUM Objects Subjects RQ1: Assess AP class impact on testing effort? RQ2: Which APs are the most expensive RQ3: Cost-effectiveness of APs testing MaDUM A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc e e e March 7th, 2013 10 / 26
  • 11. Introduction Empirical Study Results Conclusion Class Testability Measure MaDUM Objects Subjects RQ1: Assess AP class impact on testing effort? RQ2: Which APs are the most expensive RQ3: Cost-effectiveness of APs testing MaDUM A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc e e e March 7th, 2013 11 / 26
  • 12. Introduction Empirical Study Results Conclusion Class Testability Measure MaDUM Objects Subjects RQ1: Assess AP class impact on testing effort? RQ2: Which APs are the most expensive RQ3: Cost-effectiveness of APs testing Why MaDUM? Why MaDUM? Specific to OO programs Not require specific design documentation Possibility to compute the number of required test cases Upper-bound for testing cost A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc e e e March 7th, 2013 12 / 26
  • 13. Introduction Empirical Study Results Conclusion Class Testability Measure MaDUM Objects Subjects RQ1: Assess AP class impact on testing effort? RQ2: Which APs are the most expensive RQ3: Cost-effectiveness of APs testing Objects 4 systems: Ant, ArgoUML, Checkstyle & JFreechart Systems belong to different application domains, have bug-fixing data available and have been used in previous studies [Abbes et al.], [Bruntink et al.] A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc e e e March 7th, 2013 13 / 26
  • 14. Introduction Empirical Study Results Conclusion Class Testability Measure MaDUM Objects Subjects RQ1: Assess AP class impact on testing effort? RQ2: Which APs are the most expensive RQ3: Cost-effectiveness of APs testing Subjects 13 antipatterns Studied in previous studies [Khomh et al.], [Abbes et al.], Detection tool: Decor [Moha et al.] Name (Abbr) Antipattern classes No Antipattern (None) Ant 452 297 A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc e e e ArgoUML 901 376 CheckStyle 161 99 JFreeChart 245 233 March 7th, 2013 14 / 26
  • 15. Introduction Empirical Study Results Conclusion Class Testability Measure MaDUM Objects Subjects RQ1: Assess AP class impact on testing effort? RQ2: Which APs are the most expensive RQ3: Cost-effectiveness of APs testing RQ1: Assess AP class impact on testing effort? How large is the MaDUM test suite for classes participating in APs compared to that of other classes? A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc e e e March 7th, 2013 15 / 26
  • 16. Introduction Empirical Study Results Conclusion Class Testability Measure MaDUM Objects Subjects RQ1: Assess AP class impact on testing effort? RQ2: Which APs are the most expensive RQ3: Cost-effectiveness of APs testing RQ2: Which APs are the most expensive How does the size of the MaDUM test suite vary among classes participating in different kinds of APs? A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc e e e March 7th, 2013 16 / 26
  • 17. Introduction Empirical Study Results Conclusion Class Testability Measure MaDUM Objects Subjects RQ1: Assess AP class impact on testing effort? RQ2: Which APs are the most expensive RQ3: Cost-effectiveness of APs testing RQ3: Cost-effectiveness of APs testing What is the potential cost-benefit achieved when focusing testing on APs, as opposed to other classes? A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc e e e March 7th, 2013 17 / 26
  • 18. Introduction Empirical Study Results Conclusion RQ1 RQ2 RQ3 Results Results... A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc e e e March 7th, 2013 18 / 26
  • 19. Introduction Empirical Study Results Conclusion RQ1 RQ2 RQ3 RQ1: How large is the MaDUM test suite for classes participating in APs compared to that of other classes? q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q 0 # of Test Cases (<=100) 20 40 60 80 q Classes System AP NAP Ant AP NAP ArgoUML A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc e e e AP NAP Checkstyle AP NAP JFreeChart March 7th, 2013 19 / 26
  • 20. Introduction Empirical Study Results Conclusion RQ1 RQ2 RQ3 RQ1: How large is the MaDUM test suite for classes participating in APs compared to that of other classes? System Ant ArgoUML CheckStyle JFreeChart Mean TCs AP 18 10 9 26 Mean TCs NAP 9 3 6 13 A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc e e e p-Value < 0.01 < 0.01 = 0.01 < 0.01 Cliff’s d 0.23 (Small) 0.35 (Medium) NA 0.22 (Small) March 7th, 2013 20 / 26
  • 21. Introduction Empirical Study Results Conclusion RQ1 RQ2 RQ3 100 RQ2: How does the size of the MaDUM test suite vary among classes participating in different kinds of APs? 80 q q q q q q q q q q q q q q q q q q q q 60 q q q q q q q q q q q q q q q q q 20 40 q q q q q q q q q 0 # of Test Cases (<=100) q AS BCSBA B CDSBP CC LzC LM LPL MC RPB SC SG SAK NONE Kind of Antipattern A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc e e e March 7th, 2013 21 / 26
  • 22. Introduction Empirical Study Results Conclusion RQ1 RQ2 RQ3 100 RQ2: How does the size of the MaDUM test suite vary among classes participating in different kinds of APs? 80 60 q q 40 q q 20 # of Test Cases (<=100) q q q q q q q q q q q q q q q q 0 q AS BCSBA B CDSBP CC LzC LM LPL MC RPB SC SG SAK NONE Kind of Antipattern A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc e e e March 7th, 2013 22 / 26
  • 23. Introduction Empirical Study Results Conclusion RQ1 RQ2 RQ3 80 100 60 40 20 0 Defects in tested classes (cum.) RQ3: What is the potential cost-benefit achieved when focusing testing on APs, as opposed to other classes? 0 1000 2000 3000 4000 5000 6000 7000 # of T est Case (cum.) It is cost-effective to analyze/test APs classes with a higher priority than other classes A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc e e e March 7th, 2013 23 / 26
  • 24. Introduction Empirical Study Results Conclusion Other Findings: Refactoring for Reducing Testing Cost Effect of traditional refactoring on testing cost? A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc e e e March 7th, 2013 24 / 26
  • 25. Introduction Empirical Study Results Conclusion Other Findings: Refactoring for Reducing Testing Cost Before refactoring Class (system) Type TRS TokenFilter (Ant) CDSBP 5 PropPanel (ArgoUML) Blob 5 BooleanExpressionComplexityCheck LPL 6 (Checkstyle) AxisState (JFreeChart) NAP 5 DynamicTimeSeriesCollection Blob 4 (JFreeChart) A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc e e e After refactoring TCs TRS 263 2 271 3 TCs 27 43 732 5 132 248 208 1 2 11 122 March 7th, 2013 25 / 26
  • 26. Introduction Empirical Study Results Conclusion Conclusion Findings Most of APs classes are expensive for unit testing APs classes with excess of responsibilities require more testing effort than other Prioritize the testing of APs classes can be more cost-effective Specific refactoring can help to reduce testing cost A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc e e e March 7th, 2013 26 / 26
  • 27. Introduction Empirical Study Results Conclusion Conclusion Future Work Study more systems Investigate the symptoms that make APs classes more expensive Study the impact of APs on testing effort from other aspects Investigate specific refactoring for testability A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc e e e March 7th, 2013 27 / 26
  • 28. Introduction Empirical Study Results Conclusion Thank you very much for your attention! A. Saban´, M. Di Penta, G. Antoniol, Y-G. Gu´h´neuc e e e March 7th, 2013 28 / 26