Skip to main content

Exploring Empirically the Relationship between Lack of Cohesion and Testability in Object-Oriented Systems

  • Conference paper

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 117))

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.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Aggarwal, K.K., Yogesh, S., Arvinder, K., Ruchika, M.: Empirical study of object-oriented metrics. Journal of Object Technology 5(8) (2006)

    Google Scholar 

  2. 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)

    Google Scholar 

  3. 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

    Google Scholar 

  4. Badri, L., Badri, M., Gueye, A.: Revisiting class cohesion, An empirical investigation on several systems. Journal of Object Technology 7(6) (2008)

    Google Scholar 

  5. 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)

    Google Scholar 

  6. 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)

    Google Scholar 

  7. 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)

    Google Scholar 

  8. Bertolino, A., Strigini, L.: On the Use of Testability Measures for Dependability Assessment. IEEE Transactions on Software Engineering 22(2) (February 1996)

    Google Scholar 

  9. Bieman, J.M., Kang, B.K.: Cohesion and reuse in an object-oriented system. In: Proc. of the Symposium on Software Reusability (1995)

    Google Scholar 

  10. Binder, R.V.: Design for Testability in Object-Oriented Systems. Com. of the ACM 37 (1994)

    Google Scholar 

  11. 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)

    Google Scholar 

  12. Booch, G.: Object-Oriented Analysis and Design With Applications, 2nd edn. Benjamin/Cummings, Amsterdam (1994)

    MATH  Google Scholar 

  13. 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)

    Google Scholar 

  14. 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)

    Google Scholar 

  15. Bruntink, M., Van Deursen, A.: An empirical study into class testability. JSS 79(9) (2006)

    Google Scholar 

  16. Chae, H.S., Kwon, Y.R., Bae, D.H.: A cohesion measure for object-oriented classes. Software Practice and Experience (30) (2000)

    Google Scholar 

  17. Chae, H.S., Kwon, Y.R., Bae, D.H.: Improving cohesion metrics for classes by considering dependent instance variables. IEEE TSE 30(11) (2004)

    Google Scholar 

  18. 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)

    Google Scholar 

  19. 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)

    Google Scholar 

  20. Chidamber, S.R., Kemerer, C.F.: A Metrics suite for OO Design. IEEE TSE 20(6) (1994)

    Google Scholar 

  21. 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)

    Google Scholar 

  22. Chowdhary, V.: Practicing Testability in the Real World. In: International Conference on Software Testing, Verification and Validation. IEEE Computer Society Press, Los Alamitos (2009)

    Google Scholar 

  23. Counsell, S., Swift, S.: The interpretation and utility of three cohesion metrics for object-oriented design. ACM TSEM 15(2) (2006)

    Google Scholar 

  24. De Lucia, A., Oliveto, R., Vorraro, L.: Using structural and semantic metrics to improve class cohesion. In: International Conference on Software Maintenance (2008)

    Google Scholar 

  25. 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)

    Google Scholar 

  26. Fenton, N., Pfleeger, S.L.: Software Metrics: A Rigorous and Practical Approach. PWS Publishing Company (1997)

    Google Scholar 

  27. Freedman, R.: Testability of software components. IEEE Transactions on Software Engineering 17(6), 553–564 (1991)

    Article  Google Scholar 

  28. Gao, J., Tsao, J., Wu, Y.: Testing and Quality Assurance for Component-Based Software. Artech House Publishers, Boston (2003)

    MATH  Google Scholar 

  29. 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)

    Google Scholar 

  30. Henderson-Sellers, B.: Object-Oriented Metrics Measures of Complexity. Prentice-Hall, Englewood Cliffs (1996)

    Google Scholar 

  31. Hitz, M., Montazeri, B.: Measuring coupling and cohesion in object-oriented systems. In: Proc. of the Int. Symp. on Applied Corporate Computing (1995)

    Google Scholar 

  32. IEEE, IEEE Standard Glossary of Software Engineering Terminology. IEEE CSP, NY (1990)

    Google Scholar 

  33. ISO, International Standard ISO/IEC 9126. information technology: Software product evaluation: Quality characteristics and guidelines for their use (1991)

    Google Scholar 

  34. Jungmayr, S.: Testability Measurement and Software Dependencies. In: Proceedings of the 12th International Workshop on Software Measurement (October 2002)

    Google Scholar 

  35. 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)

    Google Scholar 

  36. 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)

    Google Scholar 

  37. Karoui, K., Dssouli, R.: Specification transformations and design for testability. In: Proceedings of the IEEE Global Telecommunications Conference (GLOBECOM 1996), London (1996)

    Google Scholar 

  38. Khoshgoftaar, T.M., Szabo, R.M.: Detecting Program Modules with Low Testability. In: 11th ICSM, France (1995)

    Google Scholar 

  39. 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)

    Google Scholar 

  40. Larman, G.: Applying UML and Design Patterns, An introduction to object-oriented analysis and design and the unified process. Prentice Hall, Englewood Cliffs (2003)

    Google Scholar 

  41. Li, W., Henry, S.: Object-oriented metrics that predict maintainability. JSS 23 (1993)

    Google Scholar 

  42. Marcus, A., Poshyvanyk, D.: The conceptual cohesion of classes. In: Proc. 21th IEEE International Conference on Software Maintenance (September 2005)

    Google Scholar 

  43. Marcus, A., Poshyvanyk, D., Ferenc, R.: Using the Conceptual Cohesion of Classes for Fault Prediction in Object-Oriented Systems. IEEE TSE 34(2) (2008)

    Google Scholar 

  44. 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)

    Google Scholar 

  45. Meyers, T.M., Binkley, D.: Slice-Based cohesion metrics and software intervention. IEEE WCRE (2004)

    Google Scholar 

  46. 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)

    Google Scholar 

  47. 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)

    Google Scholar 

  48. Pressman, R.S.: Software Engineering, A practitioner’s approach. McGraw Hill, New York (2005)

    MATH  Google Scholar 

  49. Sheppard, J.W., Kaufman, M.: Formal Specification of Testability Metrics in IEEE P1522. IEEE AUTOTESTCON, Pennsylvania (August 2001)

    Google Scholar 

  50. Sommervile, I.: Software Engineering (2004)

    Google Scholar 

  51. Stein, C., Cox, G., Etzkorn, L.: Exploring the relationship between cohesion and complexity. Journal of Computer Science 1(2) (2005)

    Google Scholar 

  52. 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)

    Google Scholar 

  53. Le Traon, Y., Robach, C.: Testability Measurements for Data Flow Design. In: Proceedings of the Fourth International Software Metrics Symposium, New Mexico (November 1997)

    Google Scholar 

  54. Le Traon, Y., Ouabdessalam, F., Robach, C.: Analyzing testability on data flow designs. In: Proceedings of ISSRE 2000, San Jose, CA, USA (October 2000)

    Google Scholar 

  55. Voas, J.M.: PIE: A dynamic failure-based technique. IEEE TSE 18(8) (August 1992)

    Google Scholar 

  56. Voas, J., Miller, K.W.: Semantic metrics for software testability. JSS 20 (1993)

    Google Scholar 

  57. Voas, J.M., Miller, K.W.: Software Testability: The New Verification. IEEE Software 12(3) (1995)

    Google Scholar 

  58. 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)

    Google Scholar 

  59. 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)

    Google Scholar 

  60. Yourdon, E., Constantine, L.: Structured Design. Prentice Hall, Englewood Cliffs (1979)

    MATH  Google Scholar 

  61. Zhao, L.: A New Approach for Software Testability Analysis. In: 28th ICSE (May 2006)

    Google Scholar 

  62. Zhou, Y., Xu, B., Zhao, J., Yang, H.: ICBMC: An improved cohesion measure for classes. In: ICSM (2002)

    Google Scholar 

  63. 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)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics