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