摘要
圈复杂度是一种代码复杂度的衡量标准。在软件测试中,圈复杂度可以用来衡量一个模块判定结构的复杂程度,数量上表现为独立路径条数,即合理的预防错误所需测试的最少路径条数。圈复杂度计算为软件流程测试用例的生成起到极大的辅助作用,并便于对软件质量进行度量。实践经验表明,圈复杂度与程序中存在的缺陷数量有着很大的相关性,本文就圈复杂度在实际项目中的应用进行了探讨。
Cyclomatic complexity is a benchmark of code complexity. In software testing, cyclomatic complexity can be used to measure the complexity of a decision structure. The quantity of decision structure can be described as the number of independent path, which also means the minimum path number to test to prevent error. Cyclomatic complexity calculation plays a significant role in generating test cases for software business flow. Cyclomatic complexity calculation is convenient to measure the software quality. The paper indicates that cyclomatic complexity is greatly related to the number of bugs in software, also discusses the application of cyclomatic complexity in a practical project.
基金
软件专业技术服务平台建设与完善(10DZ2291800)
关键词
圈复杂度
软件质量
测试用例
流程
Cyclomatic Complexity Software Quality Test Case Business Flow