Research on Testing Approach for Aspect-Oriented Programs Based on Control Flow and Data Flow

Author
XiongLiPing
Advisor
LiJunYi
School
Hunan University
Major
Computer Science and Technology
Classification
TP311.53 Software Maintenance
Degree
Master's thesis
Year
2013
Downloads
4
Citations
0

Request the full text

Abstract

As a new software deve lop ment techniq ue, AOP (Aspect-Orie nted Progra ms)has brought ma ny adva ntages, but the dependenc ies betwee n aspects and traditio nmode ls, as well as the new features exis ting in AOP, bring new prob le ms. The newcharacteristics o f aspect-oriented progra m make the mature testing tec hniques,currently used in procedura l and object-oriented progra ms, fa il to be applied toaspect-oriented progra ms d irectly. We need to expand the existing methods orpropose new AOP software testing tec hno lo gy, so researching AOP test method isvery necessary with important theoretical significance and practical value.Aiming at the c haracteristics o f AOP, this paper presents a s truc tura l testingapproach based on contro l flow and data flo w, and perfects a test coverage criterio non the bas is o f predecessor’s work. In order to improve productivity, PSO (partic leswarm optimizatio n a lgorithm) was applied to the a uto matic data ge neration in AOP.The main contents include:First o f a ll, we expounded the meas urability of AOP, the necessity a ndpartic ularity of testing AOP, ana lyzed and compared the curre nt methods used intesting AOP. Although the testing covera ge criterion suc h as stateme nt coverage,branch coverage and path coverage etc. are designed in many approaches, they can’tguarantee test co mp lete ly, and has less research on a uto matic test data ge neratio n onAOP.Second ly, we proposed a structura l test approach based on control flow a nd dataflow. BDUC (Block-Definition-Use-Contro l) express ion is used to show the contro lflow a nd data flow for the AOP whic h wa its to be tested. It generates test s ubpathsaccording to the BDUC express ion, and then generates test data to cover thesesubpaths. In order to achieve full covera ge, in the process of test subpaths generatio n,this paper perfects a test coverage criterio n on the bas is of predecessor’s work. Thiscoverage criterio n inc ludes two kinds o f test covera ge criteria based on contro l flowand a coverage criterio n based on data flow. Case study a nd the experime nta l res ultsshow that the testing approach can cover more subpaths to make the test coveragemore fully by add ing a s ma ll a mo unt of test da ta. Based on this work, this paperdesigned and partia l imp le me nted a test tool called CDTT-AJ (Contro l flow and Dataflow Test Too l for AspectJ). The tool inc ludes five co mpone nts: BDUC e xpressio n generato r, test dema nd generato r, progra m ins trumenta tion, te st exec utio n and testmeas ure generator, and the externa l inp uts are the source procedures under test, testcoverage criteria and test data, the output is the test report.Fina lly, this paper put forward an a uto matic test data ge neratio n for AOP basedon PSO. This method ge nerated test subpaths based on BDUC express ion a nd thecomp leted test coverage criteria, and the n generated test data auto matica lly based onPSO, whic h can coverage these subpaths. The experimenta l results show that thenumber o f test data ge nerating to covera ge this subpaths us ing PSO is less tha n thatus ing the rando m a lgorithm and ge netic a lgorithm. The number o f iteratio ns also isless, and the larger the scale of programs is, the more the method has the advantage.

Table of contents

Abstract 5-6 Abstract 6-8 catalog 8-10 illustrations index 10-11 attached table index 11-12 Chapter 1 Introduction 12-17 1.1 background and significance 12-13 1.2 current research 13-15 1.2.1 Situation study abroad 13-14 1.2.2 domestic research status 14-15 1.3 dissertation research 15 1.4 thesis structure 15-17 Chapter 2, aspect-oriented testing techniques outlined 17-32 aspect 2.1 oriented programming techniques 17 -22 2.1.1 AOP Profile 17-19 2.1.2 AOP development steps 19-20 2.1.3 AspectJ Profile 20 -22 2.2 software testing foundation 22-24 definition 2.2.1 software testing 22 2.2.2 test Category 22-24 2.2.3 software testing process 24 aspect 2.3 oriented test basis 24-31 2.3.1 testability 24-25 <br / > 2.3.2 necessity and specificity of the test 25-26 2.3.3 AOP error model 26-27 2.3.4 AOP classification and comparison of test methods 27-31 2.4 Summary 31-32 Chapter 3, based on the structure of control flow and data flow testing methods 32-44 3.1 BDUC expressions 32-34 3.2 test method based on the structure of control flow and data flow 34-35 3.3 control flow and data flow test coverage criteria 35- 38 3.3.1 test coverage criteria based on control flow 36 3.3.2 test coverage criteria based on data flow 36-38 3.4 Case Study 38-41 3.5 experimental results design and implementation of test tools CDTT-AJ 3.6 of nbsp 41-42 ; 42-43 3.7 Summary 43-44 Chapter 4 based on particle swarm optimization algorithm to automatically generate test data 44-57 4.1 automatic test data generation method 44-45 4.2 PSO 45-48 4.2.1 Fundamentals 45-46 4.2.2 algorithm flow 46-47 4.2.3 the basic features of the algorithm 47 4.2.4 particle Swarm Optimization and Genetic Algorithm comparison 47-48 4.3 based on particle swarm optimization algorithm to automatically generate test data 48-51 4.3.1 object-oriented test data generation algorithm aspect 48-49 4.3.2 for test data generation algorithm 49-51 4.4 instance analysis 51-53 4.5 experiment 53-56 4.5.1 experimental environment 53 4.5.2 experiment 53- 55 4.5.3 experimental results 55-56 4.6 Summary 56-57 conclusion 57-60 references 60-67 Thanks 67-68 Appendix a ( published during the study for a degree thesis and results obtained ) 68-69 Appendix B ( during the study for a degree to participate in research projects ) 69

Related dissertations

  1. The Relationship between the Company Social Responsibility and Profitability: Take the Listed Manufacturing Companies as an Example
    HuRui ·Hunan University of Technology ·2013 ·Master's thesis
  2. Research on Hyperspectral Remote Sensing Image Classification Based on LS-SVM
    GuoXueLan ·Central South University ·2013 ·Master's thesis
  3. Research on Obstacle Avoidance Planning and Trajectory Tracking for Deicing Robot on Transmission Lines
    ChenYanJie ·Hunan University ·2013 ·Master's thesis
  4. Research and Application of Interval Optimization Algorithm
    FangShaoChun ·Northeastern University ·2012 ·Master's thesis
  5. Research on Trading Agent SCM Model and Optimization Method
    ZhouJinYuan ·Harbin Engineering University ·2013 ·Master's thesis
  6. Research and Application on Particle Swarm Optimization Multi-objective Evolutionary Algorithm
  7. Cross-iteration Particle Swarm Optimization and Its Application in Combination Auction
    ZhiDongSheng ·Harbin Institute of Technology ·2013 ·Master's thesis
  8. Research on Risk Assessment of Real Estate Investment Based on the Improvement PSO-BP
    OuWei ·Hebei University of Engineering ·2013 ·Master's thesis
  9. Research and Application of a Hybrid Dynamic Multi-swarm PSO Algorithm with Nelder-Mead Simplex Method
    XiangYi ·Guangzhou University ·2013 ·Master's thesis
  10. Improved particle swarm optimization algorithm
    DiJinTao ·Shaanxi Normal University ·2013 ·Master's thesis
  11. Study on Resources Scheduling Based on ACO Algorithm and PSO Algorithm in Cloud Computing
    WenXiaoTang ·Jiangxi Normal University ·2013 ·Master's thesis
  12. Based on Particle Swarm Optimization and Taboo Search Algorithms Solving Job Shop Scheduling Optimization Problems
    LiYanPeng ·Dalian Jiaotong University ·2013 ·Master's thesis
  13. Research on Demand Forecasting of Coal Port Spare Parts Based on LS-SVM
    FuZan ·Yanshan University ·2013 ·Master's thesis
  14. Study on the Calculation of Economic Dispatch of Power System Based on Improved Particle Swarm Optimization Algorithm
  15. Particle Swarm Optimization Based Dynamic Optimization Research
    ZhouYou ·Zhejiang University ·2014 ·Master's thesis
  16. Generalized Predictive Control Based on Particle Swarm Optimization and Differential Evolution
    WuMiMi ·Zhejiang Sci-Tech University ·2014 ·Master's thesis
  17. The Research of Dynamic Resource Management Key Technologies in Cloud Computing
    FanYing ·Zhejiang Sci-Tech University ·2014 ·Master's thesis
  18. Offline particle swarm algorithm and support vector machine Chinese characters recognition based on the study of handwritten
    ChenYongChun ·Tianjin Normal University ·2013 ·Master's thesis
  19. Research on3D Scene Reconstruction Technique Based on Multiple View
    LiJing ·Guangdong University of Technology ·2013 ·Doctoral dissertation
  20. A Study on Feature Selection Algorithm Based on SVM-RFE and Particle Swarm Optimization
    XuLu ·Hunan Normal University ·2014 ·Master's thesis