当前位置:网站首页>Method of designing test cases
Method of designing test cases
2022-07-28 06:54:00 【Xiao Qiao】
Catalog
One 、 Design test cases according to requirements
Two 、 Specific methods of designing test cases
3、 ... and 、 How to evaluate the quality of test cases
One 、 Design test cases according to requirements
Verify the correctness of the requirements .
Analyze requirements , Refine requirements , Extract functional modules from requirements , Divide sub functions , Write test cases according to sub functions .
Two 、 Specific methods of designing test cases
1. Equivalence class
Put the input ( Output is considered only in special cases ) It is divided into several equivalent classes , Select a representative test case from each equivalent class to test , If this test case passes the test , Let's say that the equivalence class represented by this test case passes .
Effective equivalence class : According to the requirement specification , Meaningful input data set , Become a valid equivalence class ;
Invalid equivalence class : Not meeting the requirements ;
In order to solve the problem of too many test cases , Enter situations that cannot be exhausted .
2. The boundary value
Design test cases according to the boundary of input and output .
3. Cause and effect diagram
Cause and effect diagram is a kind of logic diagram ( Identity 、 And 、 or 、 Not ), When there are many inputs , Different combinations of inputs correspond to different outputs , Use cause and effect diagram to analyze the relationship between different input combinations and different outputs .
The steps of designing test cases by causality diagram :
① Analyze all inputs and outputs ;
② Find out the relationship between input and output ;
③ Draw a cause and effect diagram according to the relationship between input and output ;
④ According to the causal picture judgment table ;
⑤ Design test cases according to the decision table .
Cause and effect diagram example :

4. Orthogonal method
An experiment that studies multiple factors and levels ( test ) Method , According to orthogonality , Select the best combination from the input combination for test , The results of the analysis , Analyze the results of this test through the test results obtained from these optimal combinations .
factors : Input variables ;
level : Value of variable ;
Composition of orthogonal table :
① Column : Factor number ( Number of variables )
② Horizontal number : The maximum number of values of each variable
③ That's ok :L=( Horizontal number -1)* Factor number +1
Properties of orthogonal table :
① The number of different data in each column is the same
② The combination of any two columns of different data occurs the same number of times
Orthogonal table design test case steps :
① Identify all inputs ( Variable );
② Determine the number of values of each variable ;
③ Number of determining factors ( Columns of orthogonal table ), Horizontal number ;
④ According to the properties of orthogonal table , Map the values of variables to the table ;
⑤ Write test cases , Each row of the orthogonal table is a test case ;
⑥ Add test cases that are not in the orthogonal table but that you think may appear .
example :
full name 、 mailbox 、 password 、 Confirm the password 、 Verification Code , Only consider filling or not filling .
①②③ Factor number =5; Horizontal number =2; Columns of orthogonal table = Factor number =5; Row of orthogonal table =( Horizontal number -1)* Factor number +1=6
④ Orthogonal table :

⑤ Write test cases according to each line
⑥ Add : Fill in all or nothing .
5. Scene method
Design test cases according to scenario method : Put forward each function point in the scene , Consider the possible different situations of function points , Design test cases according to these situations . for example :ATM ATM .
6. Wrong guess
According to the tester's knowledge , Experience , Intuitively judge which module will have problems , Write test cases specifically for this module , As a supplementary test case method .
3、 ... and 、 How to evaluate the quality of test cases
1. Use cases are clearly expressed , No ambiguity ;
2. The use case has strong operability ;
3. The input and output of use cases are clear , A use case has only one expected result ;
4. The maintainability of use cases is good ;
5. Use cases have high coverage of requirements ;
6. Exposure procedures BUG Your ability is strong .
边栏推荐
- QGraphicsView提升为QChartView
- Build php7 private warehouse
- Technology sharing | how to do Assertion Verification in interface automated testing?
- MySQL common commands
- How to store floating point data in memory
- NFS shared storage service
- ISO 3.0-server three power separation configuration
- MySQL主主
- How to calculate the size of structure, segment and Consortium (common body)
- Redis implementation of distributed lock and analysis of the main process of redismission distributed lock
猜你喜欢

Water drop effect on umbrella

软件开发中常见模型

SSH服务配置

mongo ssl 配置实战

How to simulate the implementation of strcpy library functions

cocos2d-x 学习笔记——瓦片地图TiledMap

Which is the best air conduction Bluetooth headset? Air conduction Bluetooth headset ranking

JS逆向100题——第1题

MySQL master master

Installation and configuration of unit test framework jest with typescript
随机推荐
[the beginning of self redemption]
On cookies and session
Optimization ideas from ordinary query commodities to highly concurrent query commodities
什么是线性表?
[untitled]
Analysis of reentrantlock source code of AQS
QT使用MSVC编译器输出中文乱码问题
SSH service configuration
Which brand of air conduction earphones is good and highly praised
MySQL常用命令
DNS domain name resolution service
NAT和PAT的原理及配置
Technology sharing | send requests using postman
KVM hot migration
Si Han talks about the professional development of testers
单元测试框架Jest搭配TypeScript的安装与配置
Ubuntu18.04搭建redis集群【学习笔记】
raid磁盘阵列
进程和线程的区别
What's a good gift for Tanabata? Niche and advanced product gift recommendation