An Empirical Analysis of the Relationship between Cohesion and Testing Effort Waleed Albattah 1* and Austin Melton 2 1 Department of Information Technology, Qassim University, Saudi Arabia. 2 Department of Computer Science, Kent State University, Kent Ohio 44242. * Corresponding author. Email: w.albattah@qu.edu.sa Manuscript submitted February 1, 2017; accepted May 1, 2017. doi: 10.17706/jsw.12.8.671-681 Abstract: Predicting software testability can reduce costs and efforts. Cohesion, as one of software quality metrics, found to be good indicator for software testability. Although there is a good interest in software testability on the class level in the literature, software testability on the package level has not received the same interest. The paper investigates the relationship between a newly proposed package cohesion metric and software testing effort. The empirical analysis used data collected from five Java open source software systems for which JUnit test classes are available. The results show that as good the package cohesion is, as the less testing effort is needed. The stability of the correlations allows us to draw optimistic conclusions about its use as an indicator. Key words: Correlation, cohesion, package, software engineering, software measurements, software metrics, software testing, testability, testing effort. 1. Introduction Software testability is known to be one of the software maintainability characteristics. During the software development process, the detection of faults and errors is always one of the main goals for the software development team. The early detection of errors and faults can reduce the maintenance effort and costs. Software testing is the process that offers this advantage to deliver a high quality software system. Software testability aims to facilitate the process of software testing. ISO [1] defines software testability as “attributes of software that bear on the effort needed to validate the software product.” Another definition by ISO [2] is the degree of effectiveness and efficiency with which test criteria can be established for a system, product, or component, and tests can be performed to determine whether those criteria have been met. IEEE [1] defines it as the degree of the software that facilitates the establishment of test criteria and the performance of tests to determine whether criteria have been met. Software testability has a relation to testing effort reduction and software quality [3]. As stated by Gao et al. [3], the late detection of a lack of testability may be difficult and expensive to repair, and it can badly affect the testing and maintenance effort [4]. It has been argued that software testability, as one of the maintainability characteristics, should be considered as a key factor in software quality. Software quality measurements depend on software testability measures. Therefore, predicting software testability using software measurements is expected to give a chance to improve software quality. 671 Volume 12, Number 8, August 2017 Journal of Software