Abstract
The study presented in this paper aims at exploring empirically the relationship between lack of cohesion and testability of classes in object-oriented systems. We investigated testability from the perspective of unit testing. We designed and conducted an empirical study using two Java software systems for which JUnit test cases exist. To capture testability of classes, we used different metrics to measure some characteristics of the corresponding JUnit test cases. We used also some lack of cohesion metrics. In order to evaluate the capability of lack of cohesion metrics to predict testability, we performed statistical tests using correlation. The achieved results provide evidence that (lack of) cohesion may be associated with (low) testability.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Aggarwal, K.K., Yogesh, S., Arvinder, K., Ruchika, M.: Empirical study of object-oriented metrics. Journal of Object Technology 5(8) (2006)
Aman, H., Yamasaki, K., Yamada, H., Noda, M.T.: A proposal of class cohesion metrics using sizes of cohesive parts. In: Welzer, T., et al. (eds.) Knowledge-Based Sof. Engineering. IOS Press, Amsterdam (2002)
Badri, L., Badri, M.: A proposal of a new class cohesion criterion: An empirical Study. Journal of Object Technology 3(4) (2004); Special issue: TOOLS USA
Badri, L., Badri, M., Gueye, A.: Revisiting class cohesion, An empirical investigation on several systems. Journal of Object Technology 7(6) (2008)
Badri, L., Badri, M., Toure, F.: Exploring empirically the relationship between lack of cohesion in object-oriented systems and coupling and size. In: ICSOFT, Greece (July 2010)
Baudry, B., Le Traon, Y., Sunyé, G.: Testability analysis of a UML class diagram. In: Proceeding of the 9th International Software Metrics Symposium (METRICS 2003). IEEE Computer Society Press, Los Alamitos (2003)
Baudry, B., Le Traon, Y., Sunyé, G.: Improving the Testability of UML Class Diagrams. In: Proceedings of IWoTA (International Workshop on Testability Analysis), France (November 2004)
Bertolino, A., Strigini, L.: On the Use of Testability Measures for Dependability Assessment. IEEE Transactions on Software Engineering 22(2) (February 1996)
Bieman, J.M., Kang, B.K.: Cohesion and reuse in an object-oriented system. In: Proc. of the Symposium on Software Reusability (1995)
Binder, R.V.: Design for Testability in Object-Oriented Systems. Com. of the ACM 37 (1994)
Briand, L.C., Daly, J., Porter, V., Wuest, J.: A unified framework for cohesion measurement in object-oriented systems. Empirical Software Engineering 3(1) (1998)
Booch, G.: Object-Oriented Analysis and Design With Applications, 2nd edn. Benjamin/Cummings, Amsterdam (1994)
Briand, L.C., Daly, J., Porter, V., Wuest, J.: Exploring the relationships between design measures and software quality in object-oriented systems. Journal of Systems and Software (51) (2000)
Bruntink, M., Deursen, A.V.: Predicting Class Testability using Object-Oriented Metrics. In: Fourth Int. Workshop on Source Code Analysis and Manipulation (SCAM). IEEE Computer Society, Los Alamitos (2004)
Bruntink, M., Van Deursen, A.: An empirical study into class testability. JSS 79(9) (2006)
Chae, H.S., Kwon, Y.R., Bae, D.H.: A cohesion measure for object-oriented classes. Software Practice and Experience (30) (2000)
Chae, H.S., Kwon, Y.R., Bae, D.H.: Improving cohesion metrics for classes by considering dependent instance variables. IEEE TSE 30(11) (2004)
Chen, Z., Zhou, Y., Xu, B., Zhao, J., Yang, H.: A novel approach to measuring class cohesion based on dependence analysis. In: Proc. 18th International Conferrence on Software Maintenance (2002)
Chidamber, S.R., Kemerer, C.F.: Towards a Metrics Suite for Object-Oriented Design. Object-Oriented Programming Systems, Languages and Applications (OOPSLA), Special Issue of SIGPLAN Notices 26(10) (1991)
Chidamber, S.R., Kemerer, C.F.: A Metrics suite for OO Design. IEEE TSE 20(6) (1994)
Chidamber, S.R., Darcy, D.P., Kemerer, C.F.: Managerial use of metrics for object-oriented software: An exploratory analysis. IEEE TSE 24(8) (1998)
Chowdhary, V.: Practicing Testability in the Real World. In: International Conference on Software Testing, Verification and Validation. IEEE Computer Society Press, Los Alamitos (2009)
Counsell, S., Swift, S.: The interpretation and utility of three cohesion metrics for object-oriented design. ACM TSEM 15(2) (2006)
De Lucia, A., Oliveto, R., Vorraro, L.: Using structural and semantic metrics to improve class cohesion. In: International Conference on Software Maintenance (2008)
Etzkorn, L.H., Gholston, S.E., Fortune, J.L., Stein, C.E., Utley, D.: A comparison of cohesion metrics for object-oriented systems. Information and Software Technology 46 (2004)
Fenton, N., Pfleeger, S.L.: Software Metrics: A Rigorous and Practical Approach. PWS Publishing Company (1997)
Freedman, R.: Testability of software components. IEEE Transactions on Software Engineering 17(6), 553–564 (1991)
Gao, J., Tsao, J., Wu, Y.: Testing and Quality Assurance for Component-Based Software. Artech House Publishers, Boston (2003)
Gao, J., Shih, M.C.: A Component Testability Model for Verification and Measurement. In: Proceedings of the 29th Annual International Computer Software and Applications Conference (COMPSAC 2005). IEEE Computer Society, Los Alamitos (2005)
Henderson-Sellers, B.: Object-Oriented Metrics Measures of Complexity. Prentice-Hall, Englewood Cliffs (1996)
Hitz, M., Montazeri, B.: Measuring coupling and cohesion in object-oriented systems. In: Proc. of the Int. Symp. on Applied Corporate Computing (1995)
IEEE, IEEE Standard Glossary of Software Engineering Terminology. IEEE CSP, NY (1990)
ISO, International Standard ISO/IEC 9126. information technology: Software product evaluation: Quality characteristics and guidelines for their use (1991)
Jungmayr, S.: Testability Measurement and Software Dependencies. In: Proceedings of the 12th International Workshop on Software Measurement (October 2002)
Kabaili, H., Keller, R.K., Lustman, F., Saint-Denis, G.: Class Cohesion Revisited: An Empirical Study on Industrial Systems. In: Workshop on Quantitative Approaches OO Software Engineering (2000)
Kabaili, H., Keller, R.K., Lustman, F.: Cohesion as Changeability Indicator in Object-Oriented Systems. In: Proceedings of the Fifth European Conference on Software Maintenance and Reengineering (CSMR 2001), Estoril Coast (Lisbon), Portugal (2001)
Karoui, K., Dssouli, R.: Specification transformations and design for testability. In: Proceedings of the IEEE Global Telecommunications Conference (GLOBECOM 1996), London (1996)
Khoshgoftaar, T.M., Szabo, R.M.: Detecting Program Modules with Low Testability. In: 11th ICSM, France (1995)
Khoshgoftaar, T.M., Allen, E.B., Xu, Z.: Predicting Testability of Program Modules Using a Neural Network. In: 3rd IEEE Symposium on Application-Specific Systems and Software Engineering Technology (2000)
Larman, G.: Applying UML and Design Patterns, An introduction to object-oriented analysis and design and the unified process. Prentice Hall, Englewood Cliffs (2003)
Li, W., Henry, S.: Object-oriented metrics that predict maintainability. JSS 23 (1993)
Marcus, A., Poshyvanyk, D.: The conceptual cohesion of classes. In: Proc. 21th IEEE International Conference on Software Maintenance (September 2005)
Marcus, A., Poshyvanyk, D., Ferenc, R.: Using the Conceptual Cohesion of Classes for Fault Prediction in Object-Oriented Systems. IEEE TSE 34(2) (2008)
McGregor, J., Srinivas, S.: A measure of testing effort. In: Proceeding of the Conference on Object-Oriented Technologies, pp. 129–142. USENIX Association (June 1996)
Meyers, T.M., Binkley, D.: Slice-Based cohesion metrics and software intervention. IEEE WCRE (2004)
Nguyen, T.B., Delaunay, M., Robach, C.: Testability Analysis Applied to Embedded Data-Flow Software. In: Proceedings of the 3rd International Conference on Quality Software, QSIC 2003 (2003)
Petrenko, A., Dssouli, R., Koenig, H.: On Evaluation of Testability of Protocol Structures. In: Proceedings of the International Workshop on Protocol Est Systems (IFIP), Pau, France (1993)
Pressman, R.S.: Software Engineering, A practitioner’s approach. McGraw Hill, New York (2005)
Sheppard, J.W., Kaufman, M.: Formal Specification of Testability Metrics in IEEE P1522. IEEE AUTOTESTCON, Pennsylvania (August 2001)
Sommervile, I.: Software Engineering (2004)
Stein, C., Cox, G., Etzkorn, L.: Exploring the relationship between cohesion and complexity. Journal of Computer Science 1(2) (2005)
Le Traon, Y., Robach, C.: Testability analysis of co-designed systems. In: Proceedings of the 4th Asian Test Symposium, ATS. IEEE Computer Society, Washington (November 1995)
Le Traon, Y., Robach, C.: Testability Measurements for Data Flow Design. In: Proceedings of the Fourth International Software Metrics Symposium, New Mexico (November 1997)
Le Traon, Y., Ouabdessalam, F., Robach, C.: Analyzing testability on data flow designs. In: Proceedings of ISSRE 2000, San Jose, CA, USA (October 2000)
Voas, J.M.: PIE: A dynamic failure-based technique. IEEE TSE 18(8) (August 1992)
Voas, J., Miller, K.W.: Semantic metrics for software testability. JSS 20 (1993)
Voas, J.M., Miller, K.W.: Software Testability: The New Verification. IEEE Software 12(3) (1995)
Yeh, P.L., Lin, J.C.: Software Testability Measurement Derived From Data Flow Analysis. In: Proceedings of 2nd Euromicro Conference on Software Maintenance and Reengineering (1998)
Woo, G., Chae, H.S., Cui, J.F., Ji, J.H.: Revising cohesion measures by considering the impact of write interactions between class members. Information and Software Technology 51 (2009)
Yourdon, E., Constantine, L.: Structured Design. Prentice Hall, Englewood Cliffs (1979)
Zhao, L.: A New Approach for Software Testability Analysis. In: 28th ICSE (May 2006)
Zhou, Y., Xu, B., Zhao, J., Yang, H.: ICBMC: An improved cohesion measure for classes. In: ICSM (2002)
Zhou, Y., Wen, L., Wang, J., Chen, Y., Lu, H., Xu, B.: DRC: dependence-relationships-based cohesion measure for classes. In: Proc. 10th APSEC (2003)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Badri, L., Badri, M., Toure, F. (2010). Exploring Empirically the Relationship between Lack of Cohesion and Testability in Object-Oriented Systems. In: Kim, Th., Kim, HK., Khan, M.K., Kiumi, A., Fang, Wc., Ślęzak, D. (eds) Advances in Software Engineering. ASEA 2010. Communications in Computer and Information Science, vol 117. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-17578-7_9
Download citation
DOI: https://doi.org/10.1007/978-3-642-17578-7_9
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-17577-0
Online ISBN: 978-3-642-17578-7
eBook Packages: Computer ScienceComputer Science (R0)