【英文題名】 | Study on the Method of Automatic Test Generation of Non-Numeric Data Based on Genetic Algorithms |
【作者】 | 李翠翠; |
【導師】 | 趙瑞蓮; |
【學位授予單位】 | 北京化工大學; |
【學科專業(yè)名稱】 | 計算機應用技術 |
【學位年度】 | 2006 |
【論文級別】 | 碩士 |
【網(wǎng)絡出版投稿人】 | 北京化工大學 |
【網(wǎng)絡出版投稿時間】 | 2006-09-13 |
【關鍵詞】 | 測試數(shù)據(jù)自動生成; 遺傳算法; 適應度函數(shù); 非數(shù)值型數(shù)據(jù); |
【英文關鍵詞】 | automatic test data generation; genetic algorithms; fitness function; non-numeric data; |
【中文摘要】 | 作為保證軟件質(zhì)量、提高軟件可靠性的重要手段,軟件測試在軟件開發(fā)過程中起著不可替代的作用,而測試數(shù)據(jù)生成則是測試階段最關鍵的技術問題之一。目前已有許多測試數(shù)據(jù)自動生成的方法,但大多只涉及數(shù)值型測試數(shù)據(jù)的產(chǎn)生及選取原則,在實際應用中非數(shù)值型數(shù)據(jù)使用相當普遍,如字符串數(shù)據(jù),這在一定程度上限制了軟件測試技術的應用。因此,探討如何實現(xiàn)非數(shù)值型軟件測試數(shù)據(jù)的自動生成,有著很現(xiàn)實的意義。 遺傳算法是一種模仿生物遺傳和進化機制的最優(yōu)化方法,它將基因的交叉、變異、重組等概念引入到算法的求解過程中。目前,遺傳算法已逐漸運用到軟件測試數(shù)據(jù)生成中。 本文提出了一種基于遺傳算法的非數(shù)值型軟件測試數(shù)據(jù)自動生成的方法,定義了路徑適應度函數(shù)和字符適應度函數(shù),并詳細描述了測試數(shù)據(jù)生成過程。該方法能夠根據(jù)程序執(zhí)行路徑上含有的謂詞中的關系運算符,自動選用路徑適應度函數(shù)或字符適應度函數(shù),以指導給定路徑的非數(shù)值型軟件測試數(shù)據(jù)自動生成。同時,將該方法與文獻[1]所述方法進行比較分析,并應用于部分程序的測試數(shù)據(jù)生成,實驗結果表明:本文提出的方法具有較好的可行性和實際效果。 |
【英文摘要】 | As an important means to guarantee software quality and enhance software reliability, software testing plays an irreplaceable role in the process of software development. And during the test process one of the most important problems is the test data generation. Now there are many techniques to automatically generate software testing data, but most of the methods only deal with numeric value. In fact the non-numeric data, such as character string, are widely used, and it limits the application of software t... |