Abstract
Aspect-oriented programming (AOP) is used to implement crosscutting concerns such as persistence and safety in program units called aspects. To ensure that these concerns behave as specified and do not introduce faults into the application, rigorous software testing practices should be applied. Even though there are statements in the literature that the adoption of AOP takes a software to get better quality, it does not provide correctness by itself. Therefore, the test remains an important activity to ensure aspects are correctly integrated into the main system. Additionally, in a dynamic environment: new aspects may be incompatible with aspects already woven; and aspects to be removed can hold the system to an inconsistent state. Available approaches in the literature do not directly investigate the problem of testing dynamic aspects within the context of a target application. This paper presents a method to apply tests in dynamic aspects that verify the interactions between aspects and classes, as well as among aspects. Aiming to support the method, we also introduce a model to represent the dynamic behavior of aspects and a new strategy to derive testing cases. To evaluate the effectiveness of the test cases generated by the method, mutation operators were applied to the model and simulated with a model checker. Results showed that the approach is capable of detecting faults in dynamic aspects interactions into a target application.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Available at: http://www.uppaal.org/.
References
Alam, F.E., Evermann, J., Fiech, A.: Modeling for dynamic aspect-oriented development. In: Proceedings of the 2nd Canadian Conference on Computer Science and Software Engineering, pp. 143–147. ACM (2009)
Alexander, R.T., Bieman, J.M., Andrews, A.A.: Towards the systematic testing of aspect-oriented programs. Rapport technique, Colorado State University (2004)
Binder, R.V.: Testing Object-Oriented Systems: Models, Patterns, and Tools. Addison-Wesley Professional, Boston (2001)
DeMillo, R.A.: Mutation analysis as a tool for software quality assurance. Technical report, DTIC Document (1980)
Dong, J.S., Hao, P., Qin, S., Sun, J., Yi, W.: Timed automata patterns. IEEE Trans. Softw. Eng. 34(6), 844–859 (2008)
Ferrari, F.C., Rashid, A., Maldonado, J.C.: Towards the practical mutation testing of AspectJ programs. Sci. Comput. Program. 78(9), 1639–1662 (2013)
Fuentes, L., Sánchez, P.: Dynamic weaving of aspect-oriented executable UML models. In: Katz, S., Ossher, H., France, R., Jézéquel, J.-M. (eds.) Transactions on Aspect-Oriented Software Development VI. LNCS, vol. 5560, pp. 1–38. Springer, Heidelberg (2009). doi:10.1007/978-3-642-03764-1_1
Fujiwara, S., Bochmann, G.V., Khendek, F., Amalou, M., Ghedamsi, A.: Test selection based on finite state models. IEEE Trans. Softw. Eng. 17(6), 591–603 (1991)
Harel, D.: Statecharts: a visual formalism for complex systems. Sci. Comput. Program. 8(3), 231–274 (1987)
Lindström, B., Offutt, J., Sundmark, D., Andler, S.F., Pettersson, P.: Using mutation to design tests for aspect-oriented models. Inf. Softw. Technol. 81, 112–130 (2016)
Moreira, R.M., Paiva, A.C., Aguiar, A.: Testing aspect-oriented programs. In: 2010 5th Iberian Conference on Information Systems and Technologies (CISTI), pp. 1–6. IEEE (2010)
Myers, G.J., Sandler, C.: The Art of Software Testing. Wiley, Hoboken (2004)
Silveira, F.F., da Cunha, A.M., Lisbôa, M.L.: A state-based testing method for detecting aspect composition faults. In: Murgante, B., et al. (eds.) ICCSA 2014. LNCS, vol. 8583, pp. 418–433. Springer, Cham (2014). doi:10.1007/978-3-319-09156-3_30
Sivaharan, T., Blair, G.S., Friday, A., Wu, M., Duran-Limon, H., Okanda, P., Sørensen, C.F., EU FET: Cooperating sentient vehicles for next generation automobiles. In: ACM/USENIX MobiSys 2004 International Workshop on Applications of Mobile Embedded Systems (WAMES 2004 Online Proceedings) (2004)
Zhang, J., Cheng, B.H.C.: Model-based development of dynamically adaptive software. In: Proceedings of the 28th International Conference on Software Engineering, ICSE 2006, pp. 371–380. ACM, New York (2006)
Zhao, Y., Li, Z., Shen, H., Ma, D.: Development of global specification for dynamically adaptive software. Computing 95(9), 785–816 (2013)
Acknowledgments
The authors would like to thank CNPq (grant 455080/2014-3) and FAPESP for financial support.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2017 Springer International Publishing AG
About this paper
Cite this paper
Souza, M.L.P., Silveira, F.F. (2017). A Model-Based Testing Method for Dynamic Aspect-Oriented Software. In: Gervasi, O., et al. Computational Science and Its Applications – ICCSA 2017. ICCSA 2017. Lecture Notes in Computer Science(), vol 10409. Springer, Cham. https://doi.org/10.1007/978-3-319-62407-5_7
Download citation
DOI: https://doi.org/10.1007/978-3-319-62407-5_7
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-62406-8
Online ISBN: 978-3-319-62407-5
eBook Packages: Computer ScienceComputer Science (R0)