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

利用類神經網路與程式片段技術之回歸測試

Regression testing based on neural networks and program slicing techniques

指導教授 : 王凡

摘要


軟體測試,是用來促進鑑定軟體的正確性、完整性、和品質的過程。而回歸測試是軟體測試的一環,在軟體維護階段,為了檢測程式有無經修改而引入新的錯誤,以及檢查之前能運作的功能, 是否仍能正確無誤地被執行所進行的測試。回歸測試是軟體維護階段的很重要的一部份。 在回歸測試中,一個很重要的困難是,測試者無法得知程式經由修改後,會引發哪些其他部分發生問題。關於這個部分,本篇論文提出了由學習為基礎的方法來解決。在本篇論文中,我們使用利用類神經網路為基礎之架構,來建立學習機制,藉此來動態地排序測試用例的執行修先權。首先我們在原始程式中加入了InTOL,它是一個智型測試判別器,可幫助我們輸出程式片段中我們想要的資訊,我們用InTOL來收集測試範例的行為軌跡;接著,我們把修改後的程式與原始程式做比對,找出對程式中有影響的片段,然後我們把這些片段跟測試用例的行為軌跡做對照,找出可能會影響測試用例執行的程式片段中的特別的事件,以此為特徵值;而後,執行所有的測試範例,把執行結果當作優先權選擇的判斷,最後,使用FANN來模擬出一個簡單的類神經網路,把我們抓出可能會影響測試用例執行結果的特徵值,當作類神經網路的輸入節點,而測試用例的執行結果當作輸出節點,在學習階段時,同時給類神經網路輸入與輸出的資訊,讓它自己學習出一套代表輸入與輸出關係的數學函式,接著,進入測試階段,給予類神經網路輸入的資訊,讓它以學習好的網路,自動預測出輸出結果。我們把最後的輸出結果當作測試用例的修先權選擇的數值。 我們使用的實驗程式為SIR程式,它是目前很有公信力的測試程式,我們由中間選擇了兩個來做實驗,發現在我們的實驗架構下,找到修先執行的測試用例,確實具備有良好的偵錯能力,在實驗結果中,我們跟其他做回歸測試的數種方法做比較,發現我們的表現也比其他技術更為優異,也能大大縮短測試的時間。我們的未來研究的目標,是除了能測試程式的正確性,也能找出錯誤的精確位置。

並列摘要


Software testing is an investigation conducted to provide programmers with information about the quality of the product or service under test. There are many different methods for software testing, but we only find the bugs and defects as possible as we can rather than ensuring the software is absolutely correct. Regression testing is a type of software testing, which is retesting modified software to ensure that changes are correct and do not adversely affect other parts of the software. It is commonly observed that a software fix could cause other bugs and all this affects the quality and reliability of the system. Hence, regression testing is necessary and plays an important role in any Scenario where a change has been made to a previously tested software code. One of the main difficulties for regression testing is that it's often extremely hard for a programmer to figure out how a change in one part of the software will echo in other parts of the software. Owing to the reason, we develop a learning-based method to solve the problem. In our thesis, we describe a new framework with neural-network learning for dynamically prioritizing the test cases. First we add the Intelligent Test Oracle Library (InTOL) in accordance with our requirements to the original program and it will generate the test traces. And when getting a modified version, we slice the original and modified programs. Then we relate the slicing information with the test traces we collect in advance. Second, we get the execution results of test case through the modified program as the test case prioritization. Finally, we use Fast Artificial Neural Network (FANN), a free open source library and which can be used from C and C++, to build a model of the human brain's own neural-network. Then, utilize NN training the relations of features from the traces and slicing for test cases prioritization. We experiment with two benchmarks which are the Software-artifact Infrastructure Repository (SIR) programs to check the performance of our techniques. Our experiment data shows that the test cases we select has good fault-detection ability. In the future work, we want to find the location of the fault and try to fix it.

參考文獻


[3] Fevzi Belli, Mubariz Eminov, and Nida Gokce, Model-Based Test Prioritizing – A Comparative Soft-Computing Approach and Case Studies, Springer-Verlag Berlin Heidelberg 2009
[4] Yu-Shen Su, Chin-Yu Huang, Neural-network-based approaches for software reliability estimation using dynamic weighted combinational models, The Journal of Systems and Software 80, 2007
[5] Yih-Farn Chen, David S. Rosenblum, Kiem-Phong Vo, TestTube: A System for Selective Regression Testing, Research Paper. IEEE 1994
[6] Sebastian Elbaum, Alexey G. Malishevsky, Gregg Rothermel. Prioritizing Test Cases for Regression Testing. ISSTA 2000
[7] Gregg Rothermel, Roland H. Untch, Chengyun Chu, Mary Jean Harrold, Prioritizing Test Cases for Regression Testing. IEEE Transactions on Software Engineering, VOL. 27, NO. 10, OCTOBER 2001

延伸閱讀