Pairwise structural testing of object and aspect-oriented Java programs

  • Ivan Gustavo Franchin USP
  • Otávio Augusto Lazzarini Lemos USP
  • Paulo Cesar Masiero USP

Resumo


Em um trabalho recente, explorou-se o teste estrutural de unidade – tanto de métodos quanto de adendos – de programas Java orientados a objetos (OO) e a aspectos (OA). Um problema não tratado pelo teste de unidade é a interação entre as unidades, no que diz respeito à corretude das interfaces. Neste artigo é apresentada uma abordagem de teste de integração que estende a abordagem de teste de unidade apresentada anteriormente. Para que a atividade de teste seja factível, em vez de considerar níveis arbitrários de chamadas de uma só vez, trata-se do teste de cada par de unidades. Um modelo para representar o fluxo de controle e de dados de pares de unidades de programas Java OO e OA chamado grafo PWDU (PairWise Def-Use) é proposto juntamente com três critérios de teste. Uma implementação da abordagem utilizando como base a família de ferramentas de teste JaBUTi (Java Bytecode Understanding and Testing) juntamente com um exemplo de uso também são apresentados.

Referências

AspectJ Team (2003). The AspectJ programming guide. Online. Available from: http://www.eclipse.org/aspectj/doc/released/progguide/index.html (accessed 20/01/2006).

Elrad, T., Kiczales, G., Aksit, M., Lieberher, K., and Ossher, H. (2001). Discussing aspects of AOP. Communications of the ACM, 44(10):33–38.

Franchin, I. G. (2007). Teste estrutural de integracao par-a-par de programas orientados a objetos e a aspectos: Criterios e automatizacao. Master’s thesis, ICMC-USP, Sao Carlos, SP.

Harrold, M. J., Jones, J. A., Li, T., Liang, D., Orso, A., Pennings, M., Sinha, S., Spoon, S. A., and Gujarathi, A. (2001). Regression test selection for java software. In OOPSLA ’01: Proceedings of the 16th ACM SIGPLAN conference on Object oriented programming, systems, languages, and applications, pages 312–326, New York, NY, USA. ACM Press.

Harrold, M. J., McGregor, J. D., and Fitzpatrick, K. J. (1992). Incremental testing of object-oriented class structures. In ICSE ’92: Proceedings of the 14th international conference on Software engineering, pages 68–80, New York, NY, USA. ACM Press.

Harrold, M. J. and Rothermel, G. (1994). Performing data flow testing on classes. In SIGSOFT ’94: Proceedings of the 2nd ACM SIGSOFT symposium on Foundations of software engineering, pages 154–163, New York, NY, USA. ACM Press.

Hilsdale, E. and Hugunin, J. (2004). Advice Weaving in AspectJ. In Proceedings of the 4th AOSD 2004, pages 26–35, Lancaster, UK.

Kiczales, G., Irwin, J., Lamping, J., Loingtier, J.-M., Lopes, C., Maeda, C., and Menhdhekar, A. (1997). Aspect-oriented programming. In Aksit, M. and Matsuoka, S., editors, Proceedings of the ECOOP, volume 1241, pages 220–242, Berlin, Heidelberg, and New York. Springer-Verlag.

Lemos, O. A. L., Ferrari, F. C., Masiero, P. C., and Lopes, C. V. (2006). Testing aspectoriented programming pointcut descriptors. In WTAOP ’06: Proceedings of the 2nd workshop on Testing aspect-oriented programs, pages 33–38, New York, NY, USA. ACM Press.

Lemos, O. A. L., Vincenzi, A., Maldonado, J. C., and Masiero, P. C. (2007). Control and data-flow structural testing criteria for aspect-oriented programs. Journal of Systems and Software, 80(6):862–882.

Lindholm, T. and Yellin, F. (1999). The Java Virtual Machine Specification. Prentice Hall PTR, 2 edition.

Linnenkugel, U. and Mullerburg, M. (1990). Test data selection criteria for (software) integration testing. In ISCI ’90: Proceedings of the first international conference on systems integration ’90, pages 709–717, Piscataway, NJ, USA. IEEE Press.

Maldonado, J. C. (1991). Criterios Potenciais Usos: Uma Contribuicao ao Teste Estrutural de Software. PhD thesis, DCA/FEE/UNICAMP, Campinas, SP.

Myers, G. J., Sandler, C., Badgett, T., and Thomas, T. M. (2004). The Art of Software Testing. John Wiley & Sons, 2nd. edition.

Orso, A., Shi, N., and Harrold, M. J. (2004). Scaling regression testing to large software systems. In SIGSOFT ’04/FSE-12: Proceedings of the 12th ACM SIGSOFT twelfth international symposium on Foundations of software engineering, pages 241–251, New York, NY, USA. ACM Press.

Paradkar, A. (1996). Inter-Class Testing of O-O Software in the Presence of Polymorphism. In Proceedings of the 1996 Conference of the Centre For Advanced Studies on Collaborative Research, page 30, Toronto, Ontario, Canada. IBM Press.

Rapps, S. and Weyuker, E. J. (1985). Selecting software test data using data flow information. IEEE Trans. Softw. Eng., 11(4):367–375.

Stobie, K. (2005). Too darned big to test. Queue, 3(1):30–37.

Vilela, P. R. S., Maldonado, J. C., and Jino, M. (1999). Data Flow Based Integration Testing. In Anais do 13o Simposio Brasileiro de Engenharia de Software, pages 393– 409, Florianopolis, SC, Brasil.

Vincenzi, A. M. R., Delamaro, M. E., Maldonado, J. C., and Wong, W. E. (2006). Establishing structural testing criteria for java bytecode. Softw. Pract. Exper., 36(14):1513–1541.

Weyuker, E. J. (1988). The evaluation of program-based software test data adequacy criteria. Commun. ACM, 31(6):668–675.
Publicado
15/10/2007
Como Citar

Selecione um Formato
FRANCHIN, Ivan Gustavo; LEMOS, Otávio Augusto Lazzarini; MASIERO, Paulo Cesar. Pairwise structural testing of object and aspect-oriented Java programs. In: SIMPÓSIO BRASILEIRO DE ENGENHARIA DE SOFTWARE (SBES), 21. , 2007, João Pessoa. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2007 . p. 377-393. DOI: https://doi.org/10.5753/sbes.2007.21317.