SlideShare a Scribd company logo
Analyzing	the	Evolu1on	
of	Tes1ng	Library	Usage	
in	Open	Source	Java	Projects	
1	
Ahmed	ZEROUALI,	Tom	MENS	
SoDware	Engineering	Lab,	University	of	Mons,	Belgium	
SANER	2017	Early	Research	Achievements	—	Klagenfurt,	Austria,	February	2017
Mo1va1on	
2	
soDware	
project	
library	1	
library	2	
library	n	
…
soDware	
project	soDware	
project	
library	1	
library	1	
library	1	
library	1	
library	1	
library	1	
Mo1va1on	
3	
soDware	
project	
library	1	
library	2	
library	n	
…
soDware	
project	soDware	
project	
library	1	
library	1	
library	1	
library	1	
library	1	
library	1	
Mo1va1on	
4	
soDware	
project	
library	1	
library	2	
library	n	
…	
so0ware	
developer	
Which	library	should	I	use?	
When	should	I	upgrade?	
When	should	I	migrate?	
What	is	the	impact?	
What	is	the	effort	involved?
library	1	
library	1	
library	1	
Mo1va1on	
5	
library	
maintainer	
soDware	
project	
library	1	
library	2	
library	n	
…	
Who	uses	my	library	and	how?	
How	to	stay	ahead	of	compe11on?	
How	to	avoid	users	migra1ng	to	other	libraries?	
When	should	I	release	library	updates?
Focus	
6	
Most	popular	programming	language	[1]	
>	900k	of		open	source	Java	projects.	
[1]	According	to	TIOBE	Index	for	January	2017	h_p://www.1obe.com/1obe-index/	
[2]	According	to	h_ps://mvnrepository.com/open-source/tes1ng-frameworks			
Most	popular	Java	tes@ng	and	mocking	libraries	[2]
Mo1va1on	
7	
h_p://blog.takipi.com/we-analyzed-60678-libraries-on-github-here-are-the-top-100/			(April	2015)
Mo1va1on	
8	
mvnrepository.com/open-source/tes1ng-frameworks	
mvnrepository.com/open-source/mocking
Most	Frequently	Used	
Tes1ng-related	Libraries	
9	
AssertJ
Most	Frequently	Used	
Tes1ng-related	Libraries	
10	
Considered:	20,688	Java	projects	on	GitHub	
	
Excluded:	
•  projects	<	2	years	
•  unforked	projects	
•  forks	
•  projects	not	using	the	selected	libraries	
	
Retained:	4,532	Java	projects
Dataset	
11	
Metrics	 Value	
Considered	Java	projects	
	
20,688	
Projects	using	at	least	one	of	the	
considered	libraries	
4,532		
Commits	 125,580		
Source	files	 10,033,726		
Tes1ng	related	import	
statements	
31,264,586
Which	libraries	are	used	most	frequently?	
12	
JUnit	is	the	undisputed	king	of	Java	tes1ng	libraries.	
Mockito	is	more	popular	than	its	compe1tors.
When	are	libraries	introduced	
in	a	project’s	life1me?	
13
Which	libraries	are	used	
in	a	project’s	life1me?	
14
Which	libraries	are	used	
simultaneously	in	projects?	
15	
Mockito EasyMock PowerMock
JUnit 100% 7% 12% 23% 4% 32%
JUnit TestNG Spring Hamcrest AssertJ
9% 5%
TestNG 64% 100% 13% 18% 6% 33% 12% 4%
Spring 99% 12% 100% 37% 8% 53% 18% 10%
59% 10% 10%
AssertJ 95% 16% 23% 41% 100% 61%
Hamcrest 99% 9% 18% 100% 7%
11% 15%
Mockito 98% 11% 19% 42% 8% 100% 8% 13%
EasyMock 77% 14% 22% 24% 5% 28% 100% 10%
87% 19% 100%PowerMock 99% 9% 23% 47% 13%
Which	libraries	are	used	
simultaneously	in	projects?	
•  JUnit	is	very	frequently	accompanied	(>94%)	
by	Hamcrest,	AssertJ,	Spring,	Mockito	or	
PowerMock	
•  JUnit	is	rarely	used	with	compe1tor	TestNG	
(7%)	
•  PowerMock	is	mostly	used	as	an	extension	of	
Mockito	(86.5%)	
16
How	frequently	do	libraries	
co-occur	at	file	level?	
17	
Propor1onal	distribu1on	of	Java	files	(in	all	projects)	rela1ng	to	pairs	
of		mocking	libraries.
Do	projects	migrate	to	compe1ng	libraries?	
Permanent	migra1ons	
18	
library	1	 library	2	
library	1	 library	2
Do	projects	migrate	to	compe1ng	libraries?	
Temporary	migra1ons	
19
How	frequently	are	libraries	used	over	1me?	
20	
Tes1ng	and		
matching	libraries	->	
<-	Mocking	libraries
Limita1ons	
21	
q 	 	Open	source	Java	Projects	using		
Maven	as	the	build	automa1on	tool.	
	
	
	
q 	 	Project’s	life1me							two	years.	
	
q 	 	Import	statements.
Main	Findings	
22	
•  Many	libraries	are	used	simultaneously.	
•  Many	of	the	considered	libraries	complement	one	
another,	some	are	compe1ng.	
•  5%	of	the	considered	projects	were	subject	to	library		
migra1ons.
Future	Work	/	Open	Ques1ons	
23	
so0ware	
developer	
library	
maintainer	
How	to	analyse	library	evolu1on	pa_erns	to	recommend	
•  when	to	upgrade	to	a	new	library	version?	
•  when	to	migrate	to	a	compe1ng	library?	
•  how	to	upgrade	or	migrate	(e.g.	effort	&	impact)?	
How	to	analyse	library	usage	pa_erns	to		
•  avoid	library	migra1on?	
•  facilitate	library	upgrading?	
•  maximise	usage	of	library	func1onali1es?	
•  detect	opportuni1es	for	new	func1onali1es?

More Related Content

PPTX
Analyzing the Evolution of Testing Library Usage in Open Source Java Projects
PDF
Socio-Technical Evolution of the Ruby Ecosystem in GitHub
PDF
Evaluationg software quality practices in European industry
PDF
Analysing the evolution of social aspects of open source software ecosystems
PDF
Executable modeling and simulation of system software and processes
ODP
OCL 2.5 plans
ODP
Aligning OCL and UML
PPTX
Developpement mobile vs open source
Analyzing the Evolution of Testing Library Usage in Open Source Java Projects
Socio-Technical Evolution of the Ruby Ecosystem in GitHub
Evaluationg software quality practices in European industry
Analysing the evolution of social aspects of open source software ecosystems
Executable modeling and simulation of system software and processes
OCL 2.5 plans
Aligning OCL and UML
Developpement mobile vs open source

Viewers also liked (20)

PDF
SysML adoption in France
PPTX
Java vs .Net
PPTX
Vbisigk
PDF
La &amp; edm in practice
ODP
Optimized declarative transformation First Eclipse QVTc results
PDF
OCCIware: extensible and standard-based XaaS platform to manage everything in...
ODP
Yet Another Three QVT Languages
PDF
OCCIware
PDF
Frame latency evaluation: when simulation and analysis alone are not enough
ODP
Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...
ODP
OCL Specification Status
PPTX
Ressource numérique Circuit électrique au primaire
PPT
Model Transformation A Personal Perspective
PPTX
mis
ODP
Modeling the OCL Standard Library
PDF
OCCIware Contribution to the EU consultation on Cloud Computing Research Inno...
PPTX
Collaboration and Governance of Open Source Projects
PDF
01072013 e governance
PPTX
SysML adoption in France
Java vs .Net
Vbisigk
La &amp; edm in practice
Optimized declarative transformation First Eclipse QVTc results
OCCIware: extensible and standard-based XaaS platform to manage everything in...
Yet Another Three QVT Languages
OCCIware
Frame latency evaluation: when simulation and analysis alone are not enough
Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...
OCL Specification Status
Ressource numérique Circuit électrique au primaire
Model Transformation A Personal Perspective
mis
Modeling the OCL Standard Library
OCCIware Contribution to the EU consultation on Cloud Computing Research Inno...
Collaboration and Governance of Open Source Projects
01072013 e governance
Ad

More from Tom Mens (20)

PDF
Dependency Issues in Open Source Software Package Registries
PDF
Model Testing of Executable Statecharts using SISMIC
PDF
How to be(come) a successful PhD student
PPTX
Recognising bot activity in collaborative software development
PDF
A Dataset of Bot and Human Activities in GitHub
PDF
The (r)evolution of CI/CD on GitHub
PDF
Nurturing the Software Ecosystems of the Future
PDF
Comment programmer un robot en 30 minutes?
PPTX
On the rise and fall of CI services in GitHub
PPTX
On backporting practices in package dependency networks
PPTX
Comparing semantic versioning practices in Cargo, npm, Packagist and Rubygems
PPTX
Lost in Zero Space
PDF
Evaluating a bot detection model on git commit messages
PPTX
Is my software ecosystem healthy? It depends!
PPTX
Bot or not? Detecting bots in GitHub pull request activity based on comment s...
PDF
On the fragility of open source software packaging ecosystems
PPTX
How magic is zero? An Empirical Analysis of Initial Development Releases in S...
PPTX
Comparing dependency issues across software package distributions (FOSDEM 2020)
PPTX
Measuring Technical Lag in Software Deployments (CHAOSScon 2020)
PDF
SecoHealth 2019 Research Achievements
Dependency Issues in Open Source Software Package Registries
Model Testing of Executable Statecharts using SISMIC
How to be(come) a successful PhD student
Recognising bot activity in collaborative software development
A Dataset of Bot and Human Activities in GitHub
The (r)evolution of CI/CD on GitHub
Nurturing the Software Ecosystems of the Future
Comment programmer un robot en 30 minutes?
On the rise and fall of CI services in GitHub
On backporting practices in package dependency networks
Comparing semantic versioning practices in Cargo, npm, Packagist and Rubygems
Lost in Zero Space
Evaluating a bot detection model on git commit messages
Is my software ecosystem healthy? It depends!
Bot or not? Detecting bots in GitHub pull request activity based on comment s...
On the fragility of open source software packaging ecosystems
How magic is zero? An Empirical Analysis of Initial Development Releases in S...
Comparing dependency issues across software package distributions (FOSDEM 2020)
Measuring Technical Lag in Software Deployments (CHAOSScon 2020)
SecoHealth 2019 Research Achievements
Ad

Recently uploaded (20)

PDF
Placing the Near-Earth Object Impact Probability in Context
PPTX
Vitamins & Minerals: Complete Guide to Functions, Food Sources, Deficiency Si...
PDF
Cosmic Outliers: Low-spin Halos Explain the Abundance, Compactness, and Redsh...
PPTX
Classification Systems_TAXONOMY_SCIENCE8.pptx
PPTX
neck nodes and dissection types and lymph nodes levels
PDF
HPLC-PPT.docx high performance liquid chromatography
PDF
Lymphatic System MCQs & Practice Quiz – Functions, Organs, Nodes, Ducts
PDF
CHAPTER 3 Cell Structures and Their Functions Lecture Outline.pdf
PDF
Phytochemical Investigation of Miliusa longipes.pdf
PDF
Assessment of environmental effects of quarrying in Kitengela subcountyof Kaj...
PPT
protein biochemistry.ppt for university classes
PPTX
Introduction to Cardiovascular system_structure and functions-1
PDF
Formation of Supersonic Turbulence in the Primordial Star-forming Cloud
PPTX
2Systematics of Living Organisms t-.pptx
PPT
POSITIONING IN OPERATION THEATRE ROOM.ppt
PPTX
Taita Taveta Laboratory Technician Workshop Presentation.pptx
PDF
. Radiology Case Scenariosssssssssssssss
PPTX
Microbiology with diagram medical studies .pptx
PDF
Warm, water-depleted rocky exoplanets with surfaceionic liquids: A proposed c...
DOCX
Q1_LE_Mathematics 8_Lesson 5_Week 5.docx
Placing the Near-Earth Object Impact Probability in Context
Vitamins & Minerals: Complete Guide to Functions, Food Sources, Deficiency Si...
Cosmic Outliers: Low-spin Halos Explain the Abundance, Compactness, and Redsh...
Classification Systems_TAXONOMY_SCIENCE8.pptx
neck nodes and dissection types and lymph nodes levels
HPLC-PPT.docx high performance liquid chromatography
Lymphatic System MCQs & Practice Quiz – Functions, Organs, Nodes, Ducts
CHAPTER 3 Cell Structures and Their Functions Lecture Outline.pdf
Phytochemical Investigation of Miliusa longipes.pdf
Assessment of environmental effects of quarrying in Kitengela subcountyof Kaj...
protein biochemistry.ppt for university classes
Introduction to Cardiovascular system_structure and functions-1
Formation of Supersonic Turbulence in the Primordial Star-forming Cloud
2Systematics of Living Organisms t-.pptx
POSITIONING IN OPERATION THEATRE ROOM.ppt
Taita Taveta Laboratory Technician Workshop Presentation.pptx
. Radiology Case Scenariosssssssssssssss
Microbiology with diagram medical studies .pptx
Warm, water-depleted rocky exoplanets with surfaceionic liquids: A proposed c...
Q1_LE_Mathematics 8_Lesson 5_Week 5.docx

Analysing the evolution of testing library usage in open source Java projects