当前位置:网站首页>As for the white box test, you have to be skillful in these skills~
As for the white box test, you have to be skillful in these skills~
2022-07-28 19:10:00 【Xiaowu knock code】
For many small partners who are just beginning to learn software testing , If you can get the black box as soon as possible 、 White box test to understand , Master the conclusions and basic principles of the two tests , It will be helpful to my later study . today , Let's talk about black boxes 、 Topics related to white box testing .
1、 Black box test method and summary
The most common black box test methods include : The boundary value 、 Equivalence class 、 Wrong guess 、 Scene method 、 Cause and effect diagram 、 Decision table composition method 、 Orthogonal experimental design . Take a few examples :
Boundary value test : Boundary value testing is one of the most basic black box testing methods , It is “ Equivalence class division ” A good complement to this test method . But this method also has disadvantages —— A lot of redundancy and vulnerabilities . in addition , Because the Boolean content does not have the concept of boundary , So boundary value tests are not valid for Booleans .
Equivalence class testing : Equivalence tests are mainly divided into 【 Weak equivalence class test 】 and 【 Strong equivalence class test 】. This kind of test is mainly used to solve Boolean and logical problems . When doing this kind of test , It is suggested that after the equivalence class is divided , Number each equivalent class , In this way, the conclusion and operation steps may look clearer .
Cause and effect diagram : The causality diagram method mainly involves the test of causality , When writing test cases , We need to make a clear distinction “ Identity 、 or 、 Not ” Relationship , It is also necessary to distinguish between various constraints . Cause and effect diagram can be used to describe the relationship between input and output . But the drawing process is rather tedious . Cause and effect diagram can be transformed into decision table . It is recommended that during the test , Try to draw the decision table directly .
( such as :E constraint ( different ; Exclusive or ):a,b At most one may be 1, You can't do it at the same time 1;
I constraint ( or ; contain ):a,b,c At least one of the must be 1, You can't do it at the same time 0;
O constraint ( Only ):a and b One and only one must be 1;
R constraint ( requirement ):a yes 1 when ,b Must be 1, namely a by 1 when ,b Not for 0;
M constraint : Constraints on output conditions , If it turns out a by 1, Then the result b It has to be for 0)
Decision table test : It is only suitable for analyzing input fields , It is not suitable for testing the output domain .
Wrong guess : The advantage of this method is that it can give full play to the experience and potential of testers , High hit rate ; The disadvantages are also very obvious , It is difficult to guarantee coverage .
in addition , Test cases designed by black box test method , There may be vulnerabilities and redundancy , But in general , It is difficult for testers to evaluate it . therefore , Testers can also use the coverage index of white box test , To measure the vulnerability and redundancy of black box testing methods .
2、 Method and summary of white box test
The method of white box test is relatively simple , There are two main categories .
One is static testing . This kind of testing mainly focuses on source code inspection and optimization . The basic test method is that there is no need to design test cases , Just view the source code and simulate the execution code . By putting forward the opinions on structural design optimization and suggestions on key test points , Can complete the corresponding test work .
The other is dynamic testing . This kind of testing mainly focuses on the testing of key program structures , Its basic test method is to determine the complexity of the program structure through the expression 、 Execution path and loop structure , To design corresponding test cases . So as to achieve a certain degree of test coverage , Ensure test completeness and no redundancy of the test .
that , What are the typical test methods for these two types of tests ?
A typical method of static testing is : Peer review 、 Static structure analysis 、 Code quality measurement and data flow testing of variables . There are many methods of dynamic testing , Include : Decision test based on logical expression coverage index ; Independent path testing based on full path coverage ; And the test of the loop based on the coverage of the loop process .
3、 The comprehensive strategy of white box testing
In daily life , We usually use black box test method , Use the white box test as an aid , Additional testing and code optimization .
This is mainly because white box testing is a test for program code , Testers need to understand the details of program implementation , The technical requirements for the personnel who design and perform the test are high . If novice testers want to improve their abilities , After entering the industry , Learn more about the white box test .
The content based on black box test is relatively easy to understand , below , Let's do the white box test , Talk about how to use a comprehensive strategy , To test the project . here , We mainly recommend these comprehensive strategies :
1) Give priority to static white box test .
Especially when testing the core code of functional modules , Be sure to organize strict reviews regularly , And through experience summary , Constantly update test standards or normative documents such as defect checklists , Make the test rigorous .
2) Pay attention to extracting test data with boundary .
When designing test cases , Be sure to combine logic to determine the boundary of the expression 、 The boundary of the number of cycles 、 Boundary of variable value range, etc , To comprehensively test , Avoid missing test .
3) Make more use of the white box test method for supplementary tests .
Especially where the black box test cannot or is difficult to check ( Such as memory leak ), Try to use a special white box test method ( Such as memory leak test ), Conduct supplementary tests .
4) For key variables , Use the data flow test method to determine the focus of the supplementary path test .
5) Try to use testing tools to complete the relevant analysis and evaluation of code structure and quality , Design review and optimization of code .
6) Learn from the test method of independent path , Design high-level test cases , Improve test coverage , Reduce test redundancy .
At the end
For testers , Whether we are in the introductory stage of learning 、 Just entering the working stage 、 There are still several years of work , Be sure to learn the contents of black box and white box test thoroughly , At the same time, we will continue to overcome the test content of each sub field , Let oneself have stronger professional ability , Pave the way for your future career ~
Finally, thank everyone who reads my article carefully , The following online link is also a very comprehensive one that I spent a few days sorting out , I hope it can also help you in need !

These materials , For those who want to change careers 【 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 ! Everything should be done as soon as possible , Especially in the technology industry , We must improve our technical skills . I hope that's helpful ……
If you don't want to grow up alone , Unable to find the information of the system , The problem is not helped , If you insist on giving up after a few days , You can click the small card below to join our group , We can discuss and exchange , There will be various software testing materials and technical exchanges .
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 .
Self study recommendation B Stop video :
Zero basis transition software testing : Self taught software testing , Got the byte test post offer, Is the B The best video station !
Advanced automation testing : Huawei has landed , Salary increase 20K,2022 Most suitable for self-study python Automated test tutorial , Spend it yourself 16800 Bought , Free sharing 
边栏推荐
- Four years later, Debian finally recaptured the "debian.community" domain name!
- [GXYCTF2019]StrongestMind
- 【物理应用】大气吸收损耗附matlab代码
- DevCon.exe 导出output至指定文件
- Differences between RDB and AOF for redis persistence
- C and SQL mixed programming, vs need to download what things
- QT widget promoted to QWidget
- Is the software testing training institution reliable?
- A priori, a posteriori, likelihood
- unity CS1513
猜你喜欢

Getting started with gateway

JVM four reference types

N32 replaces STM32. Don't ignore these details!

2、 Uni app login function page Jump

【图像隐藏】基于DCT、DWT、LHA、LSB的数字图像信息隐藏系统含各类攻击和性能参数附matlab代码

BM16 删除有序链表中重复的元素-II

Win11怎么调亮度?Win11调屏幕亮度的四种方法

Introduction and advanced MySQL (III)

How to solve the problem that easycvr device cannot be online again after offline?

Today in history: Microsoft acquires qdos; Model testing pioneer birth; The first laser typesetting Chinese newspaper
随机推荐
The switching language of unity causes an error: system FormatException:String was not recognized as a valid DateTime.
How new people get started learning software testing
If you want to change to it, does it really matter if you don't have a major?
How much is software testing training generally?
QT - CPP database operation
Getting started with gateway
Attention mechanism and code implementation
Regular expressions related to face-to-face orders of major express companies in JS
Efficiency comparison of JS array splicing push() concat() methods
Swiftui swift forward geocoding and reverse geocoding (tutorial with source code)
行业落地呈现新进展 | 2022开放原子全球开源峰会OpenAtom OpenHarmony分论坛圆满召开
kotlin:Nothing
零知识证明:具有DDH假设的 ZKP
The difference between --save Dev and --save in NPM
配置教程:新版本EasyCVR(v2.5.0)组织结构如何级联到上级平台?
【物理应用】水下浮动风力涡轮机的尾流诱导动态模拟风场附matlab代码
Creating new projects and adding your own programs
6-20漏洞利用-proftpd测试
[actual combat] realize page distortion correction with OpenCV
Is the software testing industry really saturated?