Incremental Modular Testing for AOP

André Restivo, Ademar Aguiar, Ana Moreira

2016

Abstract

By designing systems as sets of modules that can be composed into larger applications, developers unleash a multitude of advantages. The promise of AOP (Aspect-Oriented Programming) is to enable developers to organize crosscutting concerns into separate units of modularity making it easier to accomplish this vision. However, AOP does not allow unit tests to be untangled, which impairs the development of properly tested independent modules. This paper presents a technique that enables developers to encapsulate crosscutting concerns using AOP and still be able to develop reusable unit tests. Our approach uses incremental testing and invasive aspects to modify and adapt tests. The approach was evaluated in a medium scale project with promising results. Without using the proposed 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 would have a profound impact on the overall modularity and, in particular, on the reusability of those modules. We will show that this technique enables proper unit tests that can be reused even when coupled with aspect-oriented code.

References

  1. Assunção, W. K. G., Colanzi, T. E., Vergilio, S. R., and Ramirez Pozo, A. T. (2014). Evaluating different strategies for integration testing of aspect-oriented programs. Journal of the Brazilian Computer Society, 20(1).
  2. Balzarotti, D. and Monga, M. (2004). Using program slicing to analyze aspect-oriented composition. In Proceedings of Foundations of Aspect-Oriented Languages Workshop at AOSD, pages 25-29.
  3. Baniassad, E. and Clarke, S. (2004). Theme: An approach for aspect-oriented analysis and design. In Proceedings of the 26th International Conference on Software Engineering, pages 158-167. IEEE Computer Society.
  4. Fowler, M. (2007). Mocks aren't stubs. Online article at martinfowler.com http://bit.ly/18BPLE1.
  5. Greenwood, P., Garcia, A. F., Bartolomei, T., Soares, S., Borba, P., and Rashid, A. (2007). On the design of an end-to-end aosd testbed for software stability. In ASAT: Proceedings of the 1st International Workshop on Assessment of Aspect-Oriented Technologies, Vancouver, Canada. Citeseer.
  6. Gregor Kiczales, John Lamping, Anurag Mendhekar, Chris Maeda, Cristina Lopes, Jean-Marc Loingtier, and John Irwin (1997). Aspect-Oriented Programming. Proceedings of the European Conference on ObjectOriented Programming, 1241:220-242.
  7. Havinga, W., Nagy, I., Bergmans, L., and Aksit, M. (2007). A graph-based approach to modeling and detecting composition conflicts related to introductions. In AOSD: Proceedings of the 6th International Conference on Aspect-Oriented Software Development, pages 85-95, New York, NY, USA. ACM Press.
  8. Katz, S. (2004). Diagnosis of harmful aspects using regression verification. In FOAL: Foundations Of AspectOriented Languages, pages 1-6.
  9. Kienzle, J., Yu, Y., and Xiong, J. (2003). On composition and reuse of aspects. In SPLAT: Software Engineering Properties of Languages for Aspect Technologies.
  10. Lagaisse, B., Joosen, W., and De Win, B. (2004). Managing semantic interference with aspect integration contracts. In SPLAT: Software Engineering Properties of Languages for Aspect Technologies.
  11. Marius Marin, L. M. and van Deursen, A. (2007). An integrated crosscutting concern migration strategy and its application to jhotdraw. Technical report, Delft University of Technology Software Engineering Research Group.
  12. Peri Tarr, Harold Ossher, William Harrison, and Stanley M. Sutton Jr. (1999). N degrees of separation: multidimensional separation of concerns. Proceedings of the International Conference on Software Engineering, page 107.
  13. Rashid, A., Moreira, A., and Araújo, J. (2003). Modularisation and composition of aspectual requirements. In Proceedings of the 2nd international conference on Aspect-oriented software development, pages 11-20. ACM.
  14. Restivo, A. (2009). DrUID: Unexpected interactions detection. https://github.com/arestivo/druid.
  15. Restivo, A. (2010). Aida: Automatic interference detection for aspectj. https://github.com/arestivo/aida.
  16. Restivo, A. (2014). School-aspectj-testbed. https:// github.com/arestivo/School-AspectJ-Testbed.
  17. Restivo, A. and Aguiar, A. (2008). Disciplined composition of aspects using tests. In LATE: Proceedings of the 2008 AOSD Workshop on Linking Aspect Technology and Evolution, LATE 7808, pages 8:1-8:5, New York, NY, USA. ACM.
  18. Restivo, A. and Aguiar, A. (2009). DrUID - unexpected interactions detection. AOSD: Demonstration at the Aspect Oriented Software Development Conference.
  19. Silveira, F. F., da Cunha, A. M., and Lisbôa, M. L. (2014). A state-based testing method for detecting aspect composition faults. In Murgante, B., Misra, S., Rocha, A., Torre, C., Rocha, J., Falcão, M., Taniar, D., Apduhan, B., and Gervasi, O., editors, Computational Science and Its Applications - ICCSA 2014 , volume 8583 of Lecture Notes in Computer Science, pages 418-433. Springer International Publishing.
  20. The Eclipse Foundation (2010). The AspectJ Project. http://www.eclipse.org/aspectj/.
Download


Paper Citation


in Harvard Style

Restivo A., Aguiar A. and Moreira A. (2016). Incremental Modular Testing for AOP . In Proceedings of the 11th International Joint Conference on Software Technologies - Volume 2: ICSOFT-PT, (ICSOFT 2016) ISBN 978-989-758-194-6, pages 50-59. DOI: 10.5220/0005986600500059


in Bibtex Style

@conference{icsoft-pt16,
author={André Restivo and Ademar Aguiar and Ana Moreira},
title={Incremental Modular Testing for AOP},
booktitle={Proceedings of the 11th International Joint Conference on Software Technologies - Volume 2: ICSOFT-PT, (ICSOFT 2016)},
year={2016},
pages={50-59},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0005986600500059},
isbn={978-989-758-194-6},
}


in EndNote Style

TY - CONF
JO - Proceedings of the 11th International Joint Conference on Software Technologies - Volume 2: ICSOFT-PT, (ICSOFT 2016)
TI - Incremental Modular Testing for AOP
SN - 978-989-758-194-6
AU - Restivo A.
AU - Aguiar A.
AU - Moreira A.
PY - 2016
SP - 50
EP - 59
DO - 10.5220/0005986600500059