SlideShare a Scribd company logo
.lusoftware verification & validation
VVS
Java Unit Testing Tool
Competition — Fifth Round
Annibale Panichella, Urko Rueda Molina
1
Previous Editions
Year Venue
Coverage
tool
Mutation
Tool
#CUTs #Projects #Participants
Statistical
Tests
Round 1 2013 ICST Cobertura Javalanche 77 5 2 ✗
Round 2 2014 FITTEST JaCoCo PITest 63 9 4 ✗
Round 3 2015 SBST JaCoCo PITest 63 9 8 ✗
Round 4 2016 SBST
DEFECT4J
(Real Faults)
68 5 4 ✗
2
New Edition
Year Venue
Coverage
tool
Mutation
Tool
#CUTs #Projects #Participants
Statistical
Tests
Round 1 2013 ICST Cobertura Javalanche 77 5 2 ✗
Round 2 2014 FITTEST JaCoCo PITest 63 9 4 ✗
Round 3 2015 SBST JaCoCo PITest 63 9 8 ✗
Round 4 2016 SBST
DEFECT4J
(Real Faults)
68 5 4 ✗
Round 5 2017 SBST JaCoCo
PITest +
Our Env.
69 8 2+2 ✓
3
The Infrastructure
4
The Infrastructure
Defect4j
Defect4j
• The previous edition used
DEFECT4J to detect flaky tests
and to measure effectiveness
• In the new edition, we modified
the infrastructure to work with
libraries not in DEFECT4J
• We developed our own tool to
detect flaky tests
• Effectiveness based on mutation
analysis: PITest + JaCoCo
5
The Infrastructure
Defect4j
Defect4j
• The previous edition used
DEFECT4J to detect flaky tests
and to measure effectiveness
• In the new edition, we modified
the infrastructure to work with
libraries not in DEFECT4J
• We developed our own tool to
detect flaky tests
• Effectiveness based on mutation
analysis: PITest + JaCoCo
6
The Infrastructure
Defect4j
Defect4j
• The previous edition used
DEFECT4J to detect flaky tests
and to measure effectiveness
• In the new edition, we modified
the infrastructure to work with
libraries not in DEFECT4J
• We developed our own tool to
detect flaky tests
• Effectiveness based on mutation
analysis: PITest + JaCoCo
7
The Infrastructure
• The previous edition used
DEFECT4J to detect flaky tests
and to measure effectiveness
• In the new edition, we modified
the infrastructure to work with
libraries not in DEFECT4J
• We developed our own tool to
detect flaky tests
• Effectiveness based on mutation
analysis: PITest + JaCoCo
Our Tool
PITest
+
JaCoCo
8
Test Management
Flaky tests:
• Pass during generation but fail when re-executed
• Detection mechanism: we run each test suite five times
• Ignored when computing the coverage scores
Non-compiling tests:
• Generated test suites were re-compiled in our own
execution environment
9
Metric Computation
Code Coverage:
• Statement coverage
• Condition coverage
Mutation Score:
• We did not use PITest’s running engine since it gave
errors for test cases with ad-hoc/non-standard JUnit
runners (e.g., in EvoSuite)
• We only use PITest engine for the generation of
mutants
• Combining PITest with JaCoCo: executing only
mutants infecting covered lines
10
We apply the same formula used in the last competition since it
combines coverage metrics, effectiveness, execution time and
number of flaky/non-compiling tests
Scoring Formula
T = Generated Test
B = Search Budget
C = Class under test
R = independent Run
Covi = statement coverage
Covb = branch coverage
Covm = Strong Mutation
covScorehT,B,C,ri = 1 ⇥ Covi + 2 ⇥ Covb + 4 ⇥ Covm1 2 4
11
We apply the same formula used in the last competition since it
combines coverage metrics, effectiveness, execution time and
number of flaky/non-compiling tests
Scoring Formula
tScorehT,B,C,ri = covScorehT,B,C,ri ⇥ min
✓
1,
L
genTime
◆
T = Generated Test
B = Search Budget
C = Class under test
R = independent Run
Covi = statement coverage
Covb = branch coverage
Covm = Strong Mutation
getTime = generation time
covScorehT,B,C,ri = 1 ⇥ Covi + 2 ⇥ Covb + 4 ⇥ Covm1 2 4
2 x B
12
We apply the same formula used in the last competition since it
combines coverage metrics, effectiveness, execution time and
number of flaky/non-compiling tests
Scoring Formula
tScorehT,B,C,ri = covScorehT,B,C,ri ⇥ min
✓
1,
L
genTime
◆
T = Generated Test
B = Search Budget
C = Class under test
R = independent Run
Covi = statement coverage
Covb = branch coverage
Covm = Strong Mutation
getTime = generation time
penalty = percentage of flaky
test and non-compiling tests
ScorehT,B,C,ri = tScorehT,B,C,ri + penaltyhT,B,C,ri
covScorehT,B,C,ri = 1 ⇥ Covi + 2 ⇥ Covb + 4 ⇥ Covm1 2 4
2 x B
13
The Competition
14
The Tools
jTExpert
RandoopAutomatic unit test generation for Java
T3
15
Selection of the Benchmark Classes
Source Application Domain # Classes
# Selected
Classes
BCEL
Apache
commons
Bytecode manipulation 431 10
Jxpath Java Beans manipulation with Path syntax 180 10
Imaging Framework to write/read images with various formats 427 4
Google Gson
Google
Conversion of Java Objects into their JSON
representation and vice versa
174 9
Re2j
Regular expression engine for time-linear regular
expression matching
47 8
Freehep
Java Analysis
Studio
Open-source repository providing Java utilities for high
energy physics applications
180 10
LA4j Github
Linear Algebra primitives (matrices and vectors) and
algorithms
208 10
Okhttp Github
HTTP and HTTP/2 client for Android and Java
applications
193 8
16
Selection of the Benchmark Classes
Source Application Domain # Classes
# Selected
Classes
BCEL
Apache
commons
Bytecode manipulation 431 10
Jxpath Java Beans manipulation with Path syntax 180 10
Imaging Framework to write/read images with various formats 427 4
Google Gson
Google
Conversion of Java Objects into their JSON
representation and vice versa
174 9
Re2j
Regular expression engine for time-linear regular
expression matching
47 8
Freehep
Java Analysis
Studio
Open-source repository providing Java utilities for high
energy physics applications
180 10
LA4j Github
Linear Algebra primitives (matrices and vectors) and
algorithms
208 10
Okhttp Github
HTTP and HTTP/2 client for Android and Java
applications
193 8
17
Selection of the Benchmark Classes
Source Application Domain # Classes
# Selected
Classes
BCEL
Apache
commons
Bytecode manipulation 431 10
Jxpath Java Beans manipulation with Path syntax 180 10
Imaging Framework to write/read images with various formats 427 4
Google Gson
Google
Conversion of Java Objects into their JSON
representation and vice versa
174 9
Re2j
Regular expression engine for time-linear regular
expression matching
47 8
Freehep
Java Analysis
Studio
Open-source repository providing Java utilities for high
energy physics applications
180 10
LA4j Github
Linear Algebra primitives (matrices and vectors) and
algorithms
208 10
Okhttp Github
HTTP and HTTP/2 client for Android and Java
applications
193 8
18
Selection Procedure
HOW:
• Computing the McCabe’s cyclomatic complexity (MCC) for all methods in
each java library
• Filtering out all trivial classes, i.e., classes that contains only methods
with a MCC < 3
• Random sampling from the pruned projects
WHAT/WHY:
• Removing (likely) trivial classes not challenging for the tools
• Developers may use automated tools for complex classes
19
Benchmark Statistics
Largest Class:
Name = XPathParserTokenManager
Project = JXPATH
N. Statements = 1029
N. Branches = 872
Smallest Class:
Name = ForwardBackSubstitutionSolver
Project = LA4J
N. Statements = 26
N. Branches = 20
# Branches
Frequency
# Statements
Frequency
20
The Methodology
• Search Budgets = 10s, 30s, 60s, 120s, 240s, 300s, 480s
• Number of CUTs = 69
• Number of repetitions = 3
• All tools have been executed in parallel (multi-threading)
on the same machine
• Statistical analysis:
Friedman’s test: non-parametric test for multiple-problem analysis
Post-hoc Connover’s procedure for pairwise multiple comparisons
21
The Results
22
Coverage Results
Search Budget = 10s Search Budget = 30s
23
Coverage Results
Search Budget = 60s Search Budget = 480s
24
Coverage Results
There are 43 classes out of 69 (≈
60%) for which at least one of
the two participant tools could
not generate any test case.
What happens if we consider only
classes for which both EvoSuite and
JTexpert could generate tests?
Filtered Results with
Search Budget = 480s
25
Scalability%BranchCoverage
0
25
50
75
100
Search Budget
10s 30s 60s 120s 240s 300s 480s
EvoSuite JTExpert
T3 Randoop
%StrongMutationCov.
0
12.5
25
37.5
50
Search Budget
10s 30s 60s 120s 240s 300s 480s
EvoSuite JTExpert
T3 Randoop
Comparison for the class Parser.java extracted from the library Re4J.
N. Statements = 760, N. Branches = 565, N. Mutants = 203
26
ScoringScore
0
75
150
225
300
Search Budget
10s 30s 60s 120s 240s 300s 480s
EvoSuite JTExpert T3 Randoop
27
Generated vs. Manually-written Tests
Comparison of the scores achieved by
• EvoSuite after 480s
• JTexpert after 480s
• T3 after 480s
• Random after 480s
• Manually-written tests
• Optimal Score
N.B.: We only considered the 63
subjects for which we found
developers-written tests.
0
50
100
150
200
250
300
350
400
450
500
268
61
78
125
251
Optimal
EvoSuite
JTExpert
T3
Randoop
M
anual
28
Tool Total Score St. Dev.
Friedman’s Test
Statistically better than
(Conover’s procedure)
Rank Score
EvoSuite 1457 193 1 1.55 JTExpert, T3, Randoop
JTexpert 849 102 2 2.71 T3, Randoop
T3 526 82 3 2.81 Random
Random 448 34 4 2.92
Statistical Analysis
29
Tool Total Score St. Dev.
Friedman’s Test
Statistically better than
(Conover’s procedure)
Rank Score
EvoSuite 1457 193 1 1.55 JTExpert, T3, Randoop
JTexpert 849 102 2 2.71 T3, Randoop
T3 526 82 3 2.81 Random
Random 448 34 4 2.92
Statistical Analysis
30
Statistical Analysis
Tool Total Score St. Dev.
Friedman’s Test
Statistically better than
(Conover’s procedure)
Rank Score
EvoSuite 1457 193 1 1.55 JTExpert, T3, Randoop
JTexpert 849 102 2 2.71 T3, Randoop
T3 526 82 3 2.81 Random
Random 448 34 4 2.92
31
Lessons Learnt
• Using multi-problem statistical tests
• Selection procedure to filter-out (likely) trivial classes
• Subject categories: string manipulation, computational intensive, object
manipulation, etc.
• What next:
• Publishing  the benchmark infrastructure
• Performing a more in-depth analysis for each subject category
• More Tools, new languages? (i.e., C, C#?)
32
.lusoftware verification & validation
VVS
Java Unit Testing Tool
Competition — Fifth Round
Annibale Panichella, Urko Rueda Molina
33

More Related Content

DOCX
Qtp 11 notes
DOC
DOC
Qtp (basics to advanced)
PPTX
Symbexecsearch
PPTX
Testes? Mas isso não aumenta o tempo de projecto? Não quero...
PPTX
REMI: Defect Prediction for Efficient API Testing (

ESEC/FSE 2015, Industria...
PPT
Ppt Qtp
PPTX
Testing, fixing, and proving with contracts
Qtp 11 notes
Qtp (basics to advanced)
Symbexecsearch
Testes? Mas isso não aumenta o tempo de projecto? Não quero...
REMI: Defect Prediction for Efficient API Testing (

ESEC/FSE 2015, Industria...
Ppt Qtp
Testing, fixing, and proving with contracts

What's hot (20)

PPT
Hp Quick Test Professional
DOC
Qtp interview questions3
DOC
Qtp questions and answers
PDF
Personalized Defect Prediction
PPT
Copy of qtp presentation
PPTX
Testware Hierarchy for Test Automation
DOC
Interview questions in qtp
DOCX
QTP Interview Questions and answers
PPTX
Automatically Generated Patches as Debugging Aids: A Human Study (FSE 2014)
PPT
Qtp Basics
DOC
Quality center certification questions
PPTX
QTP Power Point Presentation
PPT
QTP Slides Presentation.
PDF
Qtp interview questions and answers
PPTX
How We Get There: A Context-Guided Search Strategy in Concolic Testing (FSE 2...
PPT
Qtp 92 Tutorial
PPT
First QTP Tutorial
PPT
Qtp Training
PDF
Qtp Interview Questions
PDF
What is UFT? HP's unified functional testing.
Hp Quick Test Professional
Qtp interview questions3
Qtp questions and answers
Personalized Defect Prediction
Copy of qtp presentation
Testware Hierarchy for Test Automation
Interview questions in qtp
QTP Interview Questions and answers
Automatically Generated Patches as Debugging Aids: A Human Study (FSE 2014)
Qtp Basics
Quality center certification questions
QTP Power Point Presentation
QTP Slides Presentation.
Qtp interview questions and answers
How We Get There: A Context-Guided Search Strategy in Concolic Testing (FSE 2...
Qtp 92 Tutorial
First QTP Tutorial
Qtp Training
Qtp Interview Questions
What is UFT? HP's unified functional testing.
Ad

Similar to Java Unit Testing Tool Competition — Fifth Round (20)

PPTX
Sbst2018 contest2018
PDF
SBST 2015 - 3rd Tool Competition for Java Junit test Tools
PDF
Unit Testing Tool Competition-Eighth Round
PDF
Sound Empirical Evidence in Software Testing
PDF
The Joy of Testing - Deep Dive @ Devoxx Belgium 2024
PDF
Introduction To Software Testing 2nd Edition Paul Ammann Jeff Offutt
PPT
Assessing Unit Test Quality
PPTX
GeeCON - Improve your tests with Mutation Testing
PDF
Introduction to Software Testing.pdf
PDF
software-testing-yogesh-singh (1).pdf
PDF
IPA Fall Days 2019
PDF
Advanced Java Testing
PPTX
Javantura v3 - Mutation Testing for everyone – Nicolas Fränkel
PPTX
The Current State of the Art of Regression Testing
PPTX
I.T.A.K.E Unconference - Mutation testing to the rescue of your tests
PPTX
An Empirical Study on the Adequacy of Testing in Open Source Projects
DOC
Testing survey by_directions
PDF
New types of tests for Java projects
PPTX
The Test way
PDF
Testing: an Introduction and Panorama
Sbst2018 contest2018
SBST 2015 - 3rd Tool Competition for Java Junit test Tools
Unit Testing Tool Competition-Eighth Round
Sound Empirical Evidence in Software Testing
The Joy of Testing - Deep Dive @ Devoxx Belgium 2024
Introduction To Software Testing 2nd Edition Paul Ammann Jeff Offutt
Assessing Unit Test Quality
GeeCON - Improve your tests with Mutation Testing
Introduction to Software Testing.pdf
software-testing-yogesh-singh (1).pdf
IPA Fall Days 2019
Advanced Java Testing
Javantura v3 - Mutation Testing for everyone – Nicolas Fränkel
The Current State of the Art of Regression Testing
I.T.A.K.E Unconference - Mutation testing to the rescue of your tests
An Empirical Study on the Adequacy of Testing in Open Source Projects
Testing survey by_directions
New types of tests for Java projects
The Test way
Testing: an Introduction and Panorama
Ad

More from Annibale Panichella (20)

PDF
Metamorphic-Based Many-Objective Distillation of LLMs for Code-related Tasks
PDF
MIP Award presentation at the IEEE International Conference on Software Analy...
PDF
Breaking the Silence: the Threats of Using LLMs in Software Engineering
PDF
Searching for Quality: Genetic Algorithms and Metamorphic Testing for Softwar...
PDF
A Fast Multi-objective Evolutionary Approach for Designing Large-Scale Optica...
PDF
An Improved Pareto Front Modeling Algorithm for Large-scale Many-Objective Op...
PDF
VST2022.pdf
PDF
An Adaptive Evolutionary Algorithm based on Non-Euclidean Geometry for Many-O...
PDF
Speeding-up Software Testing With Computational Intelligence
PDF
Incremental Control Dependency Frontier Exploration for Many-Criteria Test C...
PDF
ICSE 2017 - Evocrash
PDF
Evolutionary Testing for Crash Reproduction
PDF
Parameterizing and Assembling IR-based Solutions for SE Tasks using Genetic A...
PDF
Security Threat Identification and Testing
PDF
Reformulating Branch Coverage as a Many-Objective Optimization Problem
PDF
Results for EvoSuite-MOSA at the Third Unit Testing Tool Competition
PDF
Adaptive User Feedback for IR-based Traceability Recovery
PDF
Diversity mechanisms for evolutionary populations in Search-Based Software En...
PDF
Estimating the Evolution Direction of Populations to Improve Genetic Algorithms
PDF
When and How Using Structural Information to Improve IR-Based Traceability Re...
Metamorphic-Based Many-Objective Distillation of LLMs for Code-related Tasks
MIP Award presentation at the IEEE International Conference on Software Analy...
Breaking the Silence: the Threats of Using LLMs in Software Engineering
Searching for Quality: Genetic Algorithms and Metamorphic Testing for Softwar...
A Fast Multi-objective Evolutionary Approach for Designing Large-Scale Optica...
An Improved Pareto Front Modeling Algorithm for Large-scale Many-Objective Op...
VST2022.pdf
An Adaptive Evolutionary Algorithm based on Non-Euclidean Geometry for Many-O...
Speeding-up Software Testing With Computational Intelligence
Incremental Control Dependency Frontier Exploration for Many-Criteria Test C...
ICSE 2017 - Evocrash
Evolutionary Testing for Crash Reproduction
Parameterizing and Assembling IR-based Solutions for SE Tasks using Genetic A...
Security Threat Identification and Testing
Reformulating Branch Coverage as a Many-Objective Optimization Problem
Results for EvoSuite-MOSA at the Third Unit Testing Tool Competition
Adaptive User Feedback for IR-based Traceability Recovery
Diversity mechanisms for evolutionary populations in Search-Based Software En...
Estimating the Evolution Direction of Populations to Improve Genetic Algorithms
When and How Using Structural Information to Improve IR-Based Traceability Re...

Recently uploaded (20)

PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Encapsulation theory and applications.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Approach and Philosophy of On baking technology
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Spectroscopy.pptx food analysis technology
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
cuic standard and advanced reporting.pdf
Review of recent advances in non-invasive hemoglobin estimation
Advanced methodologies resolving dimensionality complications for autism neur...
NewMind AI Weekly Chronicles - August'25 Week I
Encapsulation theory and applications.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Spectral efficient network and resource selection model in 5G networks
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Big Data Technologies - Introduction.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Approach and Philosophy of On baking technology
Understanding_Digital_Forensics_Presentation.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Empathic Computing: Creating Shared Understanding
Spectroscopy.pptx food analysis technology
Chapter 3 Spatial Domain Image Processing.pdf
Network Security Unit 5.pdf for BCA BBA.
cuic standard and advanced reporting.pdf

Java Unit Testing Tool Competition — Fifth Round

  • 1. .lusoftware verification & validation VVS Java Unit Testing Tool Competition — Fifth Round Annibale Panichella, Urko Rueda Molina 1
  • 2. Previous Editions Year Venue Coverage tool Mutation Tool #CUTs #Projects #Participants Statistical Tests Round 1 2013 ICST Cobertura Javalanche 77 5 2 ✗ Round 2 2014 FITTEST JaCoCo PITest 63 9 4 ✗ Round 3 2015 SBST JaCoCo PITest 63 9 8 ✗ Round 4 2016 SBST DEFECT4J (Real Faults) 68 5 4 ✗ 2
  • 3. New Edition Year Venue Coverage tool Mutation Tool #CUTs #Projects #Participants Statistical Tests Round 1 2013 ICST Cobertura Javalanche 77 5 2 ✗ Round 2 2014 FITTEST JaCoCo PITest 63 9 4 ✗ Round 3 2015 SBST JaCoCo PITest 63 9 8 ✗ Round 4 2016 SBST DEFECT4J (Real Faults) 68 5 4 ✗ Round 5 2017 SBST JaCoCo PITest + Our Env. 69 8 2+2 ✓ 3
  • 5. The Infrastructure Defect4j Defect4j • The previous edition used DEFECT4J to detect flaky tests and to measure effectiveness • In the new edition, we modified the infrastructure to work with libraries not in DEFECT4J • We developed our own tool to detect flaky tests • Effectiveness based on mutation analysis: PITest + JaCoCo 5
  • 6. The Infrastructure Defect4j Defect4j • The previous edition used DEFECT4J to detect flaky tests and to measure effectiveness • In the new edition, we modified the infrastructure to work with libraries not in DEFECT4J • We developed our own tool to detect flaky tests • Effectiveness based on mutation analysis: PITest + JaCoCo 6
  • 7. The Infrastructure Defect4j Defect4j • The previous edition used DEFECT4J to detect flaky tests and to measure effectiveness • In the new edition, we modified the infrastructure to work with libraries not in DEFECT4J • We developed our own tool to detect flaky tests • Effectiveness based on mutation analysis: PITest + JaCoCo 7
  • 8. The Infrastructure • The previous edition used DEFECT4J to detect flaky tests and to measure effectiveness • In the new edition, we modified the infrastructure to work with libraries not in DEFECT4J • We developed our own tool to detect flaky tests • Effectiveness based on mutation analysis: PITest + JaCoCo Our Tool PITest + JaCoCo 8
  • 9. Test Management Flaky tests: • Pass during generation but fail when re-executed • Detection mechanism: we run each test suite five times • Ignored when computing the coverage scores Non-compiling tests: • Generated test suites were re-compiled in our own execution environment 9
  • 10. Metric Computation Code Coverage: • Statement coverage • Condition coverage Mutation Score: • We did not use PITest’s running engine since it gave errors for test cases with ad-hoc/non-standard JUnit runners (e.g., in EvoSuite) • We only use PITest engine for the generation of mutants • Combining PITest with JaCoCo: executing only mutants infecting covered lines 10
  • 11. We apply the same formula used in the last competition since it combines coverage metrics, effectiveness, execution time and number of flaky/non-compiling tests Scoring Formula T = Generated Test B = Search Budget C = Class under test R = independent Run Covi = statement coverage Covb = branch coverage Covm = Strong Mutation covScorehT,B,C,ri = 1 ⇥ Covi + 2 ⇥ Covb + 4 ⇥ Covm1 2 4 11
  • 12. We apply the same formula used in the last competition since it combines coverage metrics, effectiveness, execution time and number of flaky/non-compiling tests Scoring Formula tScorehT,B,C,ri = covScorehT,B,C,ri ⇥ min ✓ 1, L genTime ◆ T = Generated Test B = Search Budget C = Class under test R = independent Run Covi = statement coverage Covb = branch coverage Covm = Strong Mutation getTime = generation time covScorehT,B,C,ri = 1 ⇥ Covi + 2 ⇥ Covb + 4 ⇥ Covm1 2 4 2 x B 12
  • 13. We apply the same formula used in the last competition since it combines coverage metrics, effectiveness, execution time and number of flaky/non-compiling tests Scoring Formula tScorehT,B,C,ri = covScorehT,B,C,ri ⇥ min ✓ 1, L genTime ◆ T = Generated Test B = Search Budget C = Class under test R = independent Run Covi = statement coverage Covb = branch coverage Covm = Strong Mutation getTime = generation time penalty = percentage of flaky test and non-compiling tests ScorehT,B,C,ri = tScorehT,B,C,ri + penaltyhT,B,C,ri covScorehT,B,C,ri = 1 ⇥ Covi + 2 ⇥ Covb + 4 ⇥ Covm1 2 4 2 x B 13
  • 15. The Tools jTExpert RandoopAutomatic unit test generation for Java T3 15
  • 16. Selection of the Benchmark Classes Source Application Domain # Classes # Selected Classes BCEL Apache commons Bytecode manipulation 431 10 Jxpath Java Beans manipulation with Path syntax 180 10 Imaging Framework to write/read images with various formats 427 4 Google Gson Google Conversion of Java Objects into their JSON representation and vice versa 174 9 Re2j Regular expression engine for time-linear regular expression matching 47 8 Freehep Java Analysis Studio Open-source repository providing Java utilities for high energy physics applications 180 10 LA4j Github Linear Algebra primitives (matrices and vectors) and algorithms 208 10 Okhttp Github HTTP and HTTP/2 client for Android and Java applications 193 8 16
  • 17. Selection of the Benchmark Classes Source Application Domain # Classes # Selected Classes BCEL Apache commons Bytecode manipulation 431 10 Jxpath Java Beans manipulation with Path syntax 180 10 Imaging Framework to write/read images with various formats 427 4 Google Gson Google Conversion of Java Objects into their JSON representation and vice versa 174 9 Re2j Regular expression engine for time-linear regular expression matching 47 8 Freehep Java Analysis Studio Open-source repository providing Java utilities for high energy physics applications 180 10 LA4j Github Linear Algebra primitives (matrices and vectors) and algorithms 208 10 Okhttp Github HTTP and HTTP/2 client for Android and Java applications 193 8 17
  • 18. Selection of the Benchmark Classes Source Application Domain # Classes # Selected Classes BCEL Apache commons Bytecode manipulation 431 10 Jxpath Java Beans manipulation with Path syntax 180 10 Imaging Framework to write/read images with various formats 427 4 Google Gson Google Conversion of Java Objects into their JSON representation and vice versa 174 9 Re2j Regular expression engine for time-linear regular expression matching 47 8 Freehep Java Analysis Studio Open-source repository providing Java utilities for high energy physics applications 180 10 LA4j Github Linear Algebra primitives (matrices and vectors) and algorithms 208 10 Okhttp Github HTTP and HTTP/2 client for Android and Java applications 193 8 18
  • 19. Selection Procedure HOW: • Computing the McCabe’s cyclomatic complexity (MCC) for all methods in each java library • Filtering out all trivial classes, i.e., classes that contains only methods with a MCC < 3 • Random sampling from the pruned projects WHAT/WHY: • Removing (likely) trivial classes not challenging for the tools • Developers may use automated tools for complex classes 19
  • 20. Benchmark Statistics Largest Class: Name = XPathParserTokenManager Project = JXPATH N. Statements = 1029 N. Branches = 872 Smallest Class: Name = ForwardBackSubstitutionSolver Project = LA4J N. Statements = 26 N. Branches = 20 # Branches Frequency # Statements Frequency 20
  • 21. The Methodology • Search Budgets = 10s, 30s, 60s, 120s, 240s, 300s, 480s • Number of CUTs = 69 • Number of repetitions = 3 • All tools have been executed in parallel (multi-threading) on the same machine • Statistical analysis: Friedman’s test: non-parametric test for multiple-problem analysis Post-hoc Connover’s procedure for pairwise multiple comparisons 21
  • 23. Coverage Results Search Budget = 10s Search Budget = 30s 23
  • 24. Coverage Results Search Budget = 60s Search Budget = 480s 24
  • 25. Coverage Results There are 43 classes out of 69 (≈ 60%) for which at least one of the two participant tools could not generate any test case. What happens if we consider only classes for which both EvoSuite and JTexpert could generate tests? Filtered Results with Search Budget = 480s 25
  • 26. Scalability%BranchCoverage 0 25 50 75 100 Search Budget 10s 30s 60s 120s 240s 300s 480s EvoSuite JTExpert T3 Randoop %StrongMutationCov. 0 12.5 25 37.5 50 Search Budget 10s 30s 60s 120s 240s 300s 480s EvoSuite JTExpert T3 Randoop Comparison for the class Parser.java extracted from the library Re4J. N. Statements = 760, N. Branches = 565, N. Mutants = 203 26
  • 27. ScoringScore 0 75 150 225 300 Search Budget 10s 30s 60s 120s 240s 300s 480s EvoSuite JTExpert T3 Randoop 27
  • 28. Generated vs. Manually-written Tests Comparison of the scores achieved by • EvoSuite after 480s • JTexpert after 480s • T3 after 480s • Random after 480s • Manually-written tests • Optimal Score N.B.: We only considered the 63 subjects for which we found developers-written tests. 0 50 100 150 200 250 300 350 400 450 500 268 61 78 125 251 Optimal EvoSuite JTExpert T3 Randoop M anual 28
  • 29. Tool Total Score St. Dev. Friedman’s Test Statistically better than (Conover’s procedure) Rank Score EvoSuite 1457 193 1 1.55 JTExpert, T3, Randoop JTexpert 849 102 2 2.71 T3, Randoop T3 526 82 3 2.81 Random Random 448 34 4 2.92 Statistical Analysis 29
  • 30. Tool Total Score St. Dev. Friedman’s Test Statistically better than (Conover’s procedure) Rank Score EvoSuite 1457 193 1 1.55 JTExpert, T3, Randoop JTexpert 849 102 2 2.71 T3, Randoop T3 526 82 3 2.81 Random Random 448 34 4 2.92 Statistical Analysis 30
  • 31. Statistical Analysis Tool Total Score St. Dev. Friedman’s Test Statistically better than (Conover’s procedure) Rank Score EvoSuite 1457 193 1 1.55 JTExpert, T3, Randoop JTexpert 849 102 2 2.71 T3, Randoop T3 526 82 3 2.81 Random Random 448 34 4 2.92 31
  • 32. Lessons Learnt • Using multi-problem statistical tests • Selection procedure to filter-out (likely) trivial classes • Subject categories: string manipulation, computational intensive, object manipulation, etc. • What next: • Publishing  the benchmark infrastructure • Performing a more in-depth analysis for each subject category • More Tools, new languages? (i.e., C, C#?) 32
  • 33. .lusoftware verification & validation VVS Java Unit Testing Tool Competition — Fifth Round Annibale Panichella, Urko Rueda Molina 33