针对软件测试中功能测试用例集的数量较大且覆盖率较低的问题,提出一种基于支持向量机的测试用例自动生成方法.利用PICT测试工具产生输入参数的两组合或三组合的数据集作为典型样本集,为待测试软件的输入输出关系训练SVM网络功能模型.实验结果表明,训练好的模型可有效地预测出n-way组合的输入数据对应的期望结果,实现自动生成数量较小且覆盖率更高的测试用例集.
Aiming at the problems that the number of test cases of functional testing is pretty high and the coverage of it is really low in software testing, a method that based on the support vector machine (SVM) was proposed to generate test cases automa-tically.The data sets generated from PICT testing tool which produced 2-way or 3-way combinations of input parameters were taken as typical samples and SVM was used to train the functional model that was taken as the input-output relationship substitute for software under test.Experimental results show that the trained model can effectively predict the expected result which is corresponding to n-way combinations of input data, reaching the goal of automatically generating the test cases with smaller quantity and higher coverage.