当前位置:网站首页>Learn white box test case design from simple to deep
Learn white box test case design from simple to deep
2022-07-01 20:27:00 【I want to eat ya】
Case design method of white box test
The goal is
1. Know the concept and application scenario of white box testing method
2. Tell me about the white box test methods
3. Be able to use various logic coverage methods to design white box test cases
4. Be able to use the basic path method to design white box test cases
Basic introduction of white box test
What is a white box test 
The characteristics of white box test 
White box test design method

Test design method —— Logical coverage
Logical coverage :
It realizes the coverage of the program by traversing the logical structure of the program .
coverage :
It is a measure of test integrity .

Test design method —— Statement override
Statement override : Design test cases , Make every statement in the program be executed at least once
Time .
for example :
There are... In the case code 4 Executable statement
Design test cases and execute 3 strip , The statement coverage is 3/4=75%


Test design method —— Determine coverage
Determine coverage : Also called branch coverage , Design test cases , Make every judgment in the program “ really ” and “ false ” Are executed at least once . namely : Each branch in the program executes at least once .

for example :
There is a judgment in the case code 2 individual , The verdict 4 individual
Design test cases and execute 3 Branches , Branch coverage is 3/4=75%


Test design method —— Conditional coverage
** Conditional coverage :** Design test cases , So that each condition in the decision takes the true value at least once , Once take a false value .
for example :
There is a judgment in the case code 2 individual , Conditions 3 individual , Conditional results 6 individual
Design test cases and execute 5 Two conditional results , The conditional coverage is 5/6=83%

Test design method —— Determine conditional coverage
** Determine conditional coverage :** Design test cases , Make the judgment result of each judgment in the tested program ( True and false ) At least once , meanwhile , Possible values of each logical condition ( True and false ) And be satisfied at least once . That is to satisfy at the same time 100% Determine coverage and 100% Criteria for conditional coverage .

for example :
There is a judgment in the case code 2 individual , Conditions 3 individual , The verdict 4 individual , Conditional results 6 individual
Design test cases and execute 3 A decision result ,5 Two conditional results , The determination condition coverage is :(3+5)/(4+6)=80%


Test design method —— Conditional combination covering
Conditional combination covering : Design test cases , Make all possible combinations of condition results in each decision in the tested program execute at least once .
for example :
There is a judgment in the case code 2 individual , Conditions 3 individual ( determine 1 Yes 2 Conditions , determine 2 Yes 1 Conditions ), determine 1 The combination of conditions is 4 individual , determine 2 The combination of conditions is 2 individual
Design test cases and execute 5 A combination of conditions , The conditional combination coverage is :5/(4+2)=83%

Test design method —— Path coverage
Path coverage :
Design test cases , Covering all possible paths in the program .

for example :
There are... In the case code 4 Paths
Design test cases and execute 3 Paths , Path coverage is 3/4=75%


Test design method —— Logical coverage

Test design method —— Basic path testing
Basic path testing :
Based on the program control flow diagram , By analyzing the loop complexity of the program , Export the collection of basic executable paths , So as to design test cases
Basic path test method steps :


(2) Calculate the loop complexity of the program
There are three ways :
The number of regions in the flow graph corresponds to the complexity of the ring .
Given flow graph G The cyclomatic complexity of V(G), Defined as V(G)=E-N+2,E Is the number of edges in the flow diagram ,N Is the number of nodes in the flow graph . The figure below :V(G)=10-8+2
Given flow graph G The cyclomatic complexity of V(G), Defined as V(G)=P+1,P It's a flow chart G Determine the number of nodes in . The figure below :V(G)=3+1



summary
It is mainly used in the unit test stage
First static 、 Post dynamic
Design use cases generally use basic path testing , Key modules use a variety of coverage standards
Software testing learning roadmap details
The first stage A functional test
Pre school guidance : Learn the content of this stage , The whole process function test solution 、Web Automated testing solutions 、 Data separation solution 、 Automated test reporting solutions 、 Log collection solution .
1.2022 The whole net starts 、 The most suitable software for novices is the introduction to the actual combat tutorial !
Really from entry to mastery , Contains the foundation + Project practice , The actual operations of all cases are illustrated with pictures and texts , Truly realize a complete set of customs clearance !
2. From beginning to mastery of software testing
Software testing is a process of auditing or comparing the actual output with the expected output . The classic definition of software testing is : Operate the program under specified conditions , To find program errors , Measuring software quality , And to evaluate whether it can meet the design requirements . This course consists of 5 God , Record for zero basic white . A necessary course for the introduction of zero Foundation .
Software testing from entry to mastery _ Basic course of software testing
3. Linux System 2 Get started
This video contains Linux Operating system introduction 、Linux Common commands 、vi Editor . Learn and master the contents of this stage , Can have Linux Project construction capacity .
Linux System operation tutorial 2 Get started linux Project structures,
4. software test MySQL Database knowledge intensive + Project practice
This video contains data installation , Data table operation 、 Data manipulation - Additions and deletions 、 Conditions of the query 、 Sort 、 Aggregate functions 、 grouping 、 Pagination 、 Link query 、 Self correlation 、 Subquery 、 Subquery drill . Learn the content of this course , Can have the ability of database verification ; It can also be fast 、 Master the operation of database addition, deletion, modification and query in a standardized way .
Software test engineer must MySQL database ,mysql Elaborate on the system + Practice after class
The second stage Python Programming
Pre school guidance : Learn the content of this stage , Can grasp Python grammar , Ability to program ; Be able to establish programming thinking and object-oriented programming thinking ; Can master UnitTest Framework management test cases .
10 Heaven plays Python software test
Learn the content of this stage , Can grasp Python grammar , Ability to program ; Be able to establish programming thinking and object-oriented programming thinking ; Can master UnitTest Framework management test cases .
Python Automatic test tutorial ,python From foundation to UnitTest Framework management test cases
The third stage UI automation
Pre school guidance :ui Automation is generally divided into web Automation and App automation , It accounts for a large proportion in the field of automated testing , Regular use .
1. software test web Automated test elaboration and actual combat
This course will teach you to build Web Automated and mobile automated test environments ; master Web Automated test process and scripting ; Master the positioning method of elements in mobile automation testing 、 Element operation and gesture operation ; Have a good command of ADB Tool use ; master PO The design idea of pattern , And can encapsulate the page ; Master the implementation of data-driven ; Be able to flexibly use automation related technologies in practical projects .
2. Zero foundation entry mobile automation ——Appium frame
This course will explain in detail Appium frame ,Appium It's an open source 、 Cross platform automated testing framework , The framework applies to Native Application、Mobile Web Application or Hybrid Application Automated testing .
Zero foundation entry mobile automation test ——Appium frame
3. Easily teach you to use Appium Conduct IOS Real machine automated testing
This course , Present the steps and precautions of environmental installation to the trainees , Simulator to real machine practice , They all demonstrate and explain . rich content , Vivid image , After learning, you can complete IOS Actual operation environment .
Easily teach you to use Appium Conduct IOS Real machine automated testing
The fourth stage Interface automation
Pre school guidance : Interface testing is the most frequently used part of all automated testing applications . This stage is divided into 14 Three parts will be explained in detail .
Interface test elaboration + A practical course of mental health communication
This tutorial will cover HTTP,Postman,Pymysql,requests library , Integrate UnitTes,Dubbo And so on , At last, the project practice of this stage is carried out with the intelligent health project .
The fifth stage Performance testing
Pre school guidance : Performance testing belongs to the category of advanced testing , It's very helpful for salary promotion , This video explains how to build a performance test environment ,JMeter Tool use , Performance test monitoring 、 Analysis and tuning methods .
4 Day quick start performance test
This video passes the performance test, basic theory and JMeter Learning tools ; Through the actual combat of the light mall project , Take the students to master the performance test demand analysis 、 Performance test plan 、 Test case design 、 Test script development 、 Performance monitoring 、 Performance analysis and tuning 、 Performance test report summary .
Phase 6 Comprehensive projects strengthen
Pre school guidance : Through wechat applet 、 The financial project is a comprehensive and enhanced functional test of two practical projects 、 The interface test 、 Performance testing .
1. Wechat applet automatic test practice
This video covers : Basic introduction to wechat applet 、Ego Introduction to wechat business project 、Ego Wechat project deployment 、Ego Wechat applet plan 、Ego Micro quotient applet design 、Ego Micro quotient applet execution summary 、Ego Wechat applet interface test 、 Continuous integration .
Software testing wechat applet automatic testing practice
2. software test 4 Finish the financial project in days
This video explains the function test solution of financial project 、 Real project test experience solution 、 Complex business interface test solution Interface encryption and decryption test solution 、 Data separation solution Continuous integration solutions 、 Automated test reporting solutions 、 High concurrency test solution .
software test 4 Day quick fix financial project function test practical tutorial
边栏推荐
- Source code series of authentic children -inheritablethreadlocal (line by line source code takes you to analyze the author's ideas)
- 关联线探究,如何连接流程图的两个节点
- Powerful, easy-to-use, professional editor / notebook software suitable for programmers / software developers, comprehensive evaluation and comprehensive recommendation
- The large list set is divided into multiple small list sets in equal proportion
- 关于一个神奇函数的用法
- 全国职业院校技能大赛网络安全“splunk“详细配置
- Hls4ml/vivado HLS error reporting solution
- 8K HDR!| Hevc hard solution for chromium - principle / Measurement Guide
- STC 32位8051单片机开发实例教程 二 I/O工作模式及其配置
- 网上开户是安全的吗?新手可以开炒股账户吗。
猜你喜欢

【多线程】 实现单例模式 ( 饿汉、懒汉 ) 实现线程安全的单例模式 (双重效验锁)

Redis installation and startup in Windows environment (background startup)

Win11怎么关闭开机自启动软件

EasyCVR通过国标GB28181协议接入设备,出现设备自动拉流是什么原因?

Bind this of the current scope for callback functions in other cases such as timers and delayers

Exclusive news: Alibaba cloud quietly launched RPA cloud computer and has opened cooperation with many RPA manufacturers

有意思了!数据库也搞Serverless!
![[mysql] install mysql5.7](/img/c4/d7fb5ddf8e7be31f7a9ad68409e584.png)
[mysql] install mysql5.7

Importance of EDA tools to chip industry knowledge popularization

Win11暂停更新点不了怎么办?Win11暂停更新是灰色的如何解决?
随机推荐
MYSLQ十种锁,一篇文章带你全解析
Keras机器翻译实战
EasyCVR通过国标GB28181协议接入设备,出现设备自动拉流是什么原因?
数据分析师听起来很高大上?了解这几点你再决定是否转型
Stack Overflow 2022 开发者调查:行业走向何方?
Keras machine translation practice
math_ Use differentiation to calculate approximate value
走进如心小镇,数智化变革连接“未来社区”
GaussDB(for MySQL) :Partial Result Cache,通过缓存中间结果对算子进行加速
Exclusive news: Alibaba cloud quietly launched RPA cloud computer and has opened cooperation with many RPA manufacturers
Develop those things: easycvr platform adds playback address authentication function
SwiftUI 4 新功能大全之 Toggle与 Mixed Toggle 多个绑定组件
Win11 how to hide the taskbar? Win11 method to hide the taskbar
EURA欧瑞E1000系列变频器使用PID实现恒压供水功能的相关参数设置及接线
windows环境 redis安装和启动(后台启动)
Iframe 父子页面通信
Servlet knowledge points
关于元宇宙下一代入口——脑机接口的实现
Common components of flask
Interview question 1