請用此 Handle URI 來引用此文件:
http://tdr.lib.ntu.edu.tw/jspui/handle/123456789/46239
標題: | 利用基因演算法挑選測試案例於系統核心模型上覆蓋率分析 Application of Genetic Algorithm on Test Case Selection against State Coverage of Kernel Code |
作者: | Tzu-Hsiang Lin 林子翔 |
指導教授: | 王凡(Farn Wang) |
關鍵字: | 基因演算法,覆蓋率,模型測,測試案例, genetic algorithm,coverage ratio,model testing,test case, |
出版年 : | 2010 |
學位: | 碩士 |
摘要: | 利用RED LIB對系統程式進行自動化測試
作業系統的核心是一個很複雜的系統,其中包含了許多軟體的互動和運作上面的協調,若要對核心中的一個檔案或元件做測試,會因為使用者無法直接對待測物件操作,必須經由使用者層的應用程式來替代,使得測試過程更加困難。 將待測物及作業系統轉換成我們定義的模型語言,藉由待測物模型與作業系統模型間的互動取代軟硬體及作業系統的互動,以達到自動化測試,提高測試的效率,並降低測試成本。 當我們有待測物的模型與測試案例(test case),要測試程式覆蓋率(coverage ratio),一般會將測試案例一一輸入後再統計覆蓋率多高,但當測試案例的數量一多就會花費相當多的時間,又如果測試案例為隨機亂數產生的,其中可能有許多相似的案例,所以我們提出將測試案分類後再將從每類中抽出案例樣本來進行覆蓋率測試,以減少花費在相似性高的案例上的時間。 我們利用基因演算法去找出最佳分類法,我們認為相似的案例執行後,會走過類似的模型或是函數,因此我們利用字串比對作為分類的依據,再利用基因演算法找出最佳分類,經過訓練後我們只抽出每類中的某些案例來執行,不但降低許多執行時間,也可以達到將所有案例執行後的覆蓋率。針對同一個待測物,即使換了一組全新的測試案例我們也不需再次訓練,直接使用先前訓練後的結果也可達到效果。 We propose kernel code coverage analysis on model testing instead of testing on user application software, system software, and perform the testing on generating the commands in command line interfaces. In our approach, we can gain much higher coverage ratio than the used testing approach. We also can save more testing time or testing cost and save important information or error message when system crash occurs. We also propose an approach use a genetic algorithm to find a appropriate way to clustering those test cases, so that testers don’t need to run every test case; they just pick few test cases from every cluster to run, and they can evaluate the whole test case bases will gain how much coverage ratio. For the same target, there is no need to train again, we can just follow the rule we have found to clustering. Our technique provides a more efficient and more accurate way to analyze coverage ratio. |
URI: | http://tdr.lib.ntu.edu.tw/jspui/handle/123456789/46239 |
全文授權: | 有償授權 |
顯示於系所單位: | 電子工程學研究所 |
文件中的檔案:
檔案 | 大小 | 格式 | |
---|---|---|---|
ntu-99-1.pdf 目前未授權公開取用 | 2.48 MB | Adobe PDF |
系統中的文件,除了特別指名其著作權條款之外,均受到著作權保護,並且保留所有的權利。