Abstract
Aspect-oriented software testing is emerging as an important alternative to conventional procedural and object-oriented testing techniques. This paper reports experiences from two case studies where aspects were used for the testing of embedded software in the context of an industrial application. In the first study, we used code-level aspects for testing non-functional properties. The methodology we used for deriving test aspect code was based on translating high-level requirements into test objectives, which were then implemented using test aspects in AspectC++. In the second study, we used high-level visual scenario-based models for the test specification, test generation, and aspect-based test execution. To specify scenario-based tests, we used a UML2-compliant variant of live sequence charts. To automatically generate test code from the models, a modified version of the S2A Compiler, outputting AspectC++ code, was used. Finally, to examine the results of the tests, we used the Tracer, a prototype tool for model-based trace visualization and exploration. The results of the two case studies show that aspects offer benefits over conventional techniques in the context of testing embedded software; these benefits are discussed in detail. Finally, towards the end of the paper, we also discuss the lessons learned, including the technological and other barriers to the future successful use of aspects in the testing of embedded software in industry.
Similar content being viewed by others
Notes
For the purposes of this paper, a concern is defined to be any conceptual matter of interest, that is, testing concerns are conceptual matters of interest related to testing, which are important to some stakeholder(s).
References
AspectC++. (2012). AspectC++ website. At URL http://www.aspectc.org/. Cited March 2012.
AspectJ. (2012). AspectJ WWW site. At URL http://www.eclipse.org/aspectj/. Cited March 2012.
Clarke, S., Harrison, W., Ossher, H., & Tarr, P. (1999). Subject-oriented design: Towards improved alignment of requirements, design, and code. ACM SIGPLAN Notices, 34(10), 325–339.
Coelho, R., Kulesza, U., von Staa, A., & Lucena, C. (2006). Unit testing in multi-agent systems using mock agents and aspects. In SELMAS ’06: Proceedings of the 2006 international workshop on software engineering for large-scale multi-agent systems, (pp. 83–90). ACM Press.
Craig, R. D., & Jaskiel, S. P. (2002). Systematic software testing. London: Artech House.
Damm, W., & Harel, D. (2001). LSCs: Breathing life into message sequence charts. Journal on Formal Methods in System Design, 19(1), 45–80.
Feng, Y., Liu, X., & Kerridge, J. (2007). A product line based aspect-oriented generative unit testing approach to building quality components. In Computer Software and Applications Conference, (Vol. 2, pp. 403–408). IEEE Computer Society.
Fewster, M., & Graham, D. (1999). Software test automation: Effective use of test execution tools. New York: Addison–Wesley.
Filman, R. E., Elrad, T., Clarke, S., & Akşit, M. (2004). Aspect-oriented software development. New York: Addison–Wesley.
Harel, D., & Maoz, S. (2008). Assert and negate revisited: Modal semantics for UML sequence diagrams. Software and Systems Modeling (SoSyM), 7(2), 237–252.
Harel, D., & Marelly, R. (2003). Come, let’s play: Scenario-based programming using LSCs and the play-engine. Berlin Springer.
IBM Rational. (2012). IBM Rational Software Architect homepage. Available at http://www-01.ibm.com/software/awdtools/swarchitect/websphere. Cited March 2012.
Janicki, M., Katara, M., & Pääkkönen, T. (2012). Obstacles and opportunities in deploying model-based GUI testing of mobile software: A survey. Software Testing, Verification & Reliability, 22(5), 313–341.
Kaner, C., Bach, J., & Pettichord, B. (2002). Lessons learned in software testing: A context-driven approach. New York: Wiley.
Kartal Y. B., & Schmidt E. G. (2007). An evaluation of aspect oriented programming for embedded real-time systems. In Proceedings of the 22nd international symposium on computer and information sciences (ISCIS 2007), (pp. 1–6). IEEE, November 2007.
Kulesza, U., Sant’Anna, C., & Lucena, C. (2005). Refactoring the JUnit framework using aspect-oriented programming. In OOPSLA ’05: Companion to the 20th annual ACM SIGPLAN conference on object-oriented programming, systems, languages, and applications, (pp. 136–137). ACM Press.
Maoz, S. (2012). Tracer website. http://www.wisdom.weizmann.ac.il/maozs/tracer/. Cited March 2012.
Maoz, S. (2009a). Model-based traces. In M. R. V. Chaudron, (ed.), Workshops and symposia at MODELS 2008, vol. 5421 of Lecture Notes in Computer Science, (pp. 109–119). Berlin: Springer.
Maoz, S. (2009b). Using model-based traces as runtime models. IEEE Computer, 42(10), 28–36.
Maoz, S., & Harel, D. (2006). From multi-modal scenarios to code: Compiling LSCs into AspectJ. In Young M., Devanbu, P. T. (eds.), Proceedings of the 14th international ACM/SIGSOFT symposium on foundations of software engineering (FSE’06), (pp. 219–230). ACM.
Maoz, S., & Harel, D. (2011). On tracing reactive systems. Software and Systems Modeling (SoSyM), 10(4), 447–468.
Maoz, S., Harel, D., & Kleinbort, A. (2011). A compiler for multi-modal scenarios: Transforming LSCs into AspectJ. ACM Transactions on Software Engineering and Methodology (TOSEM), 20(4), 18.
Maoz, S., Metsä, J., & Katara, M. (2009). Model-based testing using LSCs and S2A. In Schürr A., & Selic B. (eds.), Proceedings of the 12th international conference on model driven engineering languages and systems (MoDELS’09), vol. 5795 of Lecture Notes in Computer Science, (pp. 301–306) (short paper). Berlin: Springer.
Metsä, J., Katara, M., & Mikkonen, T. (2007). Testing non-functional requirements with aspects: An industrial case study. In Proceedings of the 7th international conference on quality software (QSIC 2007), (pp. 5–14). Washington, DC: IEEE Computer Society.
Metsä, J., Katara, M., & Mikkonen, T. (2008). Comparing aspects with conventional techniques for increasing testability. In Proceedings of the 1st international conference on software testing, verification, and validation (ICST 2008), (pp. 387–395). Washington, DC: IEEE Computer Society.
Nokia. (2012). Symbian operating system website. At URL http://symbian.nokia.com/. Cited March 2012.
Pesonen, J. (2006). Extending software integration testing using aspects in symbian OS. In McMinn, P. (ed.), TAIC PART 2006, (pp. 147–151). Washington, DC: IEEE Computer Society.
Pesonen, J., Katara, M., & Mikkonen, T. (2006). Production-testing of embedded systems with aspects. In Ur, S., Bin, E., & Wolfsthal, Y. (eds.), Revised selected papers from the 1st international conference on hardware and software verification and testing, haifa verification conference (HVC’05), vol. 3875 of Lecture Notes in Computer Science, (pp. 90–102). Berlin: Springer.
Pezzè, M., & Young, M. (2008). Software testing and analysis: Process, principles, and techniques. New York: Wiley.
Rajan, H., & Sullivan, K. (2005). Aspect language features for concern coverage profiling. In Mezini, M., & Tarr, P. L. (eds.), AOSD ’05: Proceedings of the 4th international conference on aspect-oriented software development, (pp. 181–191). New York: ACM Press.
Rashid, A., Sawyer, P., Moreira, A., & Araujo, J. (2002). Early aspects: A model for aspect-oriented requirements engineering. In RE ’02: Proceedings of the 10th anniversary IEEE joint international conference on requirements engineering, (pp. 199–202). Washington, DC: IEEE Computer Society.
Rook, P. (1986). Controlling software projects. Software Engineering Journal, 1(1), 7–16.
Spinczyk, O., Gal, A., & Schröder-Preikschat, W. (2002). AspectC++: An aspect-oriented extension to the C++ programming language. In J. Nobles & J. Potter, (eds.), Proceedings of the 40th international conference on technology of object oriented languages and systems (TOOLS PACIFIC ’02), vol. 10 of Conferences in Research and Practice in Information Technology, (pp. 53–60). Sydney, NSW: Australian Computer Society.
Stamey, J., & Saunders, B. (2005). Unit testing and debugging with aspects. Journal of Computing Sciences in Colleges, 20(5), 47–55.
Xu, D., & He, X. (2007). Generation of test requirements from aspectual use cases. In Proceedings of the 3rd workshop on testing aspect-oriented programs (WTAOP’07), (pp. 17–22). New York, NY: ACM.
Acknowledgments
The first and the third listed authors acknowledge partial funding from the Academy of Finland (grant number 121012). Part of the second listed author’s work was done while he was with the Weizmann Institute of Science, Rehovot, Israel. In addition, the second listed author acknowledges partial funding from an Advanced Research Grant awarded to David Harel of the Weizmann Institute from the European Research Council (ERC) under the European Community’s 7th Framework Programme (FP7/2007-2013).
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Metsä, J., Maoz, S., Katara, M. et al. Using aspects for testing of embedded software: experiences from two industrial case studies. Software Qual J 22, 185–213 (2014). https://doi.org/10.1007/s11219-012-9193-8
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11219-012-9193-8