黃今慧,張欣欣
北京工商大學計算機與信息工程學院,北京 100048
摘要:提出了一種基于改進的菌群算法測試用例自動生成技術。該方法通過參數編碼的方式使測試用例問題映射到變量空間,通過適應度函數的構造使測試用例問題轉化為優化問題,通過程序插樁的方式實現了算法和被測程序的自動化交互進而自動生成滿足需要的測試用例。經過實驗驗證,
該方法能夠有效地生成覆蓋指定路徑的測試用例,并對效果和參數選擇進行了分析。
關鍵詞: 菌群算法;軟件測試;測試用例生成
Automated Test Cases Generation Based on improved Bacterial Foraging Algorithm
HUANG Jin-hui, ZHANG Xin-xin
(College of Computer and Information Engineering,
Beijing Technology and Business University,Beijing 100048,China)
ABSTRACT:This study proposes a kind of automatic test data generation method based on improved bacterial foraging algorithm. The approach encodes the parameters to map the test case issue into variable space ,construct the fitness function to transform the test case problem into an optimization problem, and instrument the program to achieve automation interaction between the algorithm and the program. After experimental verification,the method could effectively generate test cases that covered the specified path, and then analyzed the effects and parameters selected.
KEYWORDS:bacterial foraging algorithm;software testing;test cases generation
參考文獻:
[3] 傅博. 基于模擬退火遺傳算法的軟件測試數據自動生成[J]. 計算機工程與應用. 2005,12: 82 ~ 84
[4] Pargas R,Harrold M,Peck R. Test Data Generation Using Genetic Algorithms[J]. Journal of Software Testing,Verification & Reliability,1999,9(4):263-282
[5] S.D.Muller, J.Marchetto,S.Airaghi, and P.Koumountsakos,Optimization based on bacterial chemotaxis,IEEE Trans. Evol.Comput. Vol.6,No.1,pp.16-29,Feb,2002.
[6] K.M.Passino,Biomimicry of bacterial foraging for distributed optimization and control,IEEE Control Systems Magazine,pp.53-67,June 2002.
[7] Kennedy J, Eberhart R C. Particle swarm optimization [A]. Proceeding of the 1995 IEEE international conference on Neural Network [C]. Perth,Australia, 1995:1942-1948.
[8] 楊維, 李歧強. 粒子群優化算法綜述[J]. 中國工程學,2004,6(5):87-94
[9] Bogdan Korel. Automated software test data generation[J]. IEEE Transactions on
Software Engineering,1990,16(8):870-879
作者簡介:
黃今慧(1966-),女(漢族),湖南省長沙市人,副教授,碩士研究生導師,主要研究領域為數據倉庫與數據挖掘, 網絡流量分析, 物聯網等。
張欣欣(1987-),女(漢族),湖北省黃石市人,碩士研究生,主要研究領域為軟件測試。