[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
research-article

A language-parametric test coverage framework for executable domain-specific languages

Published: 02 July 2024 Publication History

Abstract

Test coverage is an effective technique to measure test case quality and to enable fault localization. However, for Executable Domain-Specific Languages (xDSLs), coverage metrics and associated tools are currently manually defined for each xDSL resulting in costly, error-prone, and non-reusable work. To address this problem, we propose a novel language-parametric test coverage framework for xDSLs. We define two coverage metrics adapted to xDSLs: model element and branch coverage. For performing coverage measurements, we propose a generic technique which can be used out-of-the-box by domain experts using any xDSL to define, execute, and test models. In addition, the coverage of model elements and branches can be parameterized for a given xDSL through the definition of coverage rules using a dedicated language. We showcase two test coverage applications for xDSLs: measuring the quality of test suites for executable models and localizing the models’ faults using Spectrum-Based Fault Localization techniques. We evaluate our approach using four different xDSLs. Results show that (i) we can generate meaningful coverage measurements for all investigated models, (ii) the provided coverage rule language enables framework parameterization for all xDSLs, and (iii) the computed coverage measurements are useful in identifying defects of the models.

Highlights

Two generic coverage metrics for xDSLs: model element and branch coverage.
A dedicated language allowing to parameterize the coverage metrics for a given xDSL.
Generic techniques for computing model coverage based on the parameterized metrics.
Using coverage measurements for automatic model fault localization.

References

[1]
Abreu, R., Zoeteweij, P., van Gemund, A.J., 2009a. Spectrum-Based Multiple Fault Localization. In: 2009 IEEE/ACM International Conference on Automated Software Engineering. pp. 88–99. https://doi.org/10.1109/ASE.2009.25.
[2]
Abreu R., Zoeteweij P., Golsteijn R., van Gemund A.J., A practical evaluation of spectrum-based fault localization, J. Syst. Softw. 82 (11) (2009) 1780–1792,. URL https://www.sciencedirect.com/science/article/pii/S0164121209001319. SI: TAIC PART 2007 and MUTATION 2007.
[3]
Ammann P., Offutt J., Introduction To Software Testing, Cambridge University Press, 2016.
[4]
Arcega L., Arcega J.F., Haugen Ø., Cetina C., Bug localization in model-based systems in the wild, ACM Trans. Softw. Eng. Methodol. (TOSEM) 31 (1) (2021) 1–32.
[5]
Arcega, L., Font, J., Cetina, C., 2018. Evolutionary algorithm for bug localization in the reconfigurations of models at runtime. In: Proceedings of the 21th ACM/IEEE International Conference on Model Driven Engineering Languages and Systems. pp. 90–100.
[6]
Arcega L., Font J., Haugen Ø., Cetina C., An approach for bug localization in models using two levels: model and metamodel, Softw. Syst. Model. 18 (6) (2019) 3551–3576.
[7]
Assiri F.Y., Bieman J.M., Fault localization for automated program repair: effectiveness, performance, repair correctness, Softw. Qual. J. 25 (1) (2017) 171–199,.
[8]
Baxter I., Branch coverage for arbitrary languages made easy: Transformation systems to the rescue, 2001, IW APA TV2/IC SE2001. http://techwell.com/sites/default/files/articles/XUS1173972file1_0.pdf.
[9]
Bendraou R., Combemale B., Crégut X., Gervais M.-P., Definition of an eXecutable SPEM 2.0, in: Proceedings of the 14th Asia-Pacific Software Engineering Conference (APSEC), IEEE Computer Society, 2007, pp. 390–397.
[10]
Biermann E., Ermel C., Taentzer G., Precise semantics of EMF model transformations by graph transformation, in: Proceedings of the 11th International Conference on Model Driven Engineering Languages and Systems, MoDELS ’08, Springer, 2008, pp. 53–67.
[11]
Boghdady P.N., Badr N.L., Hashim M.A., Tolba M.F., An enhanced test case generation technique based on activity diagrams, in: Proceedings of the International Conference on Computer Engineering & Systems, IEEE, 2011, pp. 289–294.
[12]
Bordin M., Comar C., Gingold T., Guitton J., Hainque O., Quinot T., Delange J., Hugues J., Pautet L., Couverture: an innovative open framework for coverage analysis of safety critical applications, Ada User J. 30 (4) (2009) 248–255.
[13]
Bousse, E., Degueule, T., Vojtisek, D., Mayerhofer, T., Deantoni, J., Combemale, B., 2016. Execution framework of the GEMOC Studio (tool demo). In: Proceedings of the 2016 ACM SIGPLAN International Conference on Software Language Engineering. pp. 84–89.
[14]
Bousse E., Leroy D., Combemale B., Wimmer M., Baudry B., Omniscient Debugging for Executable DSLs, J. Syst. Softw. 137 (2018) 261–288,. URL https://hal.inria.fr/hal-01662336.
[15]
Bousse E., Mayerhofer T., Combemale B., Baudry B., A generative approach to define rich domain-specific trace metamodels, in: Taentzer G., Bordeleau F. (Eds.), Modelling Foundations and Applications, Springer, 2015, pp. 45–61.
[16]
Bousse E., Mayerhofer T., Combemale B., Baudry B., Advanced and efficient execution trace management for executable domain-specific modeling languages, Softw. Syst. Model. (2019) 1–37,. URL https://hal.inria.fr/hal-01614377.
[17]
Cangussu J., Palsberg J., Samanta V., Modern compiler implementation in java: the MiniJava project, 2023, [Online; accessed 28-February-2023], https://www.cambridge.org/resources/052182060X.
[18]
Cañizares P.C., Gómez-Abajo P., Núñez A., Guerra E., de Lara J., New ideas: automated engineering of metamorphic testing environments for domain-specific languages, in: SLE’21: 14th ACM SIGPLAN International Conference on Software Language Engineering, ACM, 2021, pp. 49–54.
[19]
Casamayor R., Arcega L., Pérez F., Cetina C., Bug localization in game software engineering: evolving simulations to locate bugs in software models of video games, in: Syriani E., Sahraoui H.A., Bencomo N., Wimmer M. (Eds.), Proceedings of the 25th International Conference on Model Driven Engineering Languages and Systems, MODELS 2022, Montreal, Quebec, Canada, October 23-28, 2022, ACM, 2022, pp. 356–366.
[20]
Cazzola W., Favalli L., The language mutation problem: Leveraging language product lines for mutation testing of interpreters, J. Syst. Softw. 195 (2023),.
[21]
Chen J., Bai Y., Hao D., Xiong Y., Zhang H., Xie B., Learning to prioritize test programs for compiler testing, in: Uchitel S., Orso A., Robillard M.P. (Eds.), Proceedings of the 39th International Conference on Software Engineering, ICSE 2017, Buenos Aires, Argentina, May 20-28, 2017, IEEE / ACM, 2017, pp. 700–711,.
[22]
Chen J., Patra J., Pradel M., Xiong Y., Zhang H., Hao D., Zhang L., A survey of compiler testing, ACM Comput. Surv. 53 (1) (2021) 4:1–4:36,.
[23]
Cobertura J., A code coverage utility for java, 2023, URL http://cobertura.github.io/cobertura/. [Online; accessed 28-February-2023].
[24]
CodeCover J., Add a new programming language, 2023, URL http://codecover.org/development/programming-language.html. [Online; accessed 28-February-2023].
[25]
CodeCover J., CodeCover glass-box testing tool, 2023, URL http://codecover.org. [Online; accessed 28-February-2023].
[26]
CodeCover J., CodeCover measurement under java: Branch coverage, 2023, URL http://codecover.org/documentation/references/javaMeasurement.html#BranchCovereage. [Online; accessed 28-February-2023].
[27]
CodeCover J., CodeCover measurement under java: Statement coverage, 2023, URL http://codecover.org/documentation/references/javaMeasurement.html#StatementCovereage. [Online; accessed 28-February-2023].
[28]
Danglot B., Vera-Perez O., Yu Z., Zaidman A., Monperrus M., Baudry B., A snowballing literature study on test amplification, J. Syst. Softw. 157 (2019).
[29]
EclEmma Team B., JaCoCo Java Code Coverage Library, 2023, URL https://github.com/jacoco/jacoco. [Online; accessed 28-February-2023].
[30]
Eclipse Foundation B., EMF Compare, 2023, [Online; accessed 28-February-2023]. https://eclipse.dev/emf/compare.
[31]
El qortobi, M., Rahj, A., Bentahar, J., Dssouli, R., 2020. Test Generation Tool for Modified Condition/Decision Coverage: Model Based Testing. In: Proceedings of the 13th International Conference on Intelligent Systems: Theories and Applications. pp. 1–6.
[32]
Erdweg S., van der Storm T., Völter M., Tratt L., Bosman R., Cook W.R., Gerritsen A., Hulshout A., Kelly S., Loh A., Konat G., Molina P.J., Palatnik M., Pohjonen R., Schindler E., Schindler K., Solmi R., Vergu V., Visser E., van der Vlist K., Wachsmuth G., van der Woning J., Evaluating and comparing language workbenches: Existing results and benchmarks for the future, Comput. Lang. Syst. Struct. 44 (2015) 24–47,. URL http://www.sciencedirect.com/science/article/pii/S1477842415000573.
[33]
Gómez-Abajo P., Guerra E., de Lara J., Merayo M.G., Wodel-test: a model-based framework for language-independent mutation testing, Softw. Syst. Model. 20 (2020) 1–27.
[34]
Iqbal J., Ashraf A., Truscan D., Porres I., Exhaustive simulation and test generation using fUML activity diagrams, in: Giorgini P., Weber B. (Eds.), Advanced Information Systems Engineering, Springer, 2019, pp. 96–110.
[35]
Iung A., Carbonell J., Marchezan L., Rodrigues E., Bernardino M., Basso F.P., Medeiros B., Systematic mapping study on domain-specific language development tools, Empir. Softw. Eng. 25 (5) (2020) 4205–4249,.
[36]
Janssen T., Abreu R., van Gemund A.J., Zoltar: A spectrum-based fault localization tool, in: Proceedings of the 2009 ESEC/FSE Workshop on Software Integration and Evolution @ Runtime, SINTER ’09, Association for Computing Machinery, New York, NY, USA, 2009, pp. 23–30,.
[37]
JavaCC T., Java compiler compiler, 2023, URL https://javacc.github.io/javacc/. [Online; accessed 28-February-2023].
[38]
Jones J.A., Harrold M.J., Empirical evaluation of the tarantula automatic fault-localization technique, in: Proceedings of the 20th IEEE/ACM International Conference on Automated Software Engineering, ASE ’05, ACM, 2005, pp. 273–282,.
[39]
K-Framework J.A., K semantic framework, 2023, URL https://kframework.org/. [Online; accessed 18-October-2023].
[40]
Khorram F., Bousse E., Garmendia A., Mottu J.-M., Sunyé G., Wimmer M., From coverage computation to fault localization: A generic framework for domain-specific languages, in: Proceedings of the 15th ACM SIGPLAN International Conference on Software Language Engineering, in: SLE 2022, Association for Computing Machinery, New York, NY, USA, 2022, pp. 235–248,.
[41]
Khorram F., Bousse E., Mottu J.-M., Sunyé G., Adapting TDL to provide testing support for executable DSLs, J. Object Technol. 20 (3) (2021) 6:1–15.
[42]
Khorram F., Bousse E., Mottu J.-M., Sunyé G., Advanced testing and debugging support for reactive executable DSLs, Softw. Syst. Model. (2022).
[43]
Khorram F., Garmendia A., A language-parametric test coverage framework for DSLs: Artefacts, 2023,.
[44]
Kos T., Mernik M., Kosar T., Test automation of a measurement system using a domain-specific modelling language, J. Syst. Softw. 111 (2016) 74–88.
[45]
Li P., Jiang M., Ding Z., Fault localization with weighted test model in model transformations, IEEE Access 8 (2020) 14054–14064.
[46]
Lübke D., van Lessen T., BPMN-based model-driven testing of service-based processes, in: Enterprise, Business-Process and Information Systems Modeling, Springer, 2017, pp. 119–133.
[47]
Mandrikov E., What kind of branching coverage is measured by jacoco, 2023, URL https://groups.google.com/g/jacoco/c/b8bAWaWPl6I/m/eMKixUpMCAAJ. [Online; accessed 28-February-2023].
[48]
Mao X., Lei Y., Dai Z., Qi Y., Wang C., Slice-based statistical fault localization, J. Syst. Softw. 89 (2014) 51–62,. URL https://www.sciencedirect.com/science/article/pii/S0164121213002185.
[49]
Maxwell A., Pilliner A., Deriving coefficients of reliability and agreement for ratings, Br. J. Math. Stat. Psychol. 21 (1) (1968) 105–116,.
[50]
Mayerhofer T., Combemale B., The tool generation challenge for executable domain-specific modeling languages, in: Seidl M., Zschaler S. (Eds.), Software Technologies: Applications and Foundations, Springer, 2018, pp. 193–199.
[51]
Meyers B., Denil J., Dávid I., Vangheluwe H., Automated testing support for reactive domain-specific modelling languages, in: Proceedings of the 2016 ACM SIGPLAN International Conference on Software Language Engineering, ACM, 2016, pp. 181–194.
[52]
Mijatov S., Mayerhofer T., Langer P., Kappel G., Testing functional requirements in UML activity diagrams, in: Blanchette J.C., Kosmatov N. (Eds.), Tests and Proofs, Springer, 2015, pp. 173–190.
[53]
Misurda J., Clause J.A., Reed J.L., Childers B.R., Soffa M.L., Demand-driven structural testing with dynamic instrumentation, in: Proceedings of the 27th International Conference on Software Engineering, ICSE, IEEE, 2005, pp. 156–165.
[54]
Mohd-Shafie M.L., Kadir W.M.N.W., Lichter H., Khatibsyarbini M., Isa M.A., Model-based test case generation and prioritization: a systematic literature review, Softw. Syst. Model. (2021) 1–37,.
[55]
Naish L., Lee H.J., Ramamohanarao K., A model for spectra-based software diagnosis, ACM Trans. Softw. Eng. Methodol. 20 (3) (2011),.
[56]
OASIS L., Web services business process execution language version 2.0, 2007, URL http://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html.
[57]
Object Management Group L., Precise semantics of UML state machines, 2019, URL https://www.omg.org/spec/PSSM/1.0/.
[58]
Object Management Group L., Semantics of a foundational subset for executable UML models, 2022.
[59]
OpenClover L., OpenClover Code Coverage Tool for Java and Groovy, 2023, URL https://openclover.org/. [Online; accessed 28-February-2023].
[60]
OpenClover L., Using Clover for other programming languages, 2023, URL https://openclover.org/doc/manual/latest/hacking--using-openclover-for-other-programming-languages.html. [Online; accessed 28-February-2023].
[61]
Qi Y., Mao X., Lei Y., Wang C., Using automated program repair for evaluating the effectiveness of fault localization techniques, in: Proceedings of the 2013 International Symposium on Software Testing and Analysis, in: ISSTA 2013, Association for Computing Machinery, New York, NY, USA, 2013, pp. 191–201,.
[62]
Raselimo, M., Fischer, B., 2019. Spectrum-based fault localization for context-free grammars. In: Proceedings of the 12th ACM SIGPLAN International Conference on Software Language Engineering. pp. 15–28.
[63]
Sakamoto K., Shimojo K., Takasawa R., Washizaki H., Fukazawa Y., OCCF: A framework for developing test coverage measurement tools supporting multiple programming languages, in: 2013 IEEE Sixth International Conference on Software Testing, Verification and Validation, IEEE, 2013, pp. 422–430.
[64]
de Souza H.A., Chaim M.L., Kon F., Spectrum-based software fault localization: A survey of techniques, advances, and challenges, 2016, arXiv preprint arXiv:1607.04347.
[65]
Steinberg D., Budinsky F., Merks E., Paternostro M., EMF: eclipse modeling framework, Addison-Wesley, 2008.
[66]
Troya J., Segura S., Parejo J.A., Ruiz-Cortés A., Spectrum-based fault localization in model transformations, ACM Trans. Softw. Eng. Methodol. (TOSEM) 27 (3) (2018) 1–50.
[67]
Waheed T., Iqbal M.Z.Z., Malik Z.I., Data flow analysis of UML action semantics for executable models, in: European Conference on Model Driven Architecture-Foundations and Applications, Springer, 2008, pp. 79–93.
[68]
Wang K., Sullivan A., Marinov D., Khurshid S., Fault localization for declarative models in alloy, in: Proceedings of the 31st International Symposium on Software Reliability Engineering, ISSRE, IEEE, 2020, pp. 391–402.
[69]
Wohlin C., Runeson P., Höst M., Ohlsson M.C., Regnell B., Wesslén A., Experimentation in Software Engineering, Springer Science & Business Media, 2012.
[70]
Wong W.E., Debroy V., Gao R., Li Y., The dstar method for effective software fault localization, IEEE Trans. Reliab. 63 (1) (2014) 290–308,.
[71]
Wong, W.E., Debroy, V., Li, Y., Gao, R., 2012. Software Fault Localization Using DStar (D*). In: 2012 IEEE Sixth International Conference on Software Security and Reliability. pp. 21–30. https://doi.org/10.1109/SERE.2012.12.
[72]
Wong W.E., Gao R., Li Y., Abreu R., Wotawa F., A survey on software fault localization, IEEE Trans. Softw. Eng. 42 (8) (2016) 707–740.
[73]
Wu H., Gray J., Mernik M., Unit testing for domain-specific languages, in: Taha W.M. (Ed.), Domain-Specific Languages, Springer, 2009, pp. 125–147.
[74]
Xie X., Chen T.Y., Kuo F.-C., Xu B., A theoretical analysis of the risk evaluation formulas for spectrum-based fault localization, ACM Trans. Softw. Eng. Methodol. 22 (4) (2013),.
[75]
Yue S., Gray J., SPOT: A DSL for extending fortran programs with metaprogramming, Adv. Softw. Eng. 2014 (2014) 917327:1–917327:23.
[76]
Zou D., Liang J., Xiong Y., Ernst M.D., Zhang L., An empirical study of fault localization families and their combinations, IEEE Trans. Softw. Eng. 47 (2) (2021) 332–347,.

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image Journal of Systems and Software
Journal of Systems and Software  Volume 211, Issue C
May 2024
518 pages

Publisher

Elsevier Science Inc.

United States

Publication History

Published: 02 July 2024

Author Tags

  1. Model testing
  2. Model coverage
  3. Branch coverage
  4. Fault localization
  5. Executable domain-specific languages
  6. Executable models

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 0
    Total Downloads
  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 03 Jan 2025

Other Metrics

Citations

View Options

View options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media