当前位置:网站首页>Orthogonal test method and function diagram method for test case design
Orthogonal test method and function diagram method for test case design
2022-07-02 04:40:00 【Peng Yuyan in the testing industry】
Concept of orthogonal test method
basis Galois theory , From a lot of ( experiment ) data ( Test case ) Choose the right amount of , Representative points ( example ), So as to arrange the experiment reasonably ( test ) A scientific experiment design method . Similar methods include : Cluster analysis method , Factor method, etc .

Orthogonal test method
When using cause and effect diagrams to design test cases , The causal relationship between the cause as an input condition and the output result , Sometimes it's hard to get from the software requirements specification . Often the causality is very large , So that the number of test cases obtained from the cause and effect diagram is amazing , It brings a heavy burden to software testing , In order to effectively , Reasonably reduce the test time and cost , The orthogonal experiment design method can be used to design test cases .
The steps of designing test cases by orthogonal experiment :
1. Extract function description , Structural factors -- State table
The conditions affecting the experimental indexes are called factors . The condition that affects the experimental factor is called the state of the factor . When using orthogonal experimental design method to design test cases , First, find out the operation objects and external factors that affect the function realization according to the specification of the tested software , Think of them as factors , The value of each factor is regarded as the State . Divide the functional requirements in the software requirements specification , Decompose and expand the overall outline functional requirements layer by layer , Decompose into specific basic functional requirements with relative independence .
In this way, all factors in the software under test can be determined , Provide a reference for determining the weight of . Determining factors and states is the key to designing test cases . Therefore, it is required to determine the value as comprehensively and correctly as possible , To ensure that the design of test cases is complete and effective .
2. Weighted screening , Generating factor analysis table
The selection of factors and states can be weighted according to their importance . According to the action of each factor and state , The frequency of occurrence and the need for testing , Determine the size of the weight .
3. Using orthogonal table to construct test data set
The derivation basis of orthogonal table Galois theory ( It is omitted here , If necessary, you can check the textbooks on Mathematical Statistics ).
Using orthogonal experimental design method to design test cases , It's better than using equivalence classes , Boundary value analysis , Methods such as cause and effect diagrams have the following advantages : Save testing time ; The number of test cases generated can be controlled ; Test cases have a certain coverage .

Concept of function diagram method
Function diagram consists of state transition diagram and Boolean function . The state transition diagram is described by state and transition . A status indicates where the data is entered ( Or time ), Migration indicates a change in state . At the same time, it depends on the logical functions represented by the decision table or cause and effect diagram . example , A simplified automatic teller ATM Function diagram of .
Application of function diagram
1. Function diagram introduction
The functional description of a program usually consists of dynamic description and static description . Dynamic description describes the order of input data or the order of transfer .
Static description describes the corresponding relationship between input conditions and output conditions . For more complex programs , Because there are a lot of combinations , therefore , Specifications composed of static specifications are often not enough for testing . The function description must be supplemented by a dynamic description . The function diagram method is to use the function diagram FD Formally represent the functional description of the program , And generate test cases of function diagram mechanically .
The function diagram model consists of state transition diagram and logical function model . The state transition diagram is used to represent the input data sequence and the corresponding output data . In the state transition diagram , Output data and subsequent status are determined by input data and current status . The logical function model is used to represent the corresponding relationship between input conditions and output conditions in the state .
The logical functional model is only suitable for describing static descriptions , The output data is determined only by the input data . A test case consists of a series of states that pass through the test and must rely on input in each state / The output data consists of a pair of conditions . Function diagram method is actually a black box and white box mixed use case design method .
( In the function diagram method , The concepts and methods of logical coverage and path testing are used , It belongs to the white box test method The content of . Logic coverage is a test case design method based on the internal logic structure of the program . This method requires testers to have a clear understanding of the logical structure of the program . Because the objectives of coverage testing are different , Logical coverage can be divided into : Statement override , Determine coverage , determine - Conditional coverage , Conditional combination covering and path covering . The logical coverage and paths we refer to below are at the functional or system level , To distinguish it from the internal of the program in the white box test .)
2. Test case generation method
Generate test cases from Functional Diagrams , The number of test cases obtained is acceptable . The key problem is how to select test cases from the state transition diagram . If node is used instead of state , Replace migration with an arc , Then the state transition diagram can be transformed into the control flow diagram of a program . The problem is transformed into the path test problem of the program ( Such as white box test ) Problem. .

3. Test case generation rules
In order to move the State ( Test path ) Test cases and logical models ( Partial test cases ) Test cases are combined , Generate practical test cases from function diagrams , The following rules must be defined . Migrate in a structured state (SST) in , Define three forms of loops : The order , Selection and repetition . But it is difficult to distinguish all cycles in a state transition .( It indicates that the graphics are omitted ).
4. The process of generating test cases from functional diagrams
a. Generate local test cases : In each state , Generate local test cases from cause and effect diagrams . Local test cases consist of cause values ( input data ) Combine with the corresponding result value ( Output data or status ) constitute .
b. Test path generation : Use the rules above ( Three ) Generate test path from initial state to final state .
c. Test case synthesis : Composite test paths and local test cases in each state in the functional diagram . The result is a sequence of states from the initial state to the final state , And a combination of input data and corresponding output data in each state .
5. Test case synthesis algorithm : Construct a tree with conditions .
The following is the supporting information , For doing 【 software test 】 For our friends, it should be the most comprehensive and complete war preparation warehouse , This warehouse also accompanied me through the most difficult journey , I hope it can help you !
Last : It can be in the official account : Programmer Xiaohao ! Get a free copy of 216 Page software testing engineer interview guide document information . And the corresponding video learning tutorial is free to share !, It includes basic knowledge 、Linux necessary 、Shell、 The principles of the Internet 、Mysql database 、 Special topic of bag capturing tools 、 Interface testing tool 、 Test advanced -Python Programming 、Web automated testing 、APP automated testing 、 Interface automation testing 、 Testing advanced continuous integration 、 Test architecture development test framework 、 Performance testing 、 Safety test, etc. .
If my blog helps you 、 If you like my blog content , please “ give the thumbs-up ” “ Comment on ” “ Collection ” One button, three links ! Friends who like software testing , You can join our testing technology exchange group :779450660 There are various software testing resources and technical discussions )
边栏推荐
- CorelDRAW Graphics Suite2022免费图形设计软件
- Pytorch-Yolov5从0运行Bug解决:
- One step implementation of yolox helmet detection (combined with oak intelligent depth camera)
- 60后关机程序
- Interview question: do you know the difference between deep copy and shallow copy? What is a reference copy?
- Mysql表insert中文变?号的问题解决办法
- Mapping location after kotlin confusion
- idea自动导包和自动删包设置
- 6月书讯 | 9本新书上市,阵容强大,闭眼入!
- win10 磁盘管理 压缩卷 无法启动问题
猜你喜欢
![[understand one article] FD_ Use of set](/img/57/276f5ef438adee2cba31dceeabb95c.jpg)
[understand one article] FD_ Use of set

阿里云polkit pkexec 本地提权漏洞

ThinkPHP kernel work order system source code commercial open source version multi user + multi customer service + SMS + email notification

Landing guide for "prohibit using select * as query field list"

Embedded-c language-9-makefile/ structure / Consortium

Solution of DM database unable to open graphical interface

C language practice - number guessing game

正大美欧4的主账户关注什么数据?

万卷共知,一书一页总关情,TVP读书会带你突围阅读迷障!

A summary of common interview questions in 2022, including 25 technology stacks, has helped me successfully get an offer from Tencent
随机推荐
初学爬虫-笔趣阁爬虫
How to modify data file path in DM database
二叉树解题(二)
二叉樹解題(二)
Play with concurrency: draw a thread state transition diagram
C language practice - number guessing game
Yolov5网络修改教程(将backbone修改为EfficientNet、MobileNet3、RegNet等)
Common sense of cloud server security settings
One step implementation of yolox helmet detection (combined with oak intelligent depth camera)
Unity particle Foundation
Pytorch---使用Pytorch实现U-Net进行语义分割
Cache consistency solution - how to ensure the consistency between the cache and the data in the database when changing data
Wechat applet JWT login issue token
The core idea of performance optimization, dry goods sharing
Common errors of dmrman offline backup
[graduation season · advanced technology Er] young people have dreams, why are they afraid of hesitation
VMware installation win10 reports an error: operating system not found
Arbre binaire pour résoudre le problème (2)
Leetcode- insert and sort the linked list
Markdown edit syntax