Static Analysis of Java Bytecode for Domain-specific Software Testing

  • Márcio E. Delamaro UNIVEM
  • Paulo A. Nardi UNIVEM
  • Otávio Lemos USP
  • Paulo C. Masiero USP
  • Edmundo S. Spoto UNIVEM
  • José C. Maldonado USP
  • Auri M. R. Vincenzi UNISANTOS

Abstract


Software testing is an important and expensive activity of the software development process. Techniques and tools are essential to improve test quality and productivity. Structural testing is a technique that uses characteristics such as control-flow and data-flow structures to derive testing requirements. By exercising such testing requirements the tester supposedly provides test cases that improve the software quality. Structural testing requires several activities that make use of code analysis, in general performed on the program source code. With the advent of Java it has become usual to perform such analysis directly on the bytecode instead of the source code, with a number of advantages. In this paper we discuss how to use the characteristics of Java bytecode analysis and how to extend it to implement structural criteria for two specific domains: aspect oriented programs and database applications.

References

Boujarwah, A., Saleh, K., and Al-Dallal, J. (2000). Dynamic data flow analysis for Java programs. Journal of Information and Software Technology, 42(11):765–775.

Dahm, M. (2001). Byte code engineering with the BCEL API. Technical Report B-1798, Freie Universität Berlin – Institut für Informatik, Berlin – German. Available at: http://bcel.sourceforge.net/. Accessed on: 01/03/2004.

Delamaro, M. E. and Vincenzi, A. M. R. (2003). Structural Testing of Mobile Agents. In Nicolas Guelfi, E. A. and Reggio, G., editors, III International Workshop on Scientific Engineering of Java Distributed Applications (FIDJI’2003), Lecture Notes on Computer Science, pages 73–85. Springer.

Haddox, J. M., Kapfhammer, G. M., and Michael, C. C. (2002). An approach for understanding and testing third party software components. In Reliability and Maintainability Symposium – RAMS’2002, pages 293–299, Seattle, WA, USA. IEEE Press.

Herman, P. M. (1976). A data flow analysis approach to program testing. Australian Computer Journal, 8(3):92–96.

Hilsdale, E. and Hugunin, J. (2004). Advice weaving in aspectj. In Proceedings of the 3rd international conference on Aspect-oriented software development, pages 26–35. ACM Press.

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

Maldonado, J. C. (1991). Potential-Uses Criteria: A Contribution to the Structural Testing of Software. PhD thesis, DCA/FEE/UNICAMP, Campinas, SP, Brazil. (in Portuguese).

Rapps, S. and Weyuker, E. J. (1985). Selecting software test data using data flow information. IEEE Transactions on Software Engineering, 11(4):367–375.

Spoto, E. S., Jino, M., and Maldonado, J. C. (2000). Structural software testing: An approach to relational database applications. In XIV Brazilian Symposium on Software Engineering, João Pessoa, PA, Brazil. (in Portuguese).

The AspectJ Team (2006). Aspectj programming guide. Available at: http://www.eclipse.org/aspectj/doc/released/progguide/index.html. Accessed on: 04/03/2007.

Vincenzi, A. M. R., Maldonado, J. C., Wong, W. E., and Delamaro, M. E. (2005). Coverage testing of Java programs and components. Journal of Science of Computer Programming, 56(1-2):211–230.

Zhao, J. (2000). Dependence analysis of Java bytecode. In 24th IEEE Annual International Computer Software and Applications Conference (COMPSAC’2000), pages 486–491, Taipei, Taiwan. IEEE Computer Society Press.
Published
2007-10-15
DELAMARO, Márcio E.; NARDI, Paulo A.; LEMOS, Otávio; MASIERO, Paulo C.; SPOTO, Edmundo S.; MALDONADO, José C.; VINCENZI, Auri M. R.. Static Analysis of Java Bytecode for Domain-specific Software Testing. In: BRAZILIAN SYMPOSIUM ON SOFTWARE ENGINEERING (SBES), 21. , 2007, João Pessoa. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2007 . p. 325-341. ISSN 2833-0633. DOI: https://doi.org/10.5753/sbes.2007.21314.