程序结构与测试用例个数的关系-毕业设计论文 下载本文

本 科 毕 业 设 计

题 目:程序结构与测试用例个数的关系

程序结构与测试用例个数的关系

摘要:测试用例的产生是软件测试过程中的重要环节,测试用例的数量直接关系到测试的工作量。测试用例的数量选择是进行测试的一个难题,测试用例个数合适与否直接关系到产品质量。随机测试可以避免出现测试偏见,随机测试用例个数的设计对软件测试至关重要。本文针对究竟多少随机测试用例才是充分的这一问题进行探讨,在研究和分析国内外大量有关文献资料的基础上,设计程序插桩,研究不同程序结构在基路径测试中对测试用例个数的影响。将实验得到的数据拟合得出公式,最后用判定三角形的程序进行验证。 关键词:程序结构;基路经;随机测试;数据拟合

The relationship between program structure and the

number of test case

Abstract: The generation of test cases is the important link in the process of software testing , testing is directly related to the number of test cases. The number of test cases selection is a problem for the test, the test case number right or not directly related to the quality of the product. Random testing can avoid bias, random number of test case design is very important to software testing. Based on how many random test cases are fully discusses this problem, in the research and analysis, on the basis of a lot of relevant literature at home and abroad, the design program pile, the different program structure in the base path tests the impact on the number of test cases. The data obtained by the experiment data fitting formula, validated with determination of the triangle program finally. Key word: Program Structure;Base Path ;Random Testing; Data Fitting

目录

程序结构与测试用例个数的关系 ............................. 1 一、绪论 ................................................ 1

1.1论文研究背景和意义 ........................................... 1 1.2软件测试的目的 ............................................... 1 1.3论文研究内容 ................................................. 1

二、软件测试技术 ........................................ 2

2.1软件测试概述 ................................................. 2 2.2软件测试技术的分类 ........................................... 2 2.3软件测试的阶段划分 ........................................... 2 2.4 软件测试存在的问题 ........................................... 3 2.5测试用例的选择 ............................................... 3 2.6测试用例自动化生成技术 ....................................... 4 2.7结构性测试 ................................................... 4 2.7.1路径测试 ................................................... 4 2.7.1.1基路径测试 ............................................... 5 2.8随机测试 ..................................................... 5

三、程序结构 ............................................ 6

3.1方法简述 ..................................................... 6 3.2系统结构图 ................................................... 6 3.3程序结构图 ................................................... 7

四、程序结构与测试用例个数的研究 ........................ 10

4.1程序控制流图 ................................................ 10 4.2程序算法的实现 .............................................. 14 4.3程序插桩 .................................................... 19