Skip to main content

A Search-Based Approach to Generate MC/DC Test Data for OCL Constraints

  • Conference paper
  • First Online:
Search-Based Software Engineering (SSBSE 2019)

Abstract

Automated generation of test data is an important and challenging activity in Model-based Testing. This typically requires solving of constraints, written in Object Constraint Language (OCL), specified on models in order to obtain solutions that can be used as test data. Test data generation techniques in the literature discuss various coverage criteria for test generation to achieve a sufficient level of coverage. One of the recommended criteria is modified condition/decision coverage (MC/DC) that is a requirement of different safety standards, such as DO-178C. In this paper, we propose a search-based strategy that utilizes case-based reasoning (CBR) to reuse the already generated test data and generate new test data that provides MC/DC coverage of OCL constraints. To evaluate the performance of the proposed approach in solving MC/DC constraints, we perform an empirical evaluation using AVM without CBR, AVM with CBR, and use Random Search (RS) as a baseline for comparison. We use 84 OCL constraints from four case studies belonging to different domains with varying size and complexity. The experimental results show that our proposed strategy of reusing already generated test data is better as compared to generating test data without using previous test data.

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

Access this chapter

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 EPUB and 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

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    https://github.com/hassansartaj/ssbse19.

References

  1. Aichernig, B.K., Salas, P.A.P.: Test case generation by OCL mutation and constraint solving. In: Fifth International Conference on Quality Software (QSIC 2005), pp. 64–71. IEEE (2005)

    Google Scholar 

  2. Ali, S., Iqbal, M.Z., Khalid, M., Arcuri, A.: Improving the performance of OCL constraint solving with novel heuristics for logical operations: a search-based approach. Empir. Softw. Eng. 21(6), 2459–2502 (2016)

    Article  Google Scholar 

  3. Ali, S., Iqbal, M.Z., Arcuri, A., Briand, L.C.: Generating test data from ocl constraints with search techniques. IEEE Trans. Softw. Eng. 39(10), 1376–1402 (2013)

    Article  Google Scholar 

  4. Ali, S., Yue, T., Zohaib Iqbal, M., Panesar-Walawege, R.K.: Insights on the use of OCL in diverse industrial applications. In: Amyot, D., Fonseca i Casas, P., Mussbacher, G. (eds.) SAM 2014. LNCS, vol. 8769, pp. 223–238. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-11743-0_16

    Chapter  Google Scholar 

  5. Ali, S., Yue, T., Qiu, X., Lu, H.: Generating boundary values from OCL constraints using constraints rewriting and search algorithms. In: 2016 IEEE Congress on Evolutionary Computation (CEC), pp. 379–386. IEEE (2016)

    Google Scholar 

  6. Arcuri, A., Briand, L.: A practical guide for using statistical tests to assess randomized algorithms in software engineering. In: 2011 33rd International Conference on Software Engineering (ICSE), pp. 1–10. IEEE (2011)

    Google Scholar 

  7. Awedikian, Zeina, K.A., Antoniol, G.: MC/DC automatic test input data generation. In: Proceedings of the 11th Annual Conference on Genetic and Evolutionary Computation, pp. 1657–1664. ACM (2009)

    Google Scholar 

  8. Benattou, M., Bruel, J.M., Hameurlain, N.: Generating test data from OCL specification. In: Proceedings of ECOOP Workshop Integration and Transformation of UML Models (2002)

    Google Scholar 

  9. Cabot, J.: OCL repository (2014). https://github.com/jcabot/ocl-repository

  10. Chilenski, J.J., Miller, S.P.: Applicability of modified condition/decision coverage to software testing. Softw. Eng. J. 9(5), 193–200 (1994)

    Article  Google Scholar 

  11. Ferrell, T., Ferrell, U.: RTCA DO-178C/EUROCAE ED-12C (2017)

    Google Scholar 

  12. Frias, L., Queralt Calafat, A., Olivé Ramon, A.: EU-rent car rentals specification (2003). http://hdl.handle.net/2117/97816

  13. Ghani, K., Clark, J.A.: Automatic test data generation for multiple condition and MCDC coverage. In: Fourth International Conference on Software Engineering Advances, ICSEA 2009, pp. 152–157. IEEE (2009)

    Google Scholar 

  14. Godboley, S., Prashanth, G., Mohapatro, D.P., Majhi, B.: Increase in modified condition/decision coverage using program code transformer. In: 2013 IEEE 3rd International Advance Computing Conference (IACC), pp. 1400–1407. IEEE (2013)

    Google Scholar 

  15. Gupta, N., Mathur, A.P., Soffa, M.L.: Automated test data generation using an iterative relaxation method. ACM SIGSOFT Softw. Eng. Notes 23(6), 231–244 (1998)

    Article  Google Scholar 

  16. Gupta, N., Mathur, A.P., Soffa, M.L.: Generating test data for branch coverage. In: Proceedings of the Fifteenth IEEE International Conference on Automated Software Engineering, ASE 2000, pp. 219–227. IEEE (2000)

    Google Scholar 

  17. Hemmati, H., Arefin, S.S., Loewen, H.W.: Evaluating specification-level MC/DC criterion in model-based testing of safety critical systems. In: 2018 IEEE/ACM 40th International Conference on Software Engineering: Software Engineering in Practice Track (ICSE-SEIP), pp. 256–265. IEEE (2018)

    Google Scholar 

  18. Lakhotia, K., Harman, M., McMinn, P.: A multi-objective approach to search-based test data generation. In: Proceedings of the 9th Annual Conference on Genetic and Evolutionary Computation, pp. 1098–1105. ACM (2007)

    Google Scholar 

  19. Leake, D.: Case-Based Reasoning: Experiences. Lessons and Future Directions. MIT Press, Cambridge (1996)

    Google Scholar 

  20. Li, D., Hu, L., Gao, R., Wong, W.E., Kuhn, D.R., Kacker, R.N.: Improving MC/DC and fault detection strength using combinatorial testing. In: 2017 IEEE International Conference on Software Quality, Reliability and Security Companion (QRS-C), pp. 297–303. IEEE (2017)

    Google Scholar 

  21. Offutt, J., Liu, S., Abdurazik, A., Ammann, P.: Generating test data from state-based specifications. Softw. Test. Verif. Reliab. 13(1), 25–53 (2003)

    Article  Google Scholar 

  22. OMG: Object constraint language specification v2.4. Object Management Group Inc. (2014). http://www.omg.org/spec/OCL/2.4/

  23. OMG: UML. unified modeling language specification, version 2.5.1. Object Management Group Inc. (2017). http://www.omg.org/spec/UML/2.5.1/

  24. Packevicius, S., Krivickaite, G., Barisas, D., Jasaitis, R., Blazauskas, T., Guogis, E.: Test data generation for complex data types using imprecise model constraints and constraint solving techniques. Inf. Technol. Control. 42(2), 131–149 (2013)

    Google Scholar 

  25. Panichella, A., Kifetew, F.M., Tonella, P.: Automated test case generation as a many-objective optimisation problem with dynamic selection of the targets. IEEE Trans. Softw. Eng. 44(2), 122–158 (2018)

    Article  Google Scholar 

  26. Rajan, A., Whalen, M.W., Heimdahl, M.P.: The effect of program and model structure on MC/DC test adequacy coverage. In: Proceedings of the 30th International Conference on Software Engineering, pp. 161–170. ACM (2008)

    Google Scholar 

  27. Rojas, J.M., Vivanti, M., Arcuri, A., Fraser, G.: A detailed investigation of the effectiveness of whole test suite generation. Empir. Softw. Eng. 22(2), 852–893 (2017)

    Article  Google Scholar 

  28. Spitzer, C., Ferrell, U., Ferrell, T.: Digital Avionics Handbook. CRC Press, Boca Raton (2014)

    Google Scholar 

  29. Utting, M., Legeard, B.: Practical Model-Based Testing: A Tools Approach. Elsevier, Amsterdam (2010)

    Google Scholar 

  30. Vargha, A., Delaney, H.D.: A critique and improvement of the CL common language effect size statistics of McGraw and wong. J. Educ. Behav. Stat. 25(2), 101–132 (2000)

    Google Scholar 

  31. Warmer, J.B., Kleppe, A.G.: The Object Constraint Language: Getting Your Models Ready for MDA. Addison-Wesley Professional, Boston (2003)

    Google Scholar 

  32. Weyuker, E., Goradia, T., Singh, A.: Automatically generating test data from a boolean specification. IEEE Trans. Softw. Eng. 20(5), 353–363 (1994)

    Article  Google Scholar 

  33. Woodward, M.R., Hennell, M.A.: On the relationship between two control-flow coverage criteria: all JJ-paths and MCDC. Inf. Softw. Technol. 48(7), 433–440 (2006)

    Article  Google Scholar 

  34. Yu, Y.T., Lau, M.F.: A comparison of MC/DC, mumcut and several other coverage criteria for logical decisions. J. Syst. Softw. 79(5), 577–590 (2006)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Hassan Sartaj .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Sartaj, H., Iqbal, M.Z., Jilani, A.A.A., Khan, M.U. (2019). A Search-Based Approach to Generate MC/DC Test Data for OCL Constraints. In: Nejati, S., Gay, G. (eds) Search-Based Software Engineering. SSBSE 2019. Lecture Notes in Computer Science(), vol 11664. Springer, Cham. https://doi.org/10.1007/978-3-030-27455-9_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-27455-9_8

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-27454-2

  • Online ISBN: 978-3-030-27455-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics