当前位置:网站首页>Software testing
Software testing
2022-06-29 07:41:00 【Xiao Yang who loves coding】
software test
Reference material
《 Software testing methods and techniques Edited by zhushaomin The first 3 edition 》
Audio navigation
- software test
- Preface
- One 、 Learning route
- Two 、 The skill tree
- 3、 ... and 、 Theoretical map
- Four 、 Introduction to software testing
- 5、 ... and 、 Basic concepts
- 6、 ... and 、 The main method
- 7、 ... and 、 The system test
- 8、 ... and 、 The acceptance test
- Nine 、 automated testing
- Ten 、 Add
Preface
The development of software industry has gone through many years in China , For the software development process , There are many development specifications and development processes . In the development of software development , Developers have accumulated a lot of experience , meanwhile , Through the summary of various problems and experiences in the process of software development , Produced software test This software development companion .
Software testing is the process of executing a program or system to find errors , Generally speaking, the goals of software testing include :
1、 The test is to prove that the program is wrong , Instead of proving that the program is error free ;
2、 Find errors not found during software development and software implementation ;
3、 Effectively test the errors not found in the process of software development and implementation .
thus it can be seen , The ultimate function of software testing for software development is to ensure the quality of software .
Software testing can be divided into three phases , The first stage is to find out the software that is already running or under development bug, The second stage is to get rid of the problems in the software bug Outside , Measure software , Clearly grasp the measurement of software quality , The third stage is to propose standards for software quality measurement , Improve the quality of the software under test , Software testing is regarded as a project , That is to say, testing is also a development process .
software test Is a part of the software development process Important steps , In other words, software testing should be Throughout the software development process Of Every stage , To ensure that in the process of software development , Find problems at any time , Convenient for software developers Make timely modifications .
One 、 Learning route

Two 、 The skill tree
2.1 Total skill tree

2.2 Dark horse skill tree




3、 ... and 、 Theoretical map

Four 、 Introduction to software testing
1、 Definition of software testing
Definition of software testing ( The way + Purpose , It's a process )
IEEE A standard definition of software testing , as follows : Use artificial perhaps Automatically methods function perhaps Determination Of a system The process , Its Purpose lie in test Is it Meet the specified needs Or find out Expected and actual results Between The difference .
2、 The need for
2.1 Software is always flawed
Only through test , Can only be Finding software defects . There is only a Defects found , Only then can Software defect From software product Or software System in clear get out .
2.2 Defects bring us great losses
Defects in the software have brought us The loss is huge , This also shows the importance of software testing The need for and Importance .
2.3 Testing is the basic building block
test It's all Engineering The basic unit of composition , Naturally also software development Of An important part .
2.4 Product stability and product revenue
The better the tester is high , The more time it takes to find a software problem Good morning! , The easier the software is correct , After the product is released, the more Stable , The more money the company makes many .( Microsoft's example )
3、 The relationship between software testing and quality assurance
3.1 Definition of quality assurance
Software quality assurance (Software Quality Assurance SQA) Activities are carried out through the planned implementation of software products review and Audit To verify that the software Up to standard The system of engineering , Through coordination 、 Review and track for useful information , Form analysis results to guide software The process .
3.2 The relationship between software testing and quality assurance
3.2.1 Testing is a technical The job of , Focus on product Evaluate and verify
Software testing is SQA important methods One of , by SQA Provide the required data , As a quality evaluation Objective basis .
3.2.2 SQA It's a management Work , Focus on technological process Review and monitoring of
SQA To guide the 、 supervise Software testing plan and perform , Supervise and urge Of the test work The result is objective 、 Accurate and effective , And assist in testing technological process Of improvement .( Guide the implementation of 、 Supervise and urge the results 、 Help improve )
5、 ... and 、 Basic concepts
1、 Software defect
1.1 Definition
( What is it? + consequence )
finger Computer system perhaps Program Existing in whatever A kind of Damage to normal operation capability Of problem 、 error perhaps Hidden functional defects 、 defects , As a result, software products In a way On Can't meet the needs of users .
1.2 performance
- The actual results are inconsistent with the expected results
- Operation error , Including interruption of operation 、 System crash 、 Interface chaos
- function 、 Features are not implemented or partially implemented
- The data is not correct 、 Insufficient precision
- The design is unreasonable , There are defects
- Other problems that users cannot accept , Such as long access time 、 The interface is not beautiful
2、 Classification of software testing


- Press
Testing phaseThere areunittest 、Integratetest 、confirmtest 、Systemtest 、check before acceptancetest - Press
Whether to runThe program is divided intoThe static testandDynamic testing - Press
Whether to view the source codeThere areWhite boxTesting andBlack boxtest - Press
Test purposeThere areA functional testandPerformance testing(pressuretest 、Usabilitytest 、Securitytest 、reliabilitytest ) OtherYesReturn toTesting andRandomtest
2.1 Static and dynamic testing
2.1.1 The static test
- Static testing is about software
productOfdemandandDesign specificationsConductreview、 To the procedureCodeOfto review a caseetc. - Statically analyzed
Error checking and analysis functionIs the result of other methodsThere is no substitute forOf , More and more use ofToolsConductautomationanalysis
2.1.2 Dynamic testing
- Dynamic testing is to pass
Actually run the programFind the error , Through observationCode running process, obtainsystem information, For the systemBehaviorConductverification.
2.2 White box test and black box test
2.2.1 White box testing
- Also known as structured testing or
Logic driven testing - Known products
InsideOfworking process( programmaticstructureandsentence) - according to
The internal structureThe test program , Check each... Of the programaccessCan you pressScheduled requirementsWork
2.2.2 Black box testing
- Also known as
Data driven testing, Think of the program as aBlack box IgnoranceInternal to the programstructureandcharacteristic- Test directly , Check whether the system functions according to
Requirements specificationsNormal use as specified
2.3 Test plans and test cases
2.3.1 Definition of test cases
The test case is for Specific test purposes And designed Testing conditions 、 Test data And Relevant test procedures A specific Use instances or scenarios .
6、 ... and 、 The main method
1、 Method based on input field
1.1 Division of equivalence class
1.1.1 Definition
The equivalence class partition method is to solve the problem of how to select the appropriate data subset to represent the whole data set , By reducing the number of tests “ reasonable ” Cover , Covering more possible data , Find more software defects .
1.1.2 Effective equivalence class
- It is meaningful for program specification 、 A collection of reasonable input data
- Using effective equivalence classes , It is possible to verify that the procedure is
RealizationSpecificationsBook in advanceFunction and performance of - An effective equivalence class can be a , It can be multiple
1.1.3 Invalid equivalence class
- It doesn't make sense to program specifications 、 A collection of unreasonable input data
- Use invalid equivalence classes , It can check whether the implementation of program function and performance has
Do not conform to theWhere required by the specifications - Invalid equivalence class has at least one , There could be multiple
1.1.4 Calculation
1.2 Boundary value division method
1.2.1 Definition
Many errors occur at the boundary of the input or output range , Therefore, set test cases for various boundary conditions , Defects can be found more effectively .
Mainly Calculation
1.2.2 Calculation
2、 A combination based approach
2.1 Decision table method
2.1.1 Definition
With the help of In tabular form Finish right Input condition Of Combination design , To achieve completion Combination overlay The test effect of .
- Condition stake : List all the conditions of the problem
- Action post : List possible actions to be taken against the problem
- Condition item : Specific assignments for the listed conditions , That is, each condition can take true value and false value
- Action items : List the actions that should be taken in case of condition item combination
- The rules : The specific value of any combination of conditions and the corresponding operation to be performed . In the decision table, a column that runs through condition items and action items is a rule .
2.1.2 step
- List all condition piles and action piles
- Fill in the conditions
- Fill in the action items , Specify the initial decision table
- simplify 、 Merge similar rules or conditions
2.1.3 Calculation
2.2 Cause and effect diagram
2.2.1 Definition
Various combinations of inputs are analyzed by graphical method , Write a decision table , So as to design the corresponding test cases .
2.2.2 step
- Analyze the equivalence class , Assign the I / O to the identifier , Analyze semantics , Find out the relationship
- Relationship correlation , And mark the impossible combinations as constraints or restrictions , Form a cause and effect diagram
- The cause and effect diagram is transformed into a decision table
- Each column of the decision table can be used as the basis for designing test cases
2.2.3 Calculation
3、 Method based on logical coverage
Logical coverage is one of the most widely used structure The test method , The logic covers the internal of the program Logical structure Design test cases for the foundation . It is required to have a clear understanding of the logical structure of the program under test , You can even master all the details of the source program .
3.1 Determine coverage
3.1.1 Definition
The basic idea is to design several test cases , Run the program under test , Make every true branch and false branch in the program experience at least once , That is, whether the judgment is true or false has been satisfied .
A decision represents a branch of the program , Decision covering is also called branch covering .
3.2 Conditional coverage
3.2.1 Definition
The basic idea is to design several test cases , Run the program under test , bring Every judgment in Every condition The value of at least one time .
3.3 Determine conditional coverage
3.3.1 Definition
Decision conditional covering is the intersection of decision covering and conditional covering , Design enough test cases , So that all possible results of judgment are executed at least once , meanwhile , All conditions in the judgment condition may be executed at least once .
3.4 Conditional combination covering
3.4.1 Definition
The basic idea is to design several test cases , Run the program under test , Make all possible occurrences of each condition in the judgment occur at least once , And the judgment result of each judgment itself appears at least once .
Find that all possible combinations of these results occur at least once .
3.5 Basic path coverage
3.5.1 Definition
The basic idea is to design all test cases , In the overlay All possibilities Of Execution path .
3.5.2 Three methods for computing ring complexity
- The number of regions in the flow graph is equal to the ring complexity
- Flow chart G Ring complexity in V(G)=E-N+2, among E Is the number of edges in a flow graph ,N Is the number of nodes in the flow graph .
- Flow chart G Ring complexity in V(G)=P+1, among P Is the number of decision nodes in the flow graph .
3.5.3 Calculation
7、 ... and 、 The system test
1、 A functional test
1.1 Definition
- Consider the interaction between modules
- Consider the application environment of the system
- The measurement standard is to realize the functions required in the product specification
- Simulate the user to complete the business test from beginning to end , Ensure that the actual business needs of users are met
1.2 Example
- WEB Graphic test
- Form test
- Page link test needs to be verified
- HTTP authentication 、SSL、TLS
- Virtual host , Universal gateway interface
- Scripting language integration
- Database test
- Design language tests
- Cookies test
1.3 regression testing
Regression testing serves two purposes
- The modification has achieved the intended purpose , If the error is corrected 、 New functions have been implemented 、 Be able to adapt to the new operating environment, etc
- It does not affect the correctness of the original functions of the software
2、 Performance testing
Just to discover System performance problems or Obtain system performance related indicators And the test .
Generally in The truth 、 Specific load Under the condition of , adopt Tool simulation Of the actual software system Operation and its operation , Simultaneous monitoring performance The indicators , Finally, the test results are analyzed to determine the performance of the system .
2.1 Performance indicators
- Various indicators of the server (CPU、 Memory usage, etc )
- Various indicators of the background database
- The network traffic
- response time
Specific indicators
- Throughput of data transmission
- Data processing efficiency
- Response time for data requests
- Memory and CPU Usage rate
- Connection time 、 Send time
- The processing time 、 Page download time
- First buffer time
- Connections per second
- Total transactions per second 、 Number of pages downloaded per second
- Hits per second 、 Per second HTTP Number of responses
- Retries per Second
2.2 Pressure test
2.2.1 Definition
In a need to be abnormal ( Such as long-term peak ) Number 、 Frequency or resources , Perform repeatable load tests , Check the procedure for Abnormal situation Of Resistance , find Performance bottleneck perhaps Other instability problems .
2.3 Safety test
2.3.1 Definition
comprehensive test The effectiveness of the measures to prevent dangerous states specified in the software requirements specification and the effectiveness of the measures under each dangerous state reaction , The structure used to improve security in software design 、 Algorithm 、 Fault tolerance 、 redundancy 、 Interrupt processing and other schemes are tested , And is critical to safety Software units and software components , Perform enhanced tests separately , To confirm that it meets the security requirements .
2.4 Reliability test
2.4.1 Definition
Reliability refers to the ability of a product to complete specified functions under specified conditions and within specified time . Theoretically , A reliable software system should be correct 、 complete 、 coincident 、 Robust .
8、 ... and 、 The acceptance test
1、 Definition
After the software product has completed the system functional and non functional tests 、 Software testing activities before product release . It's the last stage of technical testing , Also known as delivery testing .
Nine 、 automated testing
1、 Definition
It is a concept relative to manual testing , The operation process of manually running test cases one by one is replaced by the process automatically executed by the test tool .
The use of testing tools is the main feature of automated testing .
Ten 、 Add
1、 The main components of the defect report
title 、 Operation steps 、 Expected results 、 The actual result
2、 Test requirements analysis
- Understand in detail and dig deep into the requirements
- Determine test scope
3、 Software defects are classified by severity

4、 Function of interface test
Interface testing is Test the interface between system components A test of . It is mainly used for Test system and external system Between Interface , as well as Between sub modules in the system The interface of .
The focus is on interfaces Parameter passing The correctness of the 、 Interface Function realization The correctness of the 、 Output results The correctness of the 、 as well as Fault tolerance for various abnormal conditions The integrity and rationality of .
5、 Smoke testing
It refers to the large-scale testing of a new version of software , First verify the software Basic function Whether to implement , Is there a Testability .
6、 What is a test report , What makes up
- Basic information about software defects
- A detailed description of the defect
- Traceable information
- Test environment description
- Necessary accessories
7、 Classification of tests
- According to the test level
- By test object
- According to the test stage
- According to the test purpose
- Other
边栏推荐
- 帆船动力学仿真分析
- 蓝桥杯——最小框架
- 施努卡:3d视觉检测方案 3d视觉检测应用行业
- Is virtual DOM really the fastest?
- Imx6dl4.1.15 supports EIM bus (upper) - actual operation and modification.
- 如何看待软件测试培训?你需要培训吗?
- 查看tensorflow是否支持GPU,以及测试程序
- 感知健康生活 赋能无界连接 ——为OpenHarmony 3.1生态构建贡献芯海力量
- [translation] how Bink drives the digital loyalty transactions of some of the largest banks in the UK
- Markdown skill tree (8): code blocks
猜你喜欢
随机推荐
cv2.cvtColor
Markdown skill tree (4): link
项目中 if else 的代替写法
九州云助力内蒙古“东数西算”工程,驱动测绘行业智慧新生态
Markdown skill tree (5): picture
IMX6DL4.1.15支持EIM总线(上)——实际操作,修改内容。
1183: patient queue
How to talk about salary correctly in software test interview?
Concurrent idempotent anti shake
关于KingbaseES临时文件过大问题
KingbbaseES V8R6集群维护案例之---集群之间数据迁移
Appium automation test foundation ADB common commands (II)
[FreeRTOS] interrupt mechanism
TF. Repeat and stack operations of slim
Listen to textarea input through Keyup to change button style
golang 修改 结构体切片的值
Reflection modification final
SAP UI5 初学 ( 一 )、简介
Golang modifying the value of a structure slice
【FreeRTOS】中断机制






