Test Case Minimization for Object Oriented Testing Using Random Forest Algorithm

  • Ajmer SinghEmail author
  • Diksha Katyal
  • Deepa Gupta
Conference paper
Part of the Lecture Notes on Data Engineering and Communications Technologies book series (LNDECT, volume 49)


Software maintenance is one of the most costly and crucial phases in the life cycle of software. It consumes almost 70% of the resources and cost of the software. Software testing aims to execute or examine the software with the intention of detecting the faults in it. Reducing the cost of the testing process is one of the major concerns of the testers. With the growing complexities in Object Oriented (OO) software, the number of faults present in the software module is increased. In this paper, a technique has been presented for minimizing the test cases for the OO systems. A case study of Xerces 1.4 open source software is carried for the evaluation of proposed technique. The mathematical model used in the proposed methodology was generated using the open source software WEKA. The approach is based on selecting significant Object Oriented metrics. Highly Efficient, Less efficient or inefficient Object Oriented metrics were identified by the techniques based on feature selection. Test case generation and minimization is achieved on the basis of coverage of highly fault prone classes. To minimize the test cases, proposed methodology used only significant OO metrics for assigning weights to the test paths. The proposed work promisingly reduced the cost and time taken during test suite minimization.


Software maintenance Machine learning Test case minimization Object oriented testing Random Forest 


  1. 1.
    Mandal, P., Ami, A.S.: Selecting best attributes for software defect prediction. In: 2015 IEEE International WIE Conference on Electrical and Computer Engineering, WIECON-ECE 2015 (2016)Google Scholar
  2. 2.
    Singh, A., Bhatia, R., Sighrova, A.: Taxonomy of machine learning algorithms in software fault prediction using object oriented metrics. Procedia Comput. Sci. 132, 993–1001 (2018)CrossRefGoogle Scholar
  3. 3.
    Gyimothy, T., Ferenc, R., Siket, I.: Empirical validation of object-oriented metrics on open source software for fault prediction. IEEE Trans. Softw. Eng. 31(10), 897–910 (2005)CrossRefGoogle Scholar
  4. 4.
    Prateek, S., Pasala, A., Aracena, L.M.: Evaluating performance of network metrics for bug prediction in software. In: Proceedings - Asia-Pacific Software Engineering Conference, APSEC (2013)Google Scholar
  5. 5.
    Puranik, S., Deshpande, P., Chandrasekaran, K.: A novel machine learning approach for bug prediction. Procedia Comput. Sci. 93, 924–930 (2016)CrossRefGoogle Scholar
  6. 6.
    Akour, M., Abuwardih, L.: Test case minimization using genetic algorithm: pilot study. In: 2018 8th Conference on Computer Science and Information Technology, pp. 66–70 (2018)Google Scholar
  7. 7.
    Singh, A., Bhatia, R.K., Singhrova, A.: Object oriented coupling based test case prioritization. Int. J. Comput. Sci. Eng. 6(9), 747–754 (2018)Google Scholar
  8. 8.
    Singh, A., Bhatia, R.K., Singhrova, A.: Machine Learning based Test Case Prioritization in Object Oriented TestingGoogle Scholar
  9. 9.
    Gupta, D.L.A.L., Saxena, K.: Software bug prediction using object-oriented metrics. Sadhana 42(5), 655–669 (2017)CrossRefGoogle Scholar
  10. 10.
    Mohapatra, S.K.: Minimizing test cases to reduce the cost of regression testing. In: 2014 International Conference on Computing for Sustainable Global Development, pp. 505–509 (2014)Google Scholar
  11. 11.
    Boucher, A., Badri, M.: An unsupervised fault-proneness prediction model using multiple risk levels for object-oriented software systems: an empirical study. Mémoire présenté à l’unıversıté du québec à troıs-rıvıères (2018)Google Scholar
  12. 12.
    Ali, S., Li, Y., Yue, T., Zhang, M.: An empirical evaluation of mutation and crossover operators for multi-objective uncertainty-wise test minimization. In: Proceedings - 2017 IEEE/ACM 10th International Workshop on Search-Based Software Testing, SBST 2017, pp. 21–27 (2017)Google Scholar
  13. 13.
    Choudhary, K., Purohit, G.N.: A multi-objective optimization algorithm for uniformly distributed generation of test cases. In: 2014 International Conference on Computing for Sustainable Global Development, INDIACom 2014, pp. 455–457 (2014)Google Scholar
  14. 14.
    Fraser, G., Wotawa, F.: Redundancy based test-suite reduction. In: Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), vol. 4422, pp. 291–305 (2007)Google Scholar
  15. 15.
    Regehr, J., Chen, Y., Cuoq, P., Eide, E., Ellison, C., Yang, X.: Test-case reduction for C compiler bugs. ACM SIGPLAN Not. 47(6), 335–345 (2012)CrossRefGoogle Scholar
  16. 16.
    Banias, O.: Dynamic programming optimization algorithm applied in test case selection. In: 2018 13th International Symposium on Electronics and Telecommunications, ISETC 2018 - Conference Proceedings, pp. 1–4 (2018)Google Scholar
  17. 17.
    Muthyala, K.: A novel approach to test suite reduction using data mining. Indian J. Comput. Sci. Eng. 2(3), 500–505 (2011)Google Scholar
  18. 18.
    Khan, R., Amjad, M., Srivastava, A.K.: Optimization of automatic generated test cases for path testing using genetic algorithm. In: Proceedings - 2016 2nd International Conference on Computational Intelligence and Communication Technology, CICT 2016, no. February, pp. 32–36 (2016)Google Scholar
  19. 19.
    Kaur, A., Malhotra, R.: Application of random forest in predicting fault-prone classes. In: Proceedings - 2008 International Conference on Advanced Computer Theory and Engineering, ICACTE 2008, pp. 37–43 (2008)Google Scholar
  20. 20.
    Malhotra, R., Bansal, A.J.: Fault prediction considering threshold effects of object-oriented metrics. Expert Syst. 32(2), 203–219 (2015)CrossRefGoogle Scholar
  21. 21.
    Singh, R., Bhatia, R.K., Singhrova, A.: Demand based test case generation for object oriented systems. IET Softw. (2019)Google Scholar
  22. 22.
    Gupta, V., Ganeshan, N., Singhal, T.K.: Developing software bug prediction models using various software metrics as the bug indicators. Int. J. Adv. Comput. Sci. Appl. 6(2), 60–65 (2015)Google Scholar
  23. 23.
    Sprenkle, S., Sampath, S., Gibson, E., Pollock, L., Souter, A.: An empirical comparison of test suite reduction techniques for user-session-based testing of web application. In: IEEE International Conference on Software Maintenance, ICSM, vol. 2005, pp. 587–600 (2005)Google Scholar
  24. 24.
    Vidács, L., Beszédes, Á., Tengeri, D., Siket, I., Gyimóthy, T.: Test suite reduction for fault detection and localization: a combined approach. In: 2014 Software Evolution Week - IEEE Conference on Software Maintenance, Reengineering, and Reverse Engineering, CSMR-WCRE 2014 - Proceedings, pp. 204–213 (2014)Google Scholar
  25. 25.
    Singh, R., Singhrova, A., Bhatia, R.: Optimized test case generation for object oriented systems using weka open source software. Int. J. Open Source Softw. Process. 9(3), 15–35 (2018)CrossRefGoogle Scholar
  26. 26.
    Promise Datasets Page. Accessed 14 Mar 2019
  27. 27.
  28. 28.
    Hall, M., et al.: The WEKA data mining software: an update. ACM SIGKDD Explor. Newsl. (2009)Google Scholar

Copyright information

© Springer Nature Switzerland AG 2020

Authors and Affiliations

  1. 1.CSE DepartmentDCRUSTMurthalIndia
  2. 2.Amity Institute of Information TechnologyNoidaIndia

Personalised recommendations