当前位置:网站首页>With regard to the white box test, you have to master these skills~
With regard to the white box test, you have to master these skills~
2022-07-01 01:36: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 .
| Click the small card at the end of the document to receive it |
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 :25 Days from zero basis to software testing post , I finished today , Employment tomorrow .【 Include features / Interface / automation /python automated testing / performance / Test Development 】
Advanced automation testing :2022B The first station is super detailed python Practical course of automated software testing , Prepare for the golden, silver and four job hopping season , After advanced learning, it soared 20K
边栏推荐
- 【多源bfs】934. Shortest Bridge
- 测试必备工具-Postman实战教程
- Neo4j installation, operation, project construction and function realization
- System settings large page
- laravel 事件 & 监听
- 一些本质的区别
- Thinking about business and investment
- One of the basics - overview of sta Basics
- 1175. Prime Arrangements
- Draw some interesting figures with flutter's canvas
猜你喜欢

物业怎么发短信通知给业主?

Log logrus third party library usage

DC学习笔记正式篇之零——综述与基本流程介绍

Introduction and principle analysis of cluster and LVS

Lecun, a Turing Award winner, pointed out that the future of AI lies in self-learning, and the company has embarked on the journey

关于白盒测试,这些技巧你得游刃有余~

Typora的使用

图的连通性基础

工作6年,来盘点一下职场人混迹职场的黄金法则

The liquor and tourism sector recovers, and Yaduo continues to dream of listing. How far is it from "the first share of the new accommodation economy"?
随机推荐
KS009基于SSH实现宠物管理系统
关于白盒测试,这些技巧你得游刃有余~
Understanding and application of Qt5 layout in creation
sort自定义函数
Basic knowledge II - Basic definitions related to sta
laravel+redis 生成订单号-当天从1开始自增
mysql数据库基础:流程控制
PHP crawls data through third-party plug-ins
直播商城源码,实现左右联动商品分类页面
【栈】921. Minimum Add to Make Parentheses Valid
Strictmode analysis registration strictmode principle (4)
Digital IC design process summary
TypeError: can‘t convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to
System. Csrebot for commandline
PHP数组拼接MySQL的in语句
Handsontable數據網格組件
生意和投资的思考
【模拟】922. Sort Array By Parity II
孙宇晨接受瑞士媒体Bilan采访:熊市不会持续太久
dc_ Study and summary of labs--lab1