当前位置:网站首页>Collection of test case design methods
Collection of test case design methods
2022-07-24 03:57:00 【Software testing】
1、 Division of equivalence class
Applicable scenario :
Where there is data input , We can use the equivalence class division method . Such as : Input box
Test ideas :
Range from a lot of data ( Equivalence class ), Then select representative data from each range , These representative data should be able to reflect the test results of the data in this range .
Concept :
Effective equivalence class : For the program , meaningful 、 Reasonable data ( Correct 、 Valid data ).
Invalid equivalence class : For the program , It makes no sense 、 Unreasonable data ( FALSE 、 Invalid data ).
example :
demand :
a、 Mobile number input box : Only numbers are allowed .( Just take the cell phone number as a demonstration Lo)
Invalid equivalence class : Chinese characters 、 expression 、 Symbol 、 Spaces, etc.
Effective equivalence class : Numbers
2、 The boundary value
Applicable scenario :
Where there is data input , In practice , Generally used together with equivalence class division .
Test ideas :
Boundary value is the most error prone place for programmers to program , So test the boundaries .
Concept :
It is the dividing point between effective equivalence class and invalid equivalence class , It's called boundary value ( minimum value , Maximum ). And test the sub boundary , That is, the data on both sides of the boundary value .
example :
b、 Password input box :8-20 Bit character ( Only input... Is allowed : Letter 、 English symbols 、 Numbers )
The boundary value :8 Bit character 、20 Bit character
Sub boundary :7 Bit character 、9 Bit character 、19 Bit character 、21 Bit character
3、 Cause and effect diagram / Decision table
Applicable scenario :
There are multiple controls in an interface , If there is a combination relationship or restriction relationship between controls , Different control combinations produce different output results , In order to find out what output results will be produced by different input combinations , You can use cause and effect diagrams or decision tables .
Concept :
because : Input condition
fruit : Output results
Is to express the relationship between input conditions and output results by drawing
Cause and effect diagram / Steps of decision table test :
step :
step 1: Find all the input conditions
step 2: Find out all the output results
step 3: analysis , List all combinations and constraints between input conditions
step 4: Determine what output results the combination of each set of input conditions will produce , Draw a cause and effect diagram , Fill in the judgment form
step 5: Write test cases Each column represents a combination , Write a test case
Cause and effect diagram / Characteristics of the decision table :
1) The order of the input conditions does not matter
2) The order of the output results is irrelevant
3) It doesn't matter which combination is tested first and which combination is tested later
4) Each combination is independent
The format of the decision table is as follows :
Decision table Terminology
Condition stake : All the conditions of the problem
Action post : All the output of the problem
Condition item : For the value of conditional pile
Action items : The output results of various values of the condition term
4、 Orthogonal array method
Applicable occasions :
There are multiple controls in an interface , Each control has multiple values , Consider the combination of different values of different controls , And if the number of combinations is large , We can use the orthogonal arrangement method .
thought :
Use the least sampling data to achieve the widest , The statistical results with the highest coverage .
The orthogonal table formula is as follows :
l:line That's ok
n: Indicates that the orthogonal table has several rows , Number of combinations to be tested
n The value is fixed , Once the orthogonal table is determined n The value is fixed , There is no need for testers to calculate by themselves .
m: Represents the maximum value allowed in the orthogonal table
It is determined according to the number of values of each control m value
k: Indicates that the orthogonal table has several columns
Determine according to the number of combined controls , Choose the right orthogonal table ( Baidu search )
Methods to summarize :
a、 If there are extra columns , You can delete
b、 The values that can be mapped are mapped first ( Replace )
c、 Put every extra opportunity in each column , Try to distribute the values evenly to the column
d、 To check if there is exactly the same combination , If so, deal with it properly ( Suggest to modify , It can also be deleted )
e、 When selecting orthogonal table, orthogonal representation can be applied , If not, choose the closest .
In practice , Property setting test , Compatibility testing is usually done by orthogonal permutation , And compatibility testing can be done without writing test cases , Test various compatible combinations directly with orthogonal list .
5、 Test outline method
Applicable scenario :
There are multiple windows in the software , There are several operations in the window ( The function point ), In order to clarify the relationship between windows ( result ), You can use the test outline method .
A sample of :
6、 Scene method
Applicable scenario :
Software systems with complex business are suitable for scenario method , Scenario method is a test method based on software business , Testers see themselves as end users , Simulate the operation of the software as real as possible :
Focus on two types of operations :
The business process that users operate correctly — Verify that the business functions of the software are implemented correctly
Simulate user error operation — Verify the software's ability to handle exceptions ( Robustness, )
Test ideas :
Scenario method is to simulate various scenarios when users operate the software , It is mainly used to test the business logic and process of software . When you get a test task , We don't focus on whether the equivalence class of a text box meets the requirements first , First, we should focus on whether its main functions and business processes are implemented correctly , This requires the scenario method to complete the test . When business process testing is OK , That is, when there is no problem with the main functions of the software , Let's focus on the equivalence classes of controls 、 Detailed tests such as boundary values .
Scene division :
1) Basic flow ( Effective flow 、 Right flow )
Simulating the correct business operation process of users is the basic flow
2) Alternative streams ( Invalid stream 、 Error flow )
The operation process simulating user error is alternative flow
A sample of :
Then write test cases according to different scenarios , A scenario can be a test case , It can also be multiple test cases .
The house needs to be built layer by layer , Knowledge needs to be learned at one point one . We should lay a good foundation in the process of learning , More hands-on practice , Don't talk much , The last dry goods here ! I stayed up late to sort out the stages ( function 、 Interface 、 automation 、 performance 、 Test open ) Skills learning materials + Practical explanation , Very suitable for studying in private , It's much more efficient than self-study , Share with you .
Get off w/x/g/z/h: Software testing tips dao
Typing is not easy , If this article is helpful to you , Click a like, collect a hide and pay attention , Give the author an encouragement . It's also convenient for you to find it quickly next time .
边栏推荐
- Worthington mammalian lactate dehydrogenase study -- Characteristics and determination scheme
- 嵌入式系统移植【6】——uboot源码结构
- 硬件知识3--IIC协议
- C language classic exercises (2) - "bubble sort"“
- 【新手向 】手把手开发一个易于扩展的 Tabs 组件
- 6-14 vulnerability exploitation rpcbind vulnerability exploitation
- mongo从开始到安装以及遇到的问题
- mysql服务1主2从,主主,MHA配置详细步骤
- ACM warm-up Exercise 4 in 2022 summer vacation (summary)
- Matlab ode45 solving differential equations
猜你喜欢

Exploration of new mode of code free production

mysql服务1主2从,主主,MHA配置详细步骤

Function application of 4G transmission module

RTOS internal skill cultivation (10) | in depth analysis of RTOS kernel context switching mechanism

Matlab Fractional Order PID control

An in-depth explanation of CAS is necessary for interview practice

Matlab sound signal processing frequency diagram signal filtering and playing sound

An accident caused by MySQL misoperation, and "high availability" can't withstand it

Pit encountered in project upgrading

Worthington mammalian lactate dehydrogenase study -- Characteristics and determination scheme
随机推荐
Sqlserver backup restore
Pit encountered in project upgrading
。 When calling, the incoming t refers to the Devi pass, which basically asks T2,
Histone research -- Characteristics and literature references of histones in Worthington calf thymus
How to prevent SQL injection in PHP applications
How to configure Ethernet network topology in canoe network based access mode
直播课堂系统04-创建service模块
MLP - Multilayer Perceptron
What are Caicai and qiniu doing? Is it safe to open an account?
002_ Kubernetes installation configuration
jvm类加载过程简介说明
监听div的滚动事件 @scroll
Anchor point and anchor frame of target detection
Summary of Zhang Yu's 30 lectures on Advanced Mathematics
Exploration of new mode of code free production
Demining game (analysis)
MLP-多层感知机
清单的要快速熟悉并掌昇腾AI处理器支持
RTOS内功修炼记(十) | 深度解析RTOS内核上下文切换机制
How to efficiently install the GPU version of mindspire