Research on Unit Testing Technique of Aspect-Oriented Programs

Author
ChenLingHe
Advisor
MaoXiaoGuang
School
National University of Defense Science and Technology
Major
Computer Science and Technology
Classification
TP311.52 Software Development
Degree
Master's thesis
Year
2008
Downloads
73
Citations
2

Request the full text

Abstract

As a new technique, Aspect-oriented programming(AOP) is gaining popularity for its ability of modularizing crosscutting concerns of a software system. However, same like other programming languages, AOP brings some challenges as well as advantages. It is difficult to test aspect-oriented programs with traditional ways for its new characteristic. Hence, lacking of mature techniques for aspect testing will be a bottleneck problem of preventing aspect-oriented programming from massive application.This paper analyses the core issues of testing aspect-oriented programs. Based on AspectJ programs, we present a new way to test aspectual behavior. Surveying the research about unit tesing of aspect-oriented programs reveals the advantages of our solution. From the views of testing implementation and automated test, we make a study of the unit testing framework of AspectJ programs and the strategy of automated test generation for the programs. With the help of Java annotation and reflection mechanism, each tested aspectual can be associated with a tesing object. After analysing the characters of compiled aspect, we set up a rule of parsing the tested aspect. The strategy automates the testing process by using techniques of generating test cases randomly, supplemented by optimizing of test cases with respect to test adequacy criterion, and from certain paths as well. The paper implements AJUnit, a framework for automatically generating unit tests for AspectJ programs. AJUnit includes three parts: the main framework, the automated testing data generator and automated testing code generator. Finally, we test and analyse an example of AspectJ program.The tool introduced in this paper can help to unit test aspect-oriented programs. It improves efficiency of aspect-oriented software development and insures programs with reliability and creditability.

Table of contents

Abstract 9-10 ABSTRACT 10-11 first chapter 11-15 the 1.1 research background and significance 11-12 1.2 research content 12-13 1.3 thesis structure 13-14 1.4 thesis research 14-15 The second chapter of the aspects of the program test 15-29 2.1 AOP Overview 15-21 2.1.1 crosscutting concerns 16-18 2.1.2 AOP principle 18 2.1.3 AOP language parsing 18-20 2.1.4 using the benefits of AOP 20-21 2.2 the AOP and software testing techniques 21-26 2.2.1 software testing methods 21-23 2.2.2 AOP technology test application 23 2.2.3 aspects of program testing 23-26 2.3 AspectJ 26-28 2.3.1 AspectJ About 26 2.3.2 AspectJ language mechanisms 26-28 2.4 This chapter Summary 28-29 Chapter aspects program unit test 29-38 3.1 aspects of the program unit test About 29-31 3.1.1 aspects of the program unit test target 30 3.1.2 aspects of the program unit test test object classification 30-31 3.1.3 aspects of the program unit tests exist 31 3.2 aspects of the program unit test solve ways 31-33 3.3 Related research 33-37 3.4 This chapter Summary 37-38 Free weaving testing framework 38-50 4.1 weaving mechanisms Profile 38-39 4.2 woven into the rear test analysis 39-40 4.3 Non-woven into the test framework 40-49 4.3.1 Java5 Annotation comment symbol Introduction 40 4.3.2 use annotation to establish the test method of mapping to 40-43 4.3.3 unit testing framework principles and processes 43-49 4.4 This chapter Summary 49-50 Chapter automatic test data generation strategy 50-58 5.1 test data generation method 50 5.2 test data generation method of analysis 50-52 5.3 test data automatically generated policy 52-57 5.3.1 test data generation strategy described 52-53 5.3.2 improved adaptive Lang Gelang relaxation algorithm analysis 53-56 5.3.3 test data generation strategy process automatically 56-57 5.4 This chapter Summary 57-58 the sixth chapter of the program unit testing tools Design and Implementation 58-74 6.1 Free woven into the overall design of automated testing tools 58-59 6.1.1 design framework 58-59 6.2 core test framework design to achieve 59-63 the the 6.2.1 core test framework design 59-60 6.2.2 test run platform implementation 60-63 6.3 automatic test data generation tool designed to achieve 63-66 6.3.1 test data automatically generated principles of design 63 6.3.2 test data automatically generated to achieve 63-66 6.4 test code design and implementation tools automatically generate 66-68 6.4.1 Principle and Design of test code generation 66 6.4.2 test code generator implementation 66-68 6.5 Case Study 68-73 6.5.1 aspects of program instances 68-70 the 6.5.2 AJUnit generate test data 70 6.5.3 AJUnit generate test code 70-72 6.5.4 Test results analysis 72-73 6.6 Chapter Summary 73-74 Chapter VII Conclusion 74-75 7.1 Full-text work summarizes 74 7.2 less than the future of work 74-75 Acknowledgements 75-76 the References 76-81 of the school during the academic achievements 81

Related dissertations

  1. Research on Aspect Conflict of Aspect-Oriented Software Development
  2. Design and Implementation of AspectJ Source Weaver for Incremental AOSD
    LiuZuoXia ·Jinan University ·2010 ·Master's thesis
  3. Research on Software Technology in HVDC Transmission Design Software Package
    LiZhiPeng ·Zhejiang University ·2014 ·Master's thesis
  4. The Design and Implementation of Software Auto Test System Based on Enodeb Control Plane
  5. Unit Testing Technology and Its Application Based on Java ME
  6. Unit Testing Strategies and Methods of Lightweight J2EE Applications System
  7. Research on Abstract Memory Modeling Technology Supporting Test Case Automatic Generation of Non-Numeric Data Type
  8. Research of Aspect-Oriented Refactoring Technique
    HouXiaoYu ·Harbin Engineering University ·2012 ·Master's thesis
  9. Research and Application on Unit Testing Technology for Object Oriented Program by CppUnit
  10. An Aspect-Oriented Modelling Approach of Embedded Software Product Line and Its Supporting Tool
    WuPengYuan ·Jilin University ·2013 ·Master's thesis
  11. The Research and Application in the Unit Testing by Using JUnit Framework
  12. Research and Application of Interlocking Software Automatic Testing Technology
    LiuJianHua ·Lanzhou Jiaotong University ·2013 ·Master's thesis
  13. A Generative Domain Engineering Method Based on Agent Technology
    LiangHaiHua ·Zhejiang University ·2008 ·Doctoral dissertation
  14. Execution of GPS Navigation Software Testing Based on VSTS
  15. Research and Application of Software Unit Test
    FengLi ·Central China Normal University ·2008 ·Master's thesis
  16. Aspect-Oriented Resource Model of Dynimic Heterogeneous Distributed Real-Time Systems in Grid Environment
    ZhaoTianHui ·Guangdong University of Technology ·2008 ·Master's thesis
  17. Design and Implementation of Testing Aspects Interaction Tool for Aspect-Oriented Programs
    ZhuangXuJie ·Shanghai Jiaotong University ·2007 ·Master's thesis
  18. Dynamic Coupling Measurement for Aspect-Oriented Software
    YangZuo ·Shanghai Jiaotong University ·2008 ·Master's thesis
  19. Study and Implementation of Pipa and Its Runtime Assertion Checking Compiler
    WangDai ·Shanghai Jiaotong University ·2008 ·Master's thesis
  20. Research on AOP-Based Design by Contract and the Language and Tool to Support It
    XuZuoYing ·East China Normal University ·2008 ·Master's thesis