透過您的圖書館登入
IP:3.22.70.230
  • 學位論文

物件導向程式演化至觀點導向程式之回歸測試

Regression Testing for Aspect-Oriented Programs Evolved from Object-Oriented Programs

指導教授 : 劉建宏
若您是本文的作者,可授權文章由華藝線上圖書館中協助推廣。

摘要


觀點導向程式設計(Aspect-Oriented Programming,簡稱AOP)允許程式開發人員實現關注點分離(Separation of Concerns,簡稱SoC),如此便能將散佈於各個函式和類別間的橫切關注點(cross-cutting concerns)模組化,使程式易於維護,因此近年來觀點導向程式逐漸的受到開發人員的歡迎。特別地,觀點導向程式能夠將橫切關注點透過觀點表達出來,並將型態間宣告(inter-type declarations)、切入點(pointcuts)與通知函式(advices)封裝在其觀點中,再透過織入(weaving)將觀點與物件導向程式整合在一起。而當物件導向程式演化至觀點導向程式時,由於觀點織入物件導向程式時可能會改變物件導向程式原來的行為,導致程式的行為變得更為複雜且難以理解。為了確保織入的觀點沒有引起新的錯誤,因此必須針對觀點導向程式重新進行測試。有鑑於此,本篇論文提出一個當物件導向程式演化至觀點導向程式的回歸測試(regression testing)方法。這個方法主要包含兩個部分:(1)系統化地從控制流程與資料流程的角度來分析因觀點的織入所造成的改變衝擊(change impacts);(2)擴充JUnit框架以支援對通知函式的單元測試與切入點宣告的測試。此外,我們開發一套輔助工具,協助觀點導向程式的回歸測試,以減輕測試人員的負擔。

並列摘要


Aspect-Oriented Programming (AOP) allows programs to achieve Separation of Concerns (SoC) so that cross-cutting concerns scattered across several methods and classes in the programs can be explicitly modulized and, hence, programs can become easy to maintain. As a consequence, AOP is gradually gaining popularity among developers in recent years. Particularly, in AOP a cross-cutting concern can be expressed and encapsulated in an aspect that contains inter-types, pointcuts, and advices and can be woven into an object-oriented (OO) program. When object-oriented programs evolve to aspect-oriented programs, the behavior of the evolved programs can become complex and hard to understand because the aspects woven into OO programs can alter the original behavior of the programs. To assure that no additional errors are introduced by the woven aspects, it is critical to retest the evolved aspect-oriented programs. This thesis proposes a regression testing approach for aspect-oriented programs evolved from object-oriented programs. The approach consists of two parts: (1) a method for systematically analyzing the change impacts caused by woven aspects from the control flow and data flow perspectives and (2) an enhancement of JUnit framework to support the testing of advices and pointcuts. In addition, a supporting tool is also developed to facilitate the regression testing of aspect-oriented programs so as to reduce required test effort.

參考文獻


[18] Chien-Hung Liu and Chuan-Wen Chang, “A State-Based Testing Approach for Aspect-Oriented Programming,” Journal of Information Science and Engineering, Vol.24, No.1, pp.11-31, January 2008.
[6] Mauro Pezzè and Michal Young, Software Testing and Analysis: Process, Principles, and Techniques, John Wiley & Sons, 2008, pp.427-437.
[8] Jianjun Zhao, Tao Xie, Nan Li, “Towards Regression Test Selection for AspectJ Programs,” In Proceedings of the 2nd workshop on Testing aspect-oriented programs, pp. 21-26, 2006.
[10] Jianjun Zhao, “Change Impact Analysis for Aspect-Oriented Software Evolution,” In Proceedings of the International Workshop on Principles of Software Evolution, pp. 108-112, 2002.
[12] Guoqing Xu, “A Regression Tests Selection Technique for Aspect-Oriented Programs,” In Proceedings of the 2nd workshop on Testing aspect-oriented programs (WTAOP’06), pp. 15-20, 2006.

延伸閱讀