# Empirical Study of Test Case and Test Framework Presence in Public Projects on GitHub
## 3 Results
### Occurrence of \"test\" and Project Properties  
To answer RQ 2, we created scatter graphs according to creation date, date of the last commit, number of commits, or number of watchers of the project (see Figure 4). Presented graphs are focused on the occurrences of the word \"test\" in all java files' content, because this method is able to find the most test cases in an unknown project code, regardless of the framework used. Results of other search types can be found in Appendix A. The graphs do not show projects over 600 occurrences of the searched term to make them more readable (loss of 0.1% of all projects). Regression lines included in the graphs can be used to estimate the number of \"test\" occurrences based on different project's properties. Pearson's correlation coefficient is calculated in each graph as _parson_ with a p-value to express the statistical significance of the correlation coefficient.  
It can be seen from the graphs that there is no strong correlation between the observed properties of the project and the number of occurrences of the word \"test\" in all java files' content. Low correlation is mostly caused by a huge portion of projects with zero occurrences of the searched string. Considering the novelty of projects via creation date, we see increased incidence in 2015 and mid-2018 (Figure 4a). During these years we see an increased number of projects with a higher occurrence, i.e., more than 100. At the same time, considering the date of the last commit, the number of projects with a high number of \"test\" occurrences grows with the date of the last commit. This situation is probably related to the maintenance of the project because from a long-time perspective it is difficult to keep the project reliable and stable without automated tests. Thus, many newly created projects do not include tests at all (lack of the word \"test\" in a project), but the tests are implemented in the following years of the project life (presence of the word \"test\" in a project).  
Although for the popularity (number of watchers), the highest [PERSON]'s coefficient of all 4 observed project properties was reached, the correlation is still very weak. From this point of view, developers do not generally follow projects that are potentially more reliable (more tested). On the other hand, this fact can be related to our previous findings [15] that many projects with a high presence of the \"test\" string in the java file content are automatically committed from other Version Control Systems (e.g., Apache Subversion), where copied directories are used for branching, or they are just copies of other projects without the \"fork\" relation. Therefore, such projects are probably not followed by developers.  
Observing the number of projects' commits revealed the fact that projects with >80,000 commits have a prevalence of zero \"test\" occurrences. The presence of the searched term varied in projects with common (lower) commit activity, therefore, it is not possible to conclude a common behavior of developers.  
**RQ 2**: _Is occurrence of the word \"test\" related to the creation date, date of last commit, number of commits, or number of watchers of a project?_  
No strong relation was found between the number of occurrences of the word \"test\" in all java files' content and the mentioned project properties. On the other hand, we observed that the number of projects with a higher \"test\" presence grows with the project's last commit date. Occurrence related to creation date was higher in 2015 and mid-2018, but not pointing to any trend or rule.