Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Analyzing the Evolution of Testing Library Usage in Open Source Java Projects

7 views

Published on

This presentation was given in Benevol 2016 in Utrecht and Saner 2017 in Klagenfurt

Published in: Science
  • Login to see the comments

  • Be the first to like this

Analyzing the Evolution of Testing Library Usage in Open Source Java Projects

  1. 1. Analyzing the Evolution of Testing Library Usage in Open Source Java Projects 1 Ahmed Zerouali, Tom Mens Software Engineering Lab BENEVOL 2016 Research Seminar, Utrecht University
  2. 2. Motivation 2 http://blog.takipi.com/we-analyzed-60678-libraries-on-github-here-are-the-top-100/
  3. 3. Motivation 3 • Improving the design. • Reducing the cost of bugs. • More fun to code. • Demonstrating concrete progress. …
  4. 4. Motivation 4 Library Maintainer Software Developer
  5. 5. Dataset 5 The most popular programming language [1]. > 900k of open source Java projects. [1] http://www.tiobe.com/tiobe-index/ The most popular testing and mocking libraries in .
  6. 6. Dataset 6 Testing libraries: Mocking libraries: Matching and asserting libraries: AssertJ
  7. 7. Dataset 7 Metrics Value All projects 20,688 Projects using at least one of the considered libraries 4,532 Commits 125,580 Source files 10,033,726 Testing related import statements 31,264,586
  8. 8. RQ1 Which are the most frequently used testing-related libraries? 8 JUnit is the Undisputed King of Testing Java Libraries . Total number of project = 4,532
  9. 9. RQ1 Which are the most frequently used testing-related libraries? 9 Total number of project = 4,532 JUnit is the Undisputed King of Testing Java Libraries .
  10. 10. RQ2 When are libraries introduced in a Github project’s lifetime? 10
  11. 11. RQ3 Which libraries are introduced first? 11
  12. 12. RQ4 Which combinations of libraries “co-occur” in the projects in which they are used? 12 In lifetime :
  13. 13. RQ4 Which combinations of libraries “co-occur” in the projects in which they are used? 13 Simultaneously : • All projects that used Hamcrest, AsseretJ, Spring, Mockito or PowerMock used Junit. • JUnit is used much less frequently with its competitor TestNG • More than 40% of projects that use AssertJ also use Hamcrest simultaneously
  14. 14. RQ5 How does the usage frequency of libraries evolve overtime? 14 Testing and matching libraries -> <- Mocking libraries
  15. 15. RQ6 How frequently do different libraries “co-occur” at file level? 15 Proportional distribution of Java files (in all projects) relating to pairs of mocking libraries.
  16. 16. RQ6 How frequently do different libraries “co-occur” at file level? 16 Proportional distribution of Java files (in all projects) relating to pairs of testing and matching libraries.
  17. 17. RQ7 Do projects migrate to competing libraries? 17
  18. 18. Limitations 18  Maven as the build automation tool.  Project’s lifetime two years.  Import statements.
  19. 19. Conclusion 19 • Many libraries are used simultaneously. • Junit is the the most prominent testing library. • Many of the considered libraries complement one another. • 5% of the considered Java projects were subject to library migrations.
  20. 20. Future work 20 • Specific library version changes. • Usage of functionalities of different libraries. • Effort of migrating between different libraries and major versions.
  21. 21. 21
  22. 22. 22
  23. 23. Questions ? 23
  24. 24. RQ3 Which combinations of libraries “co-occur” in the projects in which they are used? 24

×