Teste de Unidade de Programas Orientados a Aspectos
Abstract
This paper presents a structural unit testing approach for aspect-oriented programs. An aspect-oriented control flow model is defined based on the bytecode (the object code of Java) resulted from the compilation/weaving of programs written in AspectJ – an extension of the Java language for the aspect-oriented programming – and testing criteria are derived from this model. Besides the two traditional structural testing criteria all-nodes and all-edges, two other aspect-oriented specific structural testing criteria, all-interception-nodes and all-interception-edges, are defined. An example of the application of the criteria is presented.
References
Beck, K.; Gamma, E. JUnit cookbook. Disponível em: http://www.junit.org (Acessado em 14/07/2004)
Elrad, T.; Filman, R. E.; Bader, A. Aspect-oriented programming: Introduction. Commun. ACM, v. 44, n. 10, p. 29-32, 2001.
Frankl, P. G.; Weyuker, E. J. An Applicable Family of Data Flow Testing Criteria. In: IEEE Transactions on Software Engineering, 1988, p. 1483-1498.
Frankl, P. G.; Weyuker, E. J. Testing software to detect and reduce risk. J. Syst. Softw., v. 53, n. 3, p. 275-286, 2000.
Haley, A.; Zweben, S. Development and application of a white box approach to integration testing. J. Syst. Softw., v. 4, n. 4, p. 309-315, 1984.
Harrold, M. J.; Rothermel, G. Performing Dataflow Testing on Classes. In: Proceedings of the ACM SIGSOFT '94 Symposium on the Foundations of Software Engineering, New Orleans, LA, USA: ACM, 1994, p. 154-163.
Hilsdale, E.; Hugunin, J. Advice weaving in aspectj. In: Proceedings of the 3rd international conference on Aspect-oriented software development, ACM Press, 2004, p. 26-35.
Kiczales, G.; Hilsdale, E.; Hugunin, J.; Kersten, M.; Palm, J.; Griswold, W. G. An Overview of AspectJ. Lecture Notes in Computer Science, v. 2072, p. 327-355, 2001.
Laddad, R. AspectJ in Action - Practical Aspect-Oriented Programming. Greenwich, Connecticut: Manning Publications Co., 2003.
Linnenkugel, U.; Müllerburg, M. Test data selection criteria for (software) integration testing. In: Proceedings of the first international conference on systems integration on Systems integration '90, IEEE Press, 1990, p. 709-717.
Myers, G. J. The Art of Software Testing. John Wiley and Sons, Inc., 1979.
Pressman, R. S. Software Engineering: A Practitioner's Approach. McGraw-Hill Higher Education, 2001.
The AspectJ Team Aspectj programming guide. Disponível em: [link]. (Acessado em 31/03/2004)
Vincenzi, A. M. R. Orientação a objeto: Definição, implementação e análise de recursos de teste e validação. Tese de Doutoramento, Universidade de São Paulo, 2004.
Vincenzi, A. M. R.;Wong,W. E.; Delamaro, M. E.; Maldonado, J. C. JaBUTi: A Coverage Analysis Tool for Java Programs. In: 17º Simpósio Brasileiro de Engenharia de Software, Manaus, AM, Brasil, 2003.
Zhao, J. Tool Support for Unit Testing of Aspect-Oriented Software. In: OOPSLA 2002 Workshop on Tools for Aspect-Oriented Software Development, Seattle, WA, 2002.
Zhao, J. Data-flow-based unit testing of aspect-oriented programs. In: Proceedings of the 27th Annual International Conference on Computer Software and Applications, IEEE Computer Society, 2003, p. 188.
