Model Testing of Complex Embedded Systems Using EAST-ADL and Energy-Aware Mutations
Abstract
:1. Introduction
- The identification of energy-aware mutation operators for mutation testing of EAST-ADL models.
- An approach for mutation test generation of EAST-ADL models using a statistical model checker.
- An evaluation of the method on a Brake-by-Wire industrial system.
2. Background
2.1. Architecture and System-Level Testing
2.2. Mutation Testing
2.3. EAST-ADL Architectural Language
2.4. UPPAAL SMC and Priced Timed Automata
3. A Model Testing Method for Energy-Aware Testing Using EAST-ADL
- Mutant Generation. This first step (described in detail in Section 3.1) is used for generating small syntactic changes (mutants) to the architectural description based on a set of mutation operators (e.g., mimicking architectural energy errors). The output of this step is a set of new versions of the original EAST-ADL model, each one containing an inserted change. When implementing this step, a set of operators needs to be available based on the desired types of mutants. Different set of operators were proposed in the scientific literature for both models and code [18,23] for mutation testing using the UPPAAL model checker. We show how mutant generation is implemented for the EAST-ADL language as an input for MATS and UPPAAL SMC.
- EAST-ADL to PTA Transformation. The second step (described in detail in Section 3.2) is used for transforming the EAST-ADL model to PTA. The output of this step are PTA models containing the original structure and behavior of the EAST-ADL together with all inserted mutants and annotated with energy consumption information to be used by UPPAAL SMC for test-case generation and selection.
- Test Suite Generation. The third step (described in Section 3.3) uses the MATS tool to generate a set of test cases by using the UPPAAL SMC ability to generate simulations. We show how a test simulation is obtained using a property expressed as a UPPAAL SMC simulation property.
- Mutant Detection. The fourth step (described in Section 3.4) involves the instrumentation of the model with detection instructions for each mutant. This means that the monitor for mutation detection is used to record the execution and detection of each mutant.
3.1. Energy-Aware Mutant Generation
- EAST-ADL resource annotation (i.e., Energy Replacement Operator (ero)). In this case, we insert a fault in the generic constraint of a function prototype by changing the original annotation. These types of mutations intend to model the errors in the energy consumed by each component.
- Timing Behavior of an EAST-ADL component (i.e., Period Replacement Operator (pro), Execution Time Replacement Operator (etro)) can be modified by changing the period and execution time constraints. The period and execution time value stand as integer values in the constraint.
- Functional Architecture Structure (i.e., Component Removal Operator (cro), Component Insertion Operator (cio), and Triggering Pattern Replacement Operator (tro)). We change the architectural elements in EAST-ADL by removing or inserting components that influence the energy consumption as well as modifying the triggering of each component.
3.2. EAST-ADL to Priced-Timed Automata Transformation
3.3. Test Suite Generation
3.4. Energy-Aware Mutant Detection
4. An Experimental Evaluation on the Brake-By-Wire System
4.1. Case Description
4.2. Experimental Evaluation
4.2.1. Test Suite Generation Results
4.2.2. Fault Seeding and Mutation Detection Results
5. Validity Evaluation
5.1. Construct Validity
5.2. Internal Validity
5.3. External Validity
6. Related Work
7. Conclusions
Author Contributions
Funding
Acknowledgments
Conflicts of Interest
References
- Pretschner, A.; Broy, M.; Kruger, I.H.; Stauner, T. Software engineering for automotive systems: A roadmap. In Proceedings of the IEEE Computer Society on 2007 Future of Software Engineering, Minneapolis, MN, USA, 23–25 May 2007; pp. 55–71. [Google Scholar]
- Hammond, J.; Rawlings, R.; Hall, A. Will it work? [requirements engineering]. In Proceedings of the IEEE International Symposium on Requirements Engineering, Toronto, ON, Canada, 27–31 August 2001; pp. 102–109. [Google Scholar]
- Barroso, L.A.; Hölzle, U. The case for energy-proportional computing. Computer 2007, 40. [Google Scholar] [CrossRef]
- Briand, L.; Nejati, S.; Sabetzadeh, M.; Bianculli, D. Testing the untestable: Model testing of complex software-intensive systems. In Proceedings of the 38th International Conference on Software Engineering Companion, Austin, TX, USA, 14–22 May 2016; pp. 789–792. [Google Scholar]
- González, C.A.; Varmazyar, M.; Nejati, S.; Briand, L.C.; Isasi, Y. Enabling model testing of cyber-physical systems. In Proceedings of the 21th ACM/IEEE International Conference on Model Driven Engineering Languages and Systems, Copenhagen, Denmark, 14–19 October 2018; pp. 176–186. [Google Scholar]
- Blom, H.; Lönn, H.; Hagl, F.; Papadopoulos, Y.; Reiser, M.O.; Sjöstedt, C.J.; Chen, D.J.; Tagliabò, F.; Torchiaro, S.; Tucci, S. EAST-ADL: An Architecture Description Language for Automotive Software-Intensive Systems. EAST-ADL White Paper 2013, 1. [Google Scholar]
- Marinescu, R.; Enoiu, E.; Seceleanu, C.; Sundmark, D. Automatic Test Generation for Energy Consumption of Embedded Systems Modeled in EAST-ADL. In Proceedings of the 2017 IEEE International Conference on Software Testing, Verification and Validation Workshops (ICSTW), Toyko, Japan, 13–17 March 2017; pp. 69–76. [Google Scholar]
- DeMillo, R.A.; Lipton, R.J.; Sayward, F.G. Hints on test data selection: Help for the practicing programmer. Computer 1978, 11, 34–41. [Google Scholar] [CrossRef]
- Behrmann, G.; Fehnker, A.; Hune, T.; Larsen, K.; Pettersson, P.; Romijn, J.; Vaandrager, F. Minimum-Cost Reachability for Priced Time Automata. In Hybrid Systems: Computation and Control; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2001. [Google Scholar]
- Bulychev, P.; David, A.; Larsen, K.G.; Mikučionis, M.; Poulsen, D.B.; Legay, A.; Wang, Z. UPPAAL-SMC: Statistical Model Checking for Priced Timed Automata. In Proceedings of the Workshop on Quantitative Aspects of Programming Languages and Systems, Tallinn, Estonia, 31 March–1 April 2012. [Google Scholar]
- Shaw, M.; Garlan, D. Software Architecture: Perspectives on An Emerging Discipline; Prentice Hall Englewood Cliffs: Englewood Cliffs, NJ, USA, 1996; Volume 1. [Google Scholar]
- Ammann, P.; Offutt, J. Introduction to Software Testing; Cambridge University Press: Cambridge, UK, 2008. [Google Scholar]
- Malavolta, I.; Lago, P.; Muccini, H.; Pelliccione, P.; Tang, A. What industry needs from architectural languages: A survey. IEEE Trans. Softw. Eng. 2013, 39, 869–891. [Google Scholar] [CrossRef]
- Just, R.; Jalali, D.; Inozemtseva, L.; Ernst, M.D.; Holmes, R.; Fraser, G. Are Mutants a Valid Substitute for Real Faults in Software Testing? In International Symposium on Foundations of Software Engineering; ACM: New York, NY, USA, 2014. [Google Scholar]
- Black, P.E.; Okun, V.; Yesha, Y. Mutation operators for specifications. In Proceedings of the ASE 2000. Fifteenth IEEE International Conference on Automated Software Engineering, Grenoble, France, 11–15 September 2000; pp. 81–88. [Google Scholar]
- Aichernig, B.K.; Salas, P.A.P. Test case generation by OCL mutation and constraint solving. In Proceedings of the Fifth International Conference on Quality Software (QSIC’05), Melbourne, Australia, 19–20 September 2005; pp. 64–71. [Google Scholar]
- Aichernig, B.K.; Jöbstl, E.; Tiran, S. Model-based mutation testing via symbolic refinement checking. Sci. Comput. Program. 2015, 97, 383–404. [Google Scholar] [CrossRef]
- Lindström, B.; Offutt, J.; Sundmark, D.; Andler, S.F.; Pettersson, P. Using mutation to design tests for aspect-oriented models. Inf. Softw. Technol. 2017, 81, 112–130. [Google Scholar] [CrossRef] [Green Version]
- Kang, E.Y.; Enoiu, E.P.; Marinescu, R.; Seceleanu, C.; Schobbens, P.Y.; Pettersson, P. A Methodology for Formal Analysis and Verification of EAST-ADL Models. Reliab. Eng. Syst. Saf. 2013, 120. [Google Scholar] [CrossRef] [Green Version]
- Marinescu, R.; Kaijser, H.; Mikučionis, M.; Seceleanu, C.; Lönn, H.; David, A. Analyzing industrial architectural models by simulation and model-checking. In International Workshop on Formal Techniques for Safety-Critical Systems; Springer: London, UK, 2014; pp. 189–205. [Google Scholar]
- Bulychev, P.; David, A.; Larsen, K.G.; Legay, A.; Li, G.; Poulsen, D.B. Rewrite-Based Statistical Model Checking of WMTL; Runtime Verification; Springer: London, UK, 2013. [Google Scholar]
- Marinescu, R.; Enoiu, E.; Seceleanu, C. Statistical Analysis of Resource Usage of Embedded Systems Modeled in EAST-ADL; VLSI Symposium; IEEE: Piscataway, NJ, USA, 2015; pp. 380–385. [Google Scholar]
- Aichernig, B.K.; Lorber, F.; Ničković, D. Time for mutants—model-based mutation testing with timed automata. In International Conference on Tests and Proofs; Springer: London, UK, 2013; pp. 20–38. [Google Scholar]
- Seceleanu, C.; Vulgarakis, A.; Pettersson, P. REMES: A Resource Model for Embedded Systems. In Proceedings of the International Conference on Engineering of Complex Computer Systems, Potsdam, Germany, 2–4 June 2009. [Google Scholar]
- Larsson, J. Automatic Test Generation and Mutation Analysis using UPPAAL SMC; Bachelor of Science Thesis Report; MDH Diva: Ascona, Switzerland, 2017. [Google Scholar]
- Runeson, P.; Höst, M. Guidelines for conducting and reporting case study research in software engineering. Empir. Softw. Eng. 2009, 14, 131. [Google Scholar] [CrossRef] [Green Version]
- Bertolino, A.; Inverardi, P.; Muccini, H. Software architecture-based analysis and testing: A look into achievements and future challenges. Computing 2013, 95, 633–648. [Google Scholar] [CrossRef]
- Abdurazik, A.; Jin, Z.; White, L.; Offutt, J. Analyzing software architecture descriptions to generate system-level tests. In Proceedings of the Workshop on Evaluating Software Architectural Solutions, Irvine, CA, USA, 9 May 2000. [Google Scholar]
- Bertolino, A.; Inverardi, P. Architecture-based software testing. In International Software Architecture Workshop; ACM: New York, NY, USA, 1996; pp. 62–64. [Google Scholar]
- Richardson, D.J.; Wolf, A.L. Software testing at the architectural level. In International Software Architecture Workshop and International Workshop on Multiple Perspectives in Software Development; ACM: New York, NY, USA, 1996; pp. 68–71. [Google Scholar]
- Jin, Z.; Offutt, J. Deriving tests from software architectures. In Proceedings of the International Symposium on Software Reliability Engineering, Hong Kong, China, 27–30 November 2001; pp. 308–313. [Google Scholar]
- Harrold, M.J. Architecture-based regression testing of evolving systems. In Proceedings of the International Workshop on the Role of Software Architecture in Testing and Analysis, Marsala, Italy, 30 June–3 July 1998. [Google Scholar]
- Jiang, Z.M.; Hassan, A.E. A Survey on Load Testing of Large-Scale Software Systems. IEEE Trans. Softw. Eng. 2015, 41, 1091–1118. [Google Scholar] [CrossRef]
- Zhang, J.; Cheung, S.C. Automated test case generation for the stress testing of multimedia systems. Softw. Pract. Exp. 2002, 32, 1411–1435. [Google Scholar] [CrossRef]
- Zhang, J.; Cheung, S.C.; Chanson, S.T. Stress testing of distributed multimedia software systems. In Formal Methods for Protocol Engineering and Distributed Systems; Springer: London, UK, 1999; pp. 119–133. [Google Scholar]
- Weyuker, E.J.; Vokolos, F.I. Experience with performance testing of software systems: Issues, an approach, and case study. IEEE Trans. Softw. Eng. 2000, 26, 1147. [Google Scholar] [CrossRef]
- Denaro, G.; Polini, A.; Emmerich, W. Early performance testing of distributed software applications. In ACM SIGSOFT Software Engineering Notes; ACM: New York, NY, USA, 2004; Volume 29, pp. 94–103. [Google Scholar]
- Jiang, Z.M.; Hassan, A.E.; Hamann, G.; Flora, P. Automated performance analysis of load tests. In Proceedings of the International Conference on Software Maintenance, Edmonton, AB, Canada, 20–26 September 2009; pp. 125–134. [Google Scholar]
- Grechanik, M.; Fu, C.; Xie, Q. Automatically finding performance problems with feedback-directed learning software testing. In Proceedings of the International Conference on Software Engineering (ICSE), Zurich, Switzerland, 2 June 2012; pp. 156–166. [Google Scholar]
- Marinescu, R.; Saadatmand, M.; Bucaioni, A.; Seceleanu, C.; Pettersson, P. A model-based testing framework for automotive embedded systems. In Proceedings of the 2014 40th EUROMICRO Conference on Software Engineering and Advanced Applications, Verona, Italy, 27–29 August 2014; pp. 38–47. [Google Scholar]
- Nebut, C.; Fleurey, F.; Le Traon, Y.; Jezequel, J.M. Automatic test generation: A use case driven approach. IEEE Trans. Softw. Eng. 2006, 32, 140–155. [Google Scholar] [CrossRef] [Green Version]
- Ali, S.; Briand, L.C.; Hemmati, H. Modeling robustness behavior using aspect-oriented modeling to support robustness testing of industrial systems. Softw. Syst. Model. 2012, 11, 633–670. [Google Scholar] [CrossRef]
- Yue, T.; Ali, S. Bridging the gap between requirements and aspect state machines to support non-functional testing: Industrial case studies. In European Conference on Modelling Foundations and Applications; Springer: London, UK, 2012; pp. 133–145. [Google Scholar]
- Garousi, V.; Briand, L.C.; Labiche, Y. A UML-based quantitative framework for early prediction of resource usage and load in distributed real-time systems. Softw. Syst. Model. 2009, 8, 275–302. [Google Scholar] [CrossRef]
Mutation Operator | Description | EAST-ADL Element |
---|---|---|
Energy Replacement Operator (ero) | The operator is applied where an energy value occurs occurs, i.e., as an annotation of each component. The operator is applied by replacing a value of an energy constraint connected to a component (e.g., replacing a value () with its boundary values (e.g., )). | GenericConstraint |
Period Replacement Operator (pro) | The operator applies the mutations in each period constraint value. The operator is only applied in the components triggered periodically. The operator is applied by replacing a value of the period constraint connected to a component (e.g., replacing a value () with its boundary values (e.g., )). | PeriodConstraint |
Execution-Time Replacement Operator (etro) | The operator applies the mutations in each execution time constraint value. The operator is applied by replacing a value of the execution time constraint connected to a component (e.g., replacing a value () with its boundary values (e.g., )). | ExecTimeConstraint |
Component Removal Operator (cro) | This operator models errors related with missing components. This operator removes each component together with its constraints and connects the inputs of this component to the next component in the system. | FunctionPrototype |
Component Insertion Operator (cio) | This operator models errors related with duplicated components. This operator adds a duplicated component together with its constraints and connects this component in the same configuration as the original one. | FunctionPrototype |
Triggering Replacement Operator (tro) | The operator applies the mutations in each component triggering pattern. The operator is applied by replacing the periodic pattern with a event pattern connected to a component and vice versa. | FunctionPrototype, PeriodConstraint |
Test Suite | SMC Query | Generation Time (s) | Mutation Score (%) | Selected TCs|Total TCs |
---|---|---|---|---|
TS1 | simulate 25[<=64]{inputs[], energy} | 17.2 | 30% | |
TS2 | simulate 50[<=64]{inputs[], energy} | 36.4 | 57% | |
TS3 | simulate 100[<=64]{inputs[], energy} | 72.1 | 75% | |
TS4 | simulate 200[<=64]{inputs[], energy} | 137.8 | 87% | |
TS5 | simulate 400[<=64]{inputs[], energy} | 277.5 | 100% | |
TS6 | simulate 1000[<=64]{inputs[], energy} | 563.4 | 100% |
© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Enoiu, E.P.; Seceleanu, C. Model Testing of Complex Embedded Systems Using EAST-ADL and Energy-Aware Mutations. Designs 2020, 4, 5. https://doi.org/10.3390/designs4010005
Enoiu EP, Seceleanu C. Model Testing of Complex Embedded Systems Using EAST-ADL and Energy-Aware Mutations. Designs. 2020; 4(1):5. https://doi.org/10.3390/designs4010005
Chicago/Turabian StyleEnoiu, Eduard Paul, and Cristina Seceleanu. 2020. "Model Testing of Complex Embedded Systems Using EAST-ADL and Energy-Aware Mutations" Designs 4, no. 1: 5. https://doi.org/10.3390/designs4010005
APA StyleEnoiu, E. P., & Seceleanu, C. (2020). Model Testing of Complex Embedded Systems Using EAST-ADL and Energy-Aware Mutations. Designs, 4(1), 5. https://doi.org/10.3390/designs4010005