当前位置:网站首页>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 .
边栏推荐
- LAN SDN hard core technology insider 21 Kang long regrets -- Specifications and restrictions (middle)
- dynamixel舵机在ros下的workbnech使用
- Introduction to JVM class loading process
- Worthington's test of hepatocyte separation system and related optimization schemes
- 三菱转以太网模块远创智控YC8000-FX 连接 MCGS操作方法
- MySQL service 1 master 2 slave, master master, MHA configuration detailed steps
- What are Caicai and qiniu doing? Is it safe to open an account?
- Three cluster schemes of redis
- Mitsubishi Ethernet module Yuanchuang intelligent control yc8000-fx connection MCGS operation method
- 。 When calling, the incoming t refers to the Devi pass, which basically asks T2,
猜你喜欢

The impact of Patrick mchardy incident on the open source community

Remember an online sql deadlock accident: how to avoid deadlock?

H7-tool serial port offline burning operation instructions, support TTL serial port, RS232 and RS485 (2022-06-30)

buu web

6-15 vulnerability exploitation SMB rce remote command execution

Listen for the scroll event @scroll of div

Bet on the whole scene, what is the odds of glory?

flask框架中页面跳转与重定向

PAT甲级 1043 Is It a Binary Search Tree

MySQL cannot be accessed. Navicat prompt: is not allowed to connect to this MySQL server
随机推荐
MySQL service 1 master 2 slave, master master, MHA configuration detailed steps
Why do some people write code so complicated?
PyTorch生态简介
力扣(LeetCode)204. 计数质数(2022.07.23)
LAN SDN technology hard core insider 9 from software overlay to hardware overlay
Developers share mindspire Lite experience, one click image segmentation
硬件知识3--IIC协议
Worthington lysozyme technical description and literature reference
The amount of training data is not only applicable to.Z, according to the receiver's view of the number
Redis transaction learning
High precision phase shift (mcp41xx) program STM32F103, f407 are common, just change the pin (SPI software analog communication)
PAT甲级 1043 Is It a Binary Search Tree
Preliminary use of swagger2
MLP - Multilayer Perceptron
Y74. Chapter IV Prometheus large factory monitoring system and practice -- Introduction to promql and monitoring pod resources (V)
Batch visual target detection callout box -- Yolo format dataset
于最rs]在下面指发送到远程大的返回结构推境
Matlab Fractional Order PID control
swagger2的初步使用
Native JS realizes the acquisition and operation of DOM