当前位置:网站首页>Software testing and quality learning notes 3 -- white box testing
Software testing and quality learning notes 3 -- white box testing
2022-07-06 11:09:00 【Pingguo stuffed with rice cakes】
1. Two kinds of white box test Common technology :
Coverage test : During the test , Tests that aim to cover certain program elements .
Path test : Speaking from the flow chart , One execution of the program corresponds to a path from entry to exit , Path tests are path tests . In a broad sense , Any test related to path analysis can be called path test .
2. White box testing -- The basic path method
On the premise that all paths cannot be covered , If every independent path of a program has been tested , Then it can be considered that every statement in the program has been verified , That is, the statement coverage . This test method is commonly known as Basic path test method .
3. The control flow chart
It can be abbreviated as flow graph , It is obtained by simplifying the program flow chart , It can more prominently represent the structure of program control flow .
The control flow diagram includes two graphical symbols : Nodes and control flow lines .
node Represented by a marked circle , It can represent one or more statements 、 A sequence of processing boxes and A condition decision box .
Control flow line Represented by an arc or line with an arrow , Can be called edge . It represents the control flow in the program .
Be careful : Every circle Representing control flow graph node , It can represent one or more statements . The number in the circle corresponds to the number of a line in the program ( That is, you can write multiple numbers ). The arrow represents the direction of the edge , That is, control the flow direction
See the picture for details


among , Nodes that contain conditions are called decision nodes ( Also called predicate node ), The edge from the decision node must end at a node , The range bounded by edges and nodes is called a region .
4. Graph matrix
The graph matrix is Matrix of control flow graph Representation form .
The graph matrix is a square matrix , Its dimension is equal to the number of nodes of the control flow graph . Each column and row in the matrix corresponds to the identified node , Matrix elements correspond to edges between nodes .
Usually , In the control flow diagram Nodes are identified by numbers , The side is marked with letters . If in the control flow diagram, from i Node to j Nodes have an ID of x The edges of are connected , Then in the corresponding graph matrix The first i Xing di j Column There is a non empty element x.
5. Ring complexity and its calculation method
Ring complexity is also called cycle complexity , Based on graph theory , It provides us with very useful software metrics . The ring complexity can be calculated by one of the following two methods :
Method 1: Given control flow diagram G Ring complexity 1 v(G), Defined as
v(G)=E-N+2 Ring complexity = The number of sides - Number of nodes +2
among ,E Is the number of edges in the control flow graph ,N Is the number of nodes in the control flow graph .
Method 2: Given control flow diagram G Ring complexity 1 v(G), It can also be defined as
v(G)= P+1 Ring complexity = Determine the number of nodes +1
among ,P Is the control flow diagram G Determine the number of nodes in .
6. Independent path
It refers to the program path in which at least a new set of processing statements or a new condition is introduced into the program .
Adopt the terminology of flow graph , That is, the independent path must Include at least one edge that has not been used before defining the path this time .
Be careful :“..." Indicates that the remaining paths are optional , The reason is that there is a circular structure .
7. Basic path test method test steps
· Basic path test steps :
1. Draw the control flow diagram of the program
2. Computational flow graph G The complexity of the loop V(G)
3. Determine the basic path set that contains only independent paths
4. According to the independent path above , Design test cases , Make the program follow the above
Independent path execution .
边栏推荐
- 解决扫描不到xml、yml、properties文件配置
- 1. Mx6u learning notes (VII): bare metal development (4) -- master frequency and clock configuration
- windows无法启动MYSQL服务(位于本地计算机)错误1067进程意外终止
- 引入了junit为什么还是用不了@Test注解
- Introduction to the easy copy module
- Ansible practical Series III_ Task common commands
- 安装numpy问题总结
- 01 project demand analysis (ordering system)
- There are three iPhone se 2022 models in the Eurasian Economic Commission database
- Installation and use of MySQL under MySQL 19 Linux
猜你喜欢

02 staff information management after the actual project
![[recommended by bloggers] C WinForm regularly sends email (with source code)](/img/5d/57f8599a4f02c569c6c3f4bcb8b739.png)
[recommended by bloggers] C WinForm regularly sends email (with source code)

Csdn-nlp: difficulty level classification of blog posts based on skill tree and weak supervised learning (I)

CSDN markdown editor

A brief introduction to the microservice technology stack, the introduction and use of Eureka and ribbon

Invalid global search in idea/pychar, etc. (win10)
![[recommended by bloggers] asp Net WebService background data API JSON (with source code)](/img/04/c721e6177b578b30cbbf334cb1b6c9.png)
[recommended by bloggers] asp Net WebService background data API JSON (with source code)

Mysql21 - gestion des utilisateurs et des droits

QT creator design user interface

【博主推荐】asp.net WebService 后台数据API JSON(附源码)
随机推荐
安装numpy问题总结
Generate PDM file from Navicat export table
Install mysql5.5 and mysql8.0 under windows at the same time
Mysql21 user and permission management
frp内网穿透那些事
软件测试与质量学习笔记3--白盒测试
Solve the problem that XML, YML and properties file configurations cannot be scanned
一键提取pdf中的表格
Deoldify项目问题——OMP:Error#15:Initializing libiomp5md.dll,but found libiomp5md.dll already initialized.
Mysql 其他主机无法连接本地数据库
【博主推荐】C#生成好看的二维码(附源码)
Yum prompt another app is currently holding the yum lock; waiting for it to exit...
CSDN question and answer module Title Recommendation task (I) -- Construction of basic framework
C language advanced pointer Full Version (array pointer, pointer array discrimination, function pointer)
Attention apply personal understanding to images
打开浏览器的同时会在主页外同时打开芒果TV,抖音等网站
There are three iPhone se 2022 models in the Eurasian Economic Commission database
[Thesis Writing] how to write function description of jsp online examination system
Installation and use of MySQL under MySQL 19 Linux
虚拟机Ping通主机,主机Ping不通虚拟机