The research community in Software Engineering and Software Testing in particular builds many of its contributions on a set of mutually shared expectations. Despite the fact that they form the basis of many publications as well as open-source and commercial testing applications, these common expectations and beliefs are rarely ever questioned. For example, Frederic Brooks’ statement that testing takes half of the development time seems to have manifested itself within the community since he first made it in the “Mythical Man Month” in 1975. With this paper, we report on the surprising results of a large-scale field study with 416 software engineers whose development activity we closely monitored over the course of five months, resulting in over 13 years of recorded work time in their integrated development environments (IDEs). Our findings question several commonly shared assumptions and beliefs about testing and might be contributing factors to the observed bug proneness of software in practice: the majority of developers in our study does not test; developers rarely run their tests in the IDE; Test-Driven Development (TDD) is not widely practiced; and, last but not least, software developers only spend a quarter of their work time engineering tests, whereas they think they test half of their time.
21. RQ1. How Do Developers Test?
RQ2. How Do Developers Manage Failing Tests?
22. RQ1. How Do Developers Test?
RQ3. Do Developers Follow Test-Driven Development?
RQ2. How Do Developers Manage Failing Tests?
23. RQ1. How Do Developers Test?
RQ3. Do Developers Follow Test-Driven Development?
RQ4. How Much Do Developers Test?
RQ2. How Do Developers Manage Failing Tests?
55. 416
●
Projects from industry
●
Famous and not-so-famous OSS
projects, e.g. Apache
●
Private projects
●
Anonymous projects
●
5 months
●
68 countries
●
24,255 hours of work time
●
~13.7 developer years
●
460 unique projects
●
5,665 sessions
56. 416
●
Projects from industry
●
Famous and not-so-famous OSS
projects, e.g. Apache
●
Private projects
●
Anonymous projects
●
5 months
●
68 countries
●
24,255 hours of work time
●
~13.7 developer years
●
460 unique projects
●
5,665 sessions
58. RQ1. How Do Developers Test?
How Common is Testing?
59. RQ1. How Do Developers Test?
How Common is Testing?
Projects
60. RQ1. How Do Developers Test?
How Common is Testing?
460
Projects
61. RQ1. How Do Developers Test?
How Common is Testing?
460
200 (43%)
Projects
62. RQ1. How Do Developers Test?
How Common is Testing?
460
200 (43%)
Projects
63. RQ1. How Do Developers Test?
How Common is Testing?
460
200 (43%) Actually worked on
tests
Projects
64. RQ1. How Do Developers Test?
How Common is Testing?
460
200 (43%) Actually worked on
tests
Projects
1) Most projects do not work with tests.
65. RQ1. How Do Developers Test?
What are Tests? Every class that ...
66. RQ1. How Do Developers Test?
What are Tests? Every class that ...
●
is a Junit test.
●
contains traces of a testing Framework (Mockito,
PowerMock, TestNG, …).
●
has “Test” in its name.
67. RQ1. How Do Developers Test?
What are Tests? Every class that ...
●
is a Junit test.
●
contains traces of a testing Framework (Mockito,
PowerMock, TestNG, …).
●
has “Test” in its name.
68. RQ1. How Do Developers Test?
What are Tests? Every class that ...
●
is a Junit test.
●
contains traces of a testing Framework (Mockito,
PowerMock, TestNG, …).
●
has “Test” in its name.
70. RQ1. How Do Developers Test?
How Common is Executing Tests?
71. RQ1. How Do Developers Test?
How Common is Executing Tests?
sessions
72. RQ1. How Do Developers Test?
How Common is Executing Tests?
3,424
sessions
73. RQ1. How Do Developers Test?
How Common is Executing Tests?
3,424
527 (15%)
sessions
≥ 1 test run
74. RQ1. How Do Developers Test?
How Common is Executing Tests?
3,424
527 (15%)
sessions
≥ 1 test run
2) Very rare, even for projects with tests.
75. RQ1. How Do Developers Test?
Image: TylerFrotierPhoto, http://tylerfortierphoto.deviantart.com/art/Lonely-Sheep-244657922
76. RQ1. How Do Developers Test?
How Many Tests Do Developers Execute?
Image: TylerFrotierPhoto, http://tylerfortierphoto.deviantart.com/art/Lonely-Sheep-244657922
77. RQ1. How Do Developers Test?
How Many Tests Do Developers Execute?
Image: TylerFrotierPhoto, http://tylerfortierphoto.deviantart.com/art/Lonely-Sheep-244657922
78. RQ1. How Do Developers Test?
How Many Tests Do Developers Execute?
3) One (90%), or all of them (9%).
Image: TylerFrotierPhoto, http://tylerfortierphoto.deviantart.com/art/Lonely-Sheep-244657922
79. RQ1. How Do Developers Test?
Image: https://blog.shareaholic.com/retail-sites-page-load-time/stopwatch
80. RQ1. How Do Developers Test?
How Long is a Test Run?
Image: https://blog.shareaholic.com/retail-sites-page-load-time/stopwatch
81. RQ1. How Do Developers Test?
How Long is a Test Run?
50% < 0.5s
75% < 5s
95% < 2m
Image: https://blog.shareaholic.com/retail-sites-page-load-time/stopwatch
82. RQ1. How Do Developers Test?
How Long is a Test Run?
50% < 0.5s
75% < 5s
95% < 2m
Image: https://blog.shareaholic.com/retail-sites-page-load-time/stopwatch
83. RQ1. How Do Developers Test?
How Long is a Test Run?
50% < 0.5s
75% < 5s
95% < 2m
Image: https://blog.shareaholic.com/retail-sites-page-load-time/stopwatch
84. RQ1. How Do Developers Test?
How Long is a Test Run?
50% < 0.5s
75% < 5s
95% < 2m
4) Very short.
Image: https://blog.shareaholic.com/retail-sites-page-load-time/stopwatch
86. RQ1. How Do Developers Test?
1) Most projects do not actively work with tests.
2) Even projects with tests execute them very
rarely.
3) Most test executions contain 1 test.
4) Most test executions are very short.
87. RQ1. How Do Developers Test?
1) Most projects do not actively work with tests.
2) Even projects with tests execute them very
rarely.
3) Most test executions contain 1 test.
4) Most test executions are very short.
88. RQ1. How Do Developers Test?
1) Most projects do not actively work with tests.
2) Even projects with tests execute them very
rarely.
3) Most test executions contain 1 test.
4) Most test executions are very short.
89. RQ1. How Do Developers Test?
1) Most projects do not actively work with tests.
2) Even projects with tests execute them very
rarely.
3) Most test executions contain 1 test.
4) Most test executions are very short.
90. RQ2. How Do Developers Manage Failing Tests?
Image: https://www.linkedin.com/pulse/admit-failure-early-james-ient
91. RQ2. How Do Developers Manage Failing Tests?
How Many Test Executions Fail?
Image: https://www.linkedin.com/pulse/admit-failure-early-james-ient
92. RQ2. How Do Developers Manage Failing Tests?
The majority, 65%.
How Many Test Executions Fail?
Image: https://www.linkedin.com/pulse/admit-failure-early-james-ient
98. RQ2. How Do Developers Manage Failing Tests?
1) Dive into production code
2) Switch away from Eclipse
3) Almost no debug perspective
4) No frustration-closing of IDE
99. RQ2. How Do Developers Manage Failing Tests?
1) Dive into production code
2) Switch away from Eclipse
3) Almost no debug perspective
4) No frustration-closing of IDE
100. RQ2. How Do Developers Manage Failing Tests?
1) Dive into production code
2) Switch away from Eclipse
3) Almost no debug perspective
4) No frustration-closing of IDE
101. RQ2. How Do Developers Manage Failing Tests?
1) Dive into production code
2) Switch away from Eclipse
3) Almost no debug perspective
4) No frustration-closing of IDE
107. RQ2. How Do Developers Manage Failing Tests?
1) Most test executions fail.
2) Developers have certain patterns of managing
failed test executions.
3) Most test repairs are fast.
108. RQ2. How Do Developers Manage Failing Tests?
1) Most test executions fail.
2) Developers have certain patterns of managing
failed test executions.
3) Most test repairs are fast.
109. RQ2. How Do Developers Manage Failing Tests?
1) Most test executions fail.
2) Developers have certain patterns of managing
failed test executions.
3) Most test repairs are fast.
110. RQ3. Do Developers Follow TDD?
What is TDD?
Image: http://www.agilenutshell.com/test_driven_development
111. RQ3. Do Developers Follow TDD?
What is TDD?
Image: http://www.agilenutshell.com/test_driven_development
112. RQ3. Do Developers Follow TDD?
What is TDD?
Image: http://www.agilenutshell.com/test_driven_development
113. RQ3. Do Developers Follow TDD?
What is TDD?
Image: http://www.agilenutshell.com/test_driven_development
114. RQ3. Do Developers Follow TDD?
What is TDD?
Image: http://www.agilenutshell.com/test_driven_development
142. Conclusion: Testing Paradox
1) Test executions are rare
“Running Eclipse UI Platform tests
locally blocks my machine … I
offload running them to the CI.”
Famous Eclipse Dude
2) Yet, 25% of work time on testing