Abstract
Breaking down applications into smaller modules is a common way for software developers to cope with the increasing complexity of their projects. A common barrier to this endeavor is the presence of crosscutting concerns that prevent reusability and reduce comprehensibility. The promise of AOP (Aspect-Oriented Programming) is that, by using it, developers will be able to organize these crosscutting concerns into their own units of modularity. However, AOP does not tackle the problem of having tangled automatic tests. This paper presents a technique using incremental testing and invasive aspects to modify and adapt tests, enabling the development of unit tests that are free of crosscutting concerns and thus easier to reuse. Using a medium scale project, we will show that without using this technique, due to the presence of invasive aspects, some unit tests would have to be discarded or modified to accommodate the changes made by them.
This is a preview of subscription content, log in via an institution.
References
Assunção, W.K.G., Colanzi, T.E., Vergilio, S.R., Pozo, A.T.R.: Evaluating different strategies for integration testing of aspect-oriented programs. J. Braz. Comput. Soc. 20(1), 9 (2014). doi:10.1186/1678-4804-20-9
Balzarotti, D., Monga, M.: Using program slicing to analyze aspect-oriented composition. In: Proceedings of Foundations of Aspect-Oriented Languages Workshop at AOSD (2004)
Baniassad, E., Clarke, S.: Finding aspects in requirements with theme/doc. In: Tekinerdou gan, B., Moreira, A., Araújo, J., Clements, P. (eds.) Proceedings of Early Aspects 2004 Workshop, March 2004
Ceccato, M., Tonella, P., Ricca, F.: Is AOP code easier to test than OOP code? In: Workshop on Testing Aspect-Oriented Programs, International Conference on Aspect-Oriented Software Development, Chicago, Illinois, March 2005
Eclipse Foundation: The eclipse foundation open source community website, December 2010. http://www.eclipse.org/
Fowler, M.: Mocks aren’t stubs (2007). http://martinfowler.com/articles/mocksArentStubs.html
Greenwood, P., Garcia, A.F., Bartolomei, T., Soares, S., Borba, P., Rashid, A.: On the design of an end-to-end aosd testbed for software stability. In: Proceedings of the 1st International Workshop on Assessment of Aspect-Oriented Technologies (ASAT 2007), Vancouver, Canada, Citeseer (2007)
Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C., Loingtier, J.-M., Irwin, J.: Aspect-oriented programming. In: Akşit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997). doi:10.1007/BFb0053381
Havinga, W., Nagy, I., Bergmans, L., Aksit, M.: A graph-based approach to modeling and detecting composition conflicts related to introductions. In: AOSD 2007: Proceedings of the 6th International Conference on Aspect-Oriented Software Development, pp. 85–95. ACM Press, New York (2007)
Katz, S., Israel, H.: Diagnosis of harmful aspects using regression verification. In: FOAL: Foundations of Aspect-Oriented Languages, pp. 1–6 (2004)
Kienzle, J., Yu, Y., Xiong, J.: On composition and reuse of aspects. In: Software Engineering Properties of Languages for Aspect Technologies (2003)
Lagaisse, B., Joosen, W., De Win, B.: Managing semantic interference with aspect integration contracts. In: Software Engineering Properties of Languages and Aspect Technologies (2004)
Marin, M., Moonen, L., van Deursen, A.: An integrated crosscutting concern migration strategy and its application to jhotdraw. Technical report., Delft University of Technology Software Engineering Research Group (2007)
Tarr, P., Ossher, H., Harrison, W., Sutton, J.S.M.: N degrees of separation: multi-dimensional separation of concerns. In: Proceedings of the 21st International Conference on Software Engineering, ICSE 1999 (1999)
Rashid, A., Moreira, A., Araújo, J.: Modularization and composition of aspectual requirements. In: Proceeding 2nd International Conference on Aspect-Oriented Software Development (AOSD 2003) (2003)
Restivo, A., Aguiar, A., Moreira, A.: Incremental modular testing for AOP. In: Proceedings of the 11th International Joint Conference on Software Technologies (ICSOFT 2016): ICSOFT-PT. Lisbon, Portugal, 24–26 July 2016, vol. 2, pp. 50–59 (2016). http://dx.doi.org/10.5220/0005986600500059
Restivo, A.: DrUID: Unexpected interactions detection (2009). https://github.com/arestivo/druid
Restivo, A.: Aida: Automatic interference detection for aspectj (2010). https://github.com/arestivo/aida
Restivo, A.: School-aspectj-testbed (2014). https://github.com/arestivo/School-AspectJ-Testbed
Restivo, A., Aguiar, A.: Disciplined composition of aspects using tests. In: Proceedings of the 2008 AOSD Workshop on Linking Aspect Technology and Evolution, LATE 2008, New York, USA, pp. 8:1–8:5 (2008). http://doi.acm.org/10.1145/1404953.1404961
Restivo, A., Aguiar, A.: DrUID – unexpected interactions detection. In: Demonstration at the Aspect Oriented Software Development Conference (AOSD 2009) (2009)
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
Acknowledgements
We would like to thank FCT for the support provided through scholarship SFRH/BD/32730/2006.
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
Restivo, A., Aguiar, A., Moreira, A. (2017). An Incremental Approach to Testing AOP. In: Cabello, E., Cardoso, J., Ludwig, A., Maciaszek, L., van Sinderen, M. (eds) Software Technologies. ICSOFT 2016. Communications in Computer and Information Science, vol 743. Springer, Cham. https://doi.org/10.1007/978-3-319-62569-0_15
Download citation
DOI: https://doi.org/10.1007/978-3-319-62569-0_15
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-62568-3
Online ISBN: 978-3-319-62569-0
eBook Packages: Computer ScienceComputer Science (R0)