当前位置:网站首页>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
边栏推荐
- 数据分析师听起来很高大上?了解这几点你再决定是否转型
- Exclusive news: Alibaba cloud quietly launched RPA cloud computer and has opened cooperation with many RPA manufacturers
- RichView 文档中的 ITEM
- Interesting! Database is also serverless!
- Understand the structure in C language in one article
- Iframe parent-child page communication
- Iframe 父子页面通信
- 走进如心小镇,数智化变革连接“未来社区”
- Hls4ml reports an error the board_ part definition was not found for tul. com. tw:pynq-z2:part0:1.0.
- STC 32-bit 8051 single chip microcomputer development example tutorial II i/o working mode and its configuration
猜你喜欢
MYSLQ十种锁,一篇文章带你全解析
【多线程】 实现单例模式 ( 饿汉、懒汉 ) 实现线程安全的单例模式 (双重效验锁)
Items in richview documents
Win11怎么关闭开机自启动软件
Arduino stepper library drive 28byj-48 stepper motor test program
Solve the problem of slow or failed vscode download
Interview questions shared in today's group
3D panoramic model display visualization technology demonstration
牛客编程题--必刷101之字符串(高效刷题,举一反三)
[multithreading] lock strategy
随机推荐
PHP gets the external chain address of wechat applet and applet store
漏洞复现-.Net-ueditor上传
Hls4ml reports an error the board_ part definition was not found for tul. com. tw:pynq-z2:part0:1.0.
How to turn off the boot auto start software in win11
寫博客文檔
RichView TRVDocParameters 页面参数设置
【多线程】锁策略
math_ Use differentiation to calculate approximate value
简单但现代的服务器仪表板Dashdot
Hls4ml/vivado HLS error reporting solution
The large list set is divided into multiple small list sets in equal proportion
What if the win11 shortcut key switching input method doesn't respond? Shortcut key switching input method does not respond
Getting started with fastdfs
关于new Set( )还有哪些是你不知道的
Iframe 父子页面通信
数据分析师听起来很高大上?了解这几点你再决定是否转型
Importance of EDA tools to chip industry knowledge popularization
Bind this of the current scope for callback functions in other cases such as timers and delayers
【蓝桥杯Web】2022年第十三届蓝桥杯Web大学组国赛真题解析
MYSLQ十种锁,一篇文章带你全解析