SlideShare a Scribd company logo
Pavneet Singh Kochhar1, Tegawendé F. Bissyandé2, David Lo1,
Lingxiao Jiang1
1Singapore Management University
2University of Luxembourg
2/24
Importance of Software Testing
Functionality -- Requirements
Debugging -- Software complexity
Costs -- $59 billions* for inadequate testing
What is the adoption of test cases
In open-source projects?
*G. Tassey, “The economic impacts of inadequate infrastructure for software
testing,” National Institute of Standards and Technology, RTI Project, 2002.
3/24
Objective & Contributions
Popularity of test cases
Presence of test cases – project characteristics
Influence of software development artifacts
Large Scale Study on over 20,000 GitHub projects
4/24
Dataset & Statistical computations
Downloaded over 100,000 projects from GitHub
Randomly selected 50,000 projects
 Preliminary study
Filter out projects with < 500 Lines of Code (LOC)
 20,817 projects
5/24
Dataset & Statistical computations
Lines of code
LOC* – By programming languages
Number of test cases
Count of test files
Developer contributions
Project team size
 Bug count
Tags
 Bug reporters
User names
*SLOCCount (http://www.dwheeler.com/sloccount/)
6/24
Lines of Code (LOC)
7/24
RQ1– Popularity of Test Cases
Projects % of Projects
Without Test Cases 38.34%
With Test Cases 61.65%
84.87% of the projects < 100 test cases
10.7% of the projects have >100 & < 500 cases
4.4% of the projects >500 test cases
Distribution of Test Cases
8/24
Box Plot
Median
Lower
Quartile
Upper
Quartile
Lower
Whisker
(25% of Data)
Upper
Whisker
(25% of Data)
Outliers
50% of
Data
9/24
RQ1– Popularity of Test Cases
LOC (Projects with & without Test cases)
Difference between the distributions is statistically significan
(p-value < 0.05)
10/24
RQ1– Popularity of Test Cases
LOC & Test Cases
Positive correlation between #LOC and #Test Cases (ρ=0.427)
(p-value < 0.05)
11//24
RQ1– Popularity of Test Cases
LOC & Test cases/LOC
Negative correlation between #LOC and #Test Cases/LOC (ρ=-0.451)
(p-value < 0.05)
12/24
RQ2– Developers & Test Cases
Developers (Projects with & without Test cases)
Difference between the distributions is statistically significant
(p-value < 0.05)
13/24
RQ2– Developers & Test Cases
Developers & Test cases
Weak correlation between #Developers and #Test Cases (ρ=0.207)
(p-value < 0.05)
14/24
RQ2– Developers & Test Cases
Developers & Test cases/developer
Negative correlation between Team size and #Test Cases per developer (ρ=-0.444)
(p-value < 0.05)
15/24
RQ3–Bug Count and Test Cases
Identifying bugs (Tags)
bug bug; T bug; Bug Confirmed; bugs; starter
bug; bug fix etc.
defect defect; Type-Defect; minor defect
error error; Wow error; build error; error page;
user error etc.
16/24
RQ3–Bug Count and Test Cases
Test cases & Bugs
Weak correlation between # bugs and #Test Cases (ρ=0.181)
(p-value < 0.05)
17/24
RQ4–Bug Reporters and Test Cases
Bug reporters (Projects with & without Test cases)
Difference between the distributions is statistically significant
(p-value < 0.05)
18/24
RQ4– Bug Reporters and Test Cases
Test cases & Bug reporters
Weak correlation between # bug reporters and #Test Cases (ρ=0.171)
(p-value < 0.05)
19/24
RQ5–Programming Languages and Test Cases
Projects (Top 10 Languages)
1. Java
2. Ruby
3. PHP
4. Python
5. ANSI C
6. C++
7. Objective-C
8. C#
9. JavaScript
10.Perl
20/24
RQ5–Programming Languages and Test Cases
Test Cases/Project (Top 10 Languages)
Language # of Projects # of Test Cases Test Cases/ Project
C++ 1,920 648,773 337.90
ANSI C 2,197 286,009 130.18
PHP 2,902 255,553 88.06
C# 1,042 81,334 78.05
Java 3,112 196,703 63.20
Ruby 3,016 173,864 57.64
JavaScript 819 39,070 47.70
Python 2,536 103,600 40.85
Objective-C 1,153 21,343 18.51
Perl 630 7,690 12.20
21/24
RQ5–Programming Languages and Test Cases
Test Cases (Median) (Top 10 Languages)
Distribution of test cases (C++)
22/24
23/24
Threats to Validity
Heuristics to detect test cases
Counting bugs
 Tags: bug, error, defect
 Not all projects use GitHub’s issue tracking
system
24/24
Conclusion
Findings:
o Projects with test cases are bigger in size.
o # of test cases per LOC decreases with increasing LOC.
o The more developers, the more test cases
o The more developers, the less ratio of test cases/developer
o Weak correlation between # of test cases and # of bugs
o # of test cases and # of bug reporters have weak positive correlation
o Projects written in popular languages such as C++, ANSI C & PHP
have higher mean numbers of test cases.
Future agenda:
-- Exploration of the influence of more project characteristics/metrics
-- Check with other open source datasets
-- Use language specific heuristics
25/24
Appendix
Bug Tags
27
installation rich Improvement Reporting
duplicated pat New feature community
feature mark Confirmed documentation
routing needs review In Progress categorization
optimization Samples
Feature
request
publishing
security
Unable to
reproduce
Wont fix ranker
translations nack Resolved server
ui rich Bug confirmed Fatal
TODO pat backend Build System
low priority mark low-priority MS AspNet
Sam presentation frontend OAuth2
22/23
C++ test cases
URL Language
# of test
cases
https://github.com/isis-project/WebKit cpp 166,488
https://github.com/cswei/Olympia_on_Desktop cpp 94,591
https://github.com/librelab/qtmoko-test cpp 52,039
https://github.com/mozilla/mozilla-central cpp 36,671
https://github.com/weissms/owb-mirror cpp 29,340
Distribution of test cases (C#)
29
30
RQ5–Programming Languages and Test Cases
Test Cases (Top 10 Languages)
Median
Lower
Quartile
Upper
Quartile
Lower
whisker
Upper
Whisker Outliers
50% of
Data

More Related Content

PPTX
Revisiting Assert Use in GitHub Projects
PPTX
Adoption of Software Testing in Open Source Projects - A Preliminary Study on...
PDF
Test-Driven Code Review: An Empirical Study
PDF
Review Participation in Modern Code Review: An Empirical Study of the Android...
PDF
Investigating Code Review Practices in Defective Files
PPTX
An overview of automated test suites and defect density in Android
PDF
Using HPC Resources to Exploit Big Data for Code Review Analytics
PDF
Who Should Review My Code?
Revisiting Assert Use in GitHub Projects
Adoption of Software Testing in Open Source Projects - A Preliminary Study on...
Test-Driven Code Review: An Empirical Study
Review Participation in Modern Code Review: An Empirical Study of the Android...
Investigating Code Review Practices in Defective Files
An overview of automated test suites and defect density in Android
Using HPC Resources to Exploit Big Data for Code Review Analytics
Who Should Review My Code?

What's hot (18)

PDF
ICSME 2016: Search-Based Peer Reviewers Recommendation in Modern Code Review
PDF
On the Distribution of Test Smells in Open Source Android Applications: An Ex...
PDF
IDEAL: An Open-Source Identifier Name Appraisal Tool
PDF
A Mono- and Multi-objective Approach for Recommending Software Refactoring
PDF
A Survey on Automatic Software Evolution Techniques
PDF
Cross-project Defect Prediction Using A Connectivity-based Unsupervised Class...
PDF
Revisiting Code Ownership and Its Relationship with Software Quality in the S...
PDF
Recommending Software Refactoring Using Search-based Software Enginnering
PPTX
Survey on Software Defect Prediction
PDF
Traps detection during migration of C and C++ code to 64-bit Windows
PDF
PDF
Cser13.ppt
PPTX
Source code comprehension on evolving software
PPTX
CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)
PPTX
Creating a Successful Continuous Testing Environment
PDF
ICGSE2020: On the Detection of Community Smells Using Genetic Programming-bas...
PPT
Using Developer Information as a Prediction Factor
PDF
Staroletov testing TDD BDD MBT
ICSME 2016: Search-Based Peer Reviewers Recommendation in Modern Code Review
On the Distribution of Test Smells in Open Source Android Applications: An Ex...
IDEAL: An Open-Source Identifier Name Appraisal Tool
A Mono- and Multi-objective Approach for Recommending Software Refactoring
A Survey on Automatic Software Evolution Techniques
Cross-project Defect Prediction Using A Connectivity-based Unsupervised Class...
Revisiting Code Ownership and Its Relationship with Software Quality in the S...
Recommending Software Refactoring Using Search-based Software Enginnering
Survey on Software Defect Prediction
Traps detection during migration of C and C++ code to 64-bit Windows
Cser13.ppt
Source code comprehension on evolving software
CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)
Creating a Successful Continuous Testing Environment
ICGSE2020: On the Detection of Community Smells Using Genetic Programming-bas...
Using Developer Information as a Prediction Factor
Staroletov testing TDD BDD MBT
Ad

Viewers also liked (17)

PPT
The state of quality of care in the Indianapolis Transitional Grant Area
PDF
PDF
DLint: dynamically checking bad coding practices in JavaScript (ISSTA'15 Slides)
PPTX
Do More In Less Time Part 1
PPT
1A- Present Tense verb be
PDF
PDF
PDF
Conformacion del consejo de la cuenca del río guarinó
PPT
3A - Simple Present
PDF
Surat larangan pungli
PPTX
Linguaggio del corpo come usarlo nella seduzione
PPT
6A - Simple Present
PDF
PDF
лекция 2 методы анализа
PPTX
Code Coverage and Test Suite Effectiveness: Empirical Study with Real Bugs in...
PPT
7A - Word order in questions
PPT
Winding Up
The state of quality of care in the Indianapolis Transitional Grant Area
DLint: dynamically checking bad coding practices in JavaScript (ISSTA'15 Slides)
Do More In Less Time Part 1
1A- Present Tense verb be
Conformacion del consejo de la cuenca del río guarinó
3A - Simple Present
Surat larangan pungli
Linguaggio del corpo come usarlo nella seduzione
6A - Simple Present
лекция 2 методы анализа
Code Coverage and Test Suite Effectiveness: Empirical Study with Real Bugs in...
7A - Word order in questions
Winding Up
Ad

Similar to An Empirical Study of Adoption of Software Testing in Open Source Projects (20)

PDF
The Increasing Value and Complexity of Software Call for the Reevaluation of ...
DOC
Software tester_6+ yrs of experience
ODP
Software Testing - Day One
PDF
QUALITY METRICS OF TEST SUITES IN TESTDRIVEN DESIGNED APPLICATIONS
PPT
Lecture 7 Software Metrics.ppt
PPT
PPTX
Statistical debuging for programs written in dynamic programming language ruby
DOCX
Neha_Maggu
DOCX
Bhavani HS
PPTX
Zero-bug Software, Mathematically Guaranteed
PPT
Test Estimation
PPT
PROMISE 2011: "An Analysis of Trends in Productivity and Cost Drivers over Ye...
PDF
Software Engineering Careers
DOCX
PDF
Embedded software static analysis_Polyspace-WhitePaper_final
PDF
Creating a successful continuous testing environment by Eran Kinsbruner
PPTX
An Empirical Study on the Adequacy of Testing in Open Source Projects
PDF
What are Software Testing Methodologies | Software Testing Techniques | Edureka
PPT
Software Quality Architecture And Code Audit
PDF
Software testing
The Increasing Value and Complexity of Software Call for the Reevaluation of ...
Software tester_6+ yrs of experience
Software Testing - Day One
QUALITY METRICS OF TEST SUITES IN TESTDRIVEN DESIGNED APPLICATIONS
Lecture 7 Software Metrics.ppt
Statistical debuging for programs written in dynamic programming language ruby
Neha_Maggu
Bhavani HS
Zero-bug Software, Mathematically Guaranteed
Test Estimation
PROMISE 2011: "An Analysis of Trends in Productivity and Cost Drivers over Ye...
Software Engineering Careers
Embedded software static analysis_Polyspace-WhitePaper_final
Creating a successful continuous testing environment by Eran Kinsbruner
An Empirical Study on the Adequacy of Testing in Open Source Projects
What are Software Testing Methodologies | Software Testing Techniques | Edureka
Software Quality Architecture And Code Audit
Software testing

More from Pavneet Singh Kochhar (9)

PPTX
Mining Testing Questions on Stack Overflow
PPTX
Cataloging GitHub Repositories
PPTX
An Exploratory Study of Functionality and Learning Resources of WebAPIs on Pr...
PPTX
Practitioners’ Expectations on Automated Fault Localization
PPTX
A Large Scale Study of Multiple Programming Languages and Code Quality
PPTX
Understanding the Test Automation Culture of App Developers
PPTX
Potential Biases in Bug Localization: Do They Matter?
PPTX
It’s Not a Bug, It’s a Feature: Does Misclassification Affect Bug Localization?
PPTX
Automatic Fine-Grained Issue Report Reclassification
Mining Testing Questions on Stack Overflow
Cataloging GitHub Repositories
An Exploratory Study of Functionality and Learning Resources of WebAPIs on Pr...
Practitioners’ Expectations on Automated Fault Localization
A Large Scale Study of Multiple Programming Languages and Code Quality
Understanding the Test Automation Culture of App Developers
Potential Biases in Bug Localization: Do They Matter?
It’s Not a Bug, It’s a Feature: Does Misclassification Affect Bug Localization?
Automatic Fine-Grained Issue Report Reclassification

Recently uploaded (20)

PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
System and Network Administraation Chapter 3
PPTX
history of c programming in notes for students .pptx
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
medical staffing services at VALiNTRY
PPTX
Introduction to Artificial Intelligence
PDF
AI in Product Development-omnex systems
Which alternative to Crystal Reports is best for small or large businesses.pdf
Design an Analysis of Algorithms I-SECS-1021-03
How Creative Agencies Leverage Project Management Software.pdf
Operating system designcfffgfgggggggvggggggggg
System and Network Administraation Chapter 3
history of c programming in notes for students .pptx
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Adobe Illustrator 28.6 Crack My Vision of Vector Design
How to Migrate SBCGlobal Email to Yahoo Easily
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
wealthsignaloriginal-com-DS-text-... (1).pdf
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Odoo POS Development Services by CandidRoot Solutions
Design an Analysis of Algorithms II-SECS-1021-03
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
medical staffing services at VALiNTRY
Introduction to Artificial Intelligence
AI in Product Development-omnex systems

An Empirical Study of Adoption of Software Testing in Open Source Projects

  • 1. Pavneet Singh Kochhar1, Tegawendé F. Bissyandé2, David Lo1, Lingxiao Jiang1 1Singapore Management University 2University of Luxembourg
  • 2. 2/24 Importance of Software Testing Functionality -- Requirements Debugging -- Software complexity Costs -- $59 billions* for inadequate testing What is the adoption of test cases In open-source projects? *G. Tassey, “The economic impacts of inadequate infrastructure for software testing,” National Institute of Standards and Technology, RTI Project, 2002.
  • 3. 3/24 Objective & Contributions Popularity of test cases Presence of test cases – project characteristics Influence of software development artifacts Large Scale Study on over 20,000 GitHub projects
  • 4. 4/24 Dataset & Statistical computations Downloaded over 100,000 projects from GitHub Randomly selected 50,000 projects  Preliminary study Filter out projects with < 500 Lines of Code (LOC)  20,817 projects
  • 5. 5/24 Dataset & Statistical computations Lines of code LOC* – By programming languages Number of test cases Count of test files Developer contributions Project team size  Bug count Tags  Bug reporters User names *SLOCCount (http://www.dwheeler.com/sloccount/)
  • 7. 7/24 RQ1– Popularity of Test Cases Projects % of Projects Without Test Cases 38.34% With Test Cases 61.65% 84.87% of the projects < 100 test cases 10.7% of the projects have >100 & < 500 cases 4.4% of the projects >500 test cases Distribution of Test Cases
  • 8. 8/24 Box Plot Median Lower Quartile Upper Quartile Lower Whisker (25% of Data) Upper Whisker (25% of Data) Outliers 50% of Data
  • 9. 9/24 RQ1– Popularity of Test Cases LOC (Projects with & without Test cases) Difference between the distributions is statistically significan (p-value < 0.05)
  • 10. 10/24 RQ1– Popularity of Test Cases LOC & Test Cases Positive correlation between #LOC and #Test Cases (ρ=0.427) (p-value < 0.05)
  • 11. 11//24 RQ1– Popularity of Test Cases LOC & Test cases/LOC Negative correlation between #LOC and #Test Cases/LOC (ρ=-0.451) (p-value < 0.05)
  • 12. 12/24 RQ2– Developers & Test Cases Developers (Projects with & without Test cases) Difference between the distributions is statistically significant (p-value < 0.05)
  • 13. 13/24 RQ2– Developers & Test Cases Developers & Test cases Weak correlation between #Developers and #Test Cases (ρ=0.207) (p-value < 0.05)
  • 14. 14/24 RQ2– Developers & Test Cases Developers & Test cases/developer Negative correlation between Team size and #Test Cases per developer (ρ=-0.444) (p-value < 0.05)
  • 15. 15/24 RQ3–Bug Count and Test Cases Identifying bugs (Tags) bug bug; T bug; Bug Confirmed; bugs; starter bug; bug fix etc. defect defect; Type-Defect; minor defect error error; Wow error; build error; error page; user error etc.
  • 16. 16/24 RQ3–Bug Count and Test Cases Test cases & Bugs Weak correlation between # bugs and #Test Cases (ρ=0.181) (p-value < 0.05)
  • 17. 17/24 RQ4–Bug Reporters and Test Cases Bug reporters (Projects with & without Test cases) Difference between the distributions is statistically significant (p-value < 0.05)
  • 18. 18/24 RQ4– Bug Reporters and Test Cases Test cases & Bug reporters Weak correlation between # bug reporters and #Test Cases (ρ=0.171) (p-value < 0.05)
  • 19. 19/24 RQ5–Programming Languages and Test Cases Projects (Top 10 Languages) 1. Java 2. Ruby 3. PHP 4. Python 5. ANSI C 6. C++ 7. Objective-C 8. C# 9. JavaScript 10.Perl
  • 20. 20/24 RQ5–Programming Languages and Test Cases Test Cases/Project (Top 10 Languages) Language # of Projects # of Test Cases Test Cases/ Project C++ 1,920 648,773 337.90 ANSI C 2,197 286,009 130.18 PHP 2,902 255,553 88.06 C# 1,042 81,334 78.05 Java 3,112 196,703 63.20 Ruby 3,016 173,864 57.64 JavaScript 819 39,070 47.70 Python 2,536 103,600 40.85 Objective-C 1,153 21,343 18.51 Perl 630 7,690 12.20
  • 21. 21/24 RQ5–Programming Languages and Test Cases Test Cases (Median) (Top 10 Languages)
  • 22. Distribution of test cases (C++) 22/24
  • 23. 23/24 Threats to Validity Heuristics to detect test cases Counting bugs  Tags: bug, error, defect  Not all projects use GitHub’s issue tracking system
  • 24. 24/24 Conclusion Findings: o Projects with test cases are bigger in size. o # of test cases per LOC decreases with increasing LOC. o The more developers, the more test cases o The more developers, the less ratio of test cases/developer o Weak correlation between # of test cases and # of bugs o # of test cases and # of bug reporters have weak positive correlation o Projects written in popular languages such as C++, ANSI C & PHP have higher mean numbers of test cases. Future agenda: -- Exploration of the influence of more project characteristics/metrics -- Check with other open source datasets -- Use language specific heuristics
  • 26. Bug Tags 27 installation rich Improvement Reporting duplicated pat New feature community feature mark Confirmed documentation routing needs review In Progress categorization optimization Samples Feature request publishing security Unable to reproduce Wont fix ranker translations nack Resolved server ui rich Bug confirmed Fatal TODO pat backend Build System low priority mark low-priority MS AspNet Sam presentation frontend OAuth2
  • 27. 22/23 C++ test cases URL Language # of test cases https://github.com/isis-project/WebKit cpp 166,488 https://github.com/cswei/Olympia_on_Desktop cpp 94,591 https://github.com/librelab/qtmoko-test cpp 52,039 https://github.com/mozilla/mozilla-central cpp 36,671 https://github.com/weissms/owb-mirror cpp 29,340
  • 28. Distribution of test cases (C#) 29
  • 29. 30 RQ5–Programming Languages and Test Cases Test Cases (Top 10 Languages) Median Lower Quartile Upper Quartile Lower whisker Upper Whisker Outliers 50% of Data