Testing aspect-oriented programs with UML design models

被引:7
|
作者
Xu, Dianxiang [1 ]
Xu, Weifeng [1 ]
Wong, W. Eric [2 ]
机构
[1] N Dakota State Univ, Dept Comp Sci, Fargo, ND 58105 USA
[2] Univ Texas Dallas, Dept Comp Sci, Richardson, TX 75803 USA
关键词
software testing; model-based testing; aspect-oriented modeling; aspect-oriented programming; UML; test generation;
D O I
10.1142/S0218194008003672
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
The new construct in aspect-oriented programming bring new types of programming faults with respect to crosscutting concerns, such as incorrect point cuts and advice. This paper presents a UML-based approach to testing whether or not an aspect-oriented program conforms to its expected crosscutting behavior. We explore aspect-oriented UML design models to derive tests for exercising interactions between aspects and classes. Each aspect-oriented model consists of class diagrams, aspect diagrams, and sequence diagrams. For a method under test, we weave the sequence diagrams of the advice on the method into the method's sequencediagram. Based on the woven sequence diagram and class/aspect diagrams, we then generate an AOF (Aspect-Object Flow) tree by applying coverage criteria such as condition coverage, polymorphic coverage, and loop coverage to woven sequence diagrams. In the AOF tree, each path from the root to a leaf is an abstract message sequence, indicating a template of test cases. A concrete test case is obtained by creating objects that satisfy the collective constraints in the template. Our empirical study shows that the model-based testing approach is capable of revealing several types of aspect-specific faults, including incorrect advice type, incorrect (weaker or stronger) point cut strengths, and incorrect aspect precedence.
引用
收藏
页码:413 / 437
页数:25
相关论文
共 50 条
  • [41] Aspect-oriented design of sensor networks
    Brooks, RR
    Zhu, MX
    Lamb, J
    Iyengar, SS
    JOURNAL OF PARALLEL AND DISTRIBUTED COMPUTING, 2004, 64 (07) : 853 - 865
  • [42] Execution of aspect oriented UML models
    Fuentes, Lidia
    Sanchez, Pablo
    MODEL DRIVEN ARCHITECTURE - FOUNDATIONS AND APPLICATIONS, 2007, 4530 : 83 - +
  • [44] Systematic review on aspect-oriented UML modeling: A complete aspectual UML modeling framework
    Magableh, A., 1600, Asian Network for Scientific Information (13):
  • [45] Integration testing of Object-Oriented and Aspect-Oriented programs: A structural pairwise approach for Java']Java
    Lazzarini Lemos, Otavio Augusto
    Franchin, Ivan Gustavo
    Masiero, Paulo Cesar
    SCIENCE OF COMPUTER PROGRAMMING, 2009, 74 (10) : 861 - 878
  • [46] Contextual integration testing of object-oriented and aspect-oriented programs: A structural approach for Java and AspectJ
    Computer Systems Department, University of São Paulo, Brazil
    Proc. - Braz. Symp. Softw. Eng., SBES, (214-223):
  • [47] Aspect-oriented Programming Techniques in Unit Testing
    Voesgen, Matthias
    Sokenou, Dehla
    COMPUTER SCIENCE-RESEARCH AND DEVELOPMENT, 2005, 20 (1-2): : 57 - 71
  • [48] FlexTest:: An aspect-oriented framework for unit testing
    Sokenou, D
    Vösgen, M
    QUALITY OF SOFTWARE ARCHITECTURES AND SOFTWARE QUALITY, PROCEEDINGS, 2005, 3712 : 257 - 270
  • [49] Automated State-Based Unit Testing for Aspect-Oriented Programs: A Supporting Framework
    Badri, Mourad
    Badri, Linda
    Bourque-Fortin, Maxime
    JOURNAL OF OBJECT TECHNOLOGY, 2009, 8 (03): : 121 - 146
  • [50] Towards a Hybrid Approach to Build Aspect-Oriented Programs
    Bentrad, Sassi
    Khalaf, Hasan Kahtan
    Meslati, Djamel
    IAENG International Journal of Computer Science, 2020, 47 (04) : 1 - 15