当前位置:网站首页>Main path coverage and base path coverage
Main path coverage and base path coverage
2022-07-20 10:40:00 【Will our factory win the championship today】
1. Simple path
The English of simple path is :Simple Path : A path from node ni to nj is simple if no n ode appears more than once, except possibly the first an d last nodes are the same. Translated into Chinese, it means : In addition to the initial node and the termination node , No node in the path appears twice , Then it's a simple path
2. The main path
Prime Path : A simple path that does not appear as a proper subpath of any other simple path .
The main path : This means that this simple path cannot be a sub path of a longer simple path , That is, it cannot be included by other simple paths , We call this path the main path .
The difference in dc-path, Definition - The cleanup path has the initial node DEF(V,M) And final node USE(V,N) Of path In the path , Make the path No other node is v Definition node of .
3. Base path
Independent path : It refers to a path of a group of statements or conditions that have not been processed before .
The basic path : The set of all independent paths in the control flow graph constitutes the basic path set
4. give an example
Simple path : Only one node :[1],[2],[3],[4] There are two nodes :[1,2],[1,3],[2,4],[3,4],[4,1] There are three nodes :[1,2,4],[1,3,4],[2,4,1],[3,4,1],[4,1,2],[4,1,3] There are four nodes :[1,2,4,1],[1,3,4,1],[2,4,1,2],[2,4,1,3],[3,4,1,2],[3,4,1,3],[4,1,2,4],[4,1,3,4]
The main path :[1,2,4,1],[1,3,4,1],[2,4,1,2],[2,4,1,3],[3,4,1,2],[3,4,1,3],[4,1,2,4],[4,1,3,4]
5. Compare the differences
Simple path coverage :[1],[2],[3],[4],[5],[6],[1,2],[2,3],[2,4],[3,5],[4,5],[5,2],[2,6][1,2,3],[1,2,4],[2,3,5],[2,4,5],[3,5,2],[4,5,2],[5,2,6],[1,2,3,5],[1,2,4,5],[2,3,5,2] [2,4,5,2],[3,5,2,6],[4,5,2,6],[2,3,5,2,6],[2,4,5,2,6]
Main path coverage :[2,3,5,2,6],[2,4,5,2,6]
basis path coverage :[1,2,3,5,2,6],[1,2,4,5,2,6],[1,2,6]
summary :
- The main path coverage is to program design test cases , Make as many test cases pass through the edges of the control flow diagram as possible without forming a ring . List all paths with each node in the main path as the starting point .
- Base path testing refers to analyzing the loop complexity of control structure , Export the collection of basic executable paths , So the way to design test cases . The designed test case should ensure that every executable statement of the program is executed at least once in the test . It includes 5 In terms of : 1. Design the source code according to the detailed design , Draw the program flow chart of the program . 2. According to the program flow chart , Draw the control flow diagram of the program 3. Calculate the loop complexity of the program 4. Find the independent path 5. Design test cases
边栏推荐
- Lord Liu. Pytoch deep learning practical learning.
- Introduction to dark horse programmer reflection
- Single arm routing and VRRP
- 探索一下自增自减运算符的使用方式
- (一)DDL、DML、DQL、DCL与常见数据类型
- Installation management program
- gocore-v2框架-快速开始
- VLAN overview
- Unable to get browser (Selenium::WebDriver::Error::NoSuchWindowError)
- ftp port
猜你喜欢
随机推荐
简单的Map集合练习题
优化器:torch.optim
[turn] method to solve memory / video memory leakage pytorch
多数据源切换
建造者模式
invalid syntax
How to turn a computer without public IP in a LAN into a server accessible to the public network (SSH access as an example)
Pytorch:Dataset总结
iptables examples
firewall-cmd
ModuleNotFoundError: No module named 'gflags'
狂神。MySql学习。
Nacos - 配置管理中心(阿里开源)
Unable to get browser (Selenium::WebDriver::Error::NoSuchWindowError)
畅玩树莓派4B(一)树莓派系统安装和SSH连接
CUDA 环境搭建
ftp port
Gocore-v2 framework - quick start
几种连接查询的细节讲解
今天学习定位