当前位置:网站首页>Software testing - use cases
Software testing - use cases
2022-07-19 04:15:00 【Old style pot stuffed pork:)】
List of articles
One 、 The basic elements of test cases
The test case (Test Case) It is a set of sets provided to the tested system for the purpose of implementing the test , This set of collections contains : Test environment 、 Operation steps 、 Test data 、 Elements such as expected results .
A good test case is that a person who is not familiar with the business can also test quickly according to the use case
Criteria for evaluating test cases : Compare the evaluation criteria of good and bad code
- Use cases are clearly expressed , No ambiguity .
- The use case has strong operability .
- The input and output of use cases are clear . A use case has only one expected result .
- The maintainability of use cases is good .
- Use cases have high coverage of requirements .
- Exposure procedures Bug Your ability is strong .
Two 、 Design method of test case
2.1 The overall design method of test cases
Demand based design
RBT( Requirements-Based Testing) It is a requirement based testing method , Will make the test more effective , because It enables testing to focus on the root causes of quality problems , Demand .
Requirements based testing is one of the most fundamental software testing , Focus on the following two key issues .
(1) Verify that the requirements are correct 、 complete 、 No ambiguity , And the logic is consistent .
(2) From you to “ Black box ” The angle of , Design sufficient and necessary test sets , To ensure that the design and code can fully meet the requirements .
2.2 Specific design method ( Black box testing )
2.2.1 Equivalence class
Input... As required ( The output will be considered in special cases ) Divided into several equivalent classes , Select a test case from the equivalence class , If this test case passes the test , It is considered that the test of the equivalent class represented passes , In this way, you can use fewer test cases to achieve as many functional coverage as possible , Solved the problem of not exhaustive testing .
- Effective equivalence class : The specification of the procedure is reasonable 、 A collection of meaningful input data , Use valid equivalence classes to verify whether the program has achieved the functions and performance specified in the specification
- Invalid equivalence class : According to the requirement specification , A collection that doesn't satisfy the requirements .
Equivalence classes only consider the classification of input fields , The combination of input fields is not considered , Other design methods and supplements are needed .
2.2.2 The boundary value
Boundary value analysis is a kind of black box test method to test the input or output boundary value . Generally, the boundary value analysis method is used as a supplement to the equivalence class division method , In this case , Its test case comes from the boundary of equivalence class .
2.2.3 Cause and effect diagram
Cause and effect diagram is a simplified logic diagram , It can intuitively show the program input conditions ( reason ) And output actions ( result ) The interrelationship between . Causality diagram method is a systematic method to design test cases with the help of graphics , It is especially suitable for the program under test with a variety of input conditions 、 The output of the program depends on the input conditions .
The steps of designing test cases by causality diagram method are as follows :
(1) Analyze all possible inputs and possible outputs .
(2) Find out the correspondence between input and output .
(3) Draw a cause and effect diagram .
(4) Turn the cause and effect diagram into a decision table .
(5) Match the decision table to each test case .
2.2.4 Orthogonal arrangement
The purpose of orthogonal method is to reduce the number of use cases . Cover pairs of inputs with as few use cases as possible .
Orthogonal test design (Orthogonal experimentaldesign) It is a design method to study multi factors and multi levels , It is based on orthogonality , Some representative points are selected from the total level combination of test factors for the test , Through the analysis of this part of the test results, we can understand the overall test situation , Find the best combination of levels . Orthogonal experimental design is a method based on orthogonal table 、 high efficiency 、 Fast 、 An economic experiment .
- factors (Factor): In an experiment , The variables to be investigated are called factors ( Variable )
- level ( Bit level )(Level): Within the scope of the test , The value of the factor being investigated is called the level ( Value of variable )
Composition of orthogonal table : - Row number (Runs): The number of rows in an orthogonal table , That is, the number of tests , use N representative .
- Factor number (Factors): The number of columns in an orthogonal table , use C representative .
- Horizontal number (Levels): The maximum number of values that can be obtained by any single factor . The values contained in the orthogonal table are from 0 To count “ Horizontal number -1” Or from 1 To “ Horizontal number ”, use T representative .
- The representation of an orthogonal table : L= Row number ( Horizontal number * Factor number ) L=N(TC)
- Two properties of orthogonal table :(1) The numbers in each column appear the same number of times .(2) Each ordinal pair of any two columns has the same number of occurrences .
The steps of designing test cases by orthogonal method :
1、 What are the factors ( Variable )
2、 What are the levels of each factor ( Value of variable )
3、 Choose a suitable orthogonal table
4、 Map the values of variables to the table
5、 Consider the combination of factor levels in each row as a test case
6、 Add use case combinations that you think are suspicious and do not appear in the table
2.2.5 Scene design method
Today's software almost uses event triggering to control the process , When the event is triggered, the scene is formed , Different triggering sequence and processing results of the same event form event flow . This method can vividly describe the scene when the event is triggered , It is helpful for the test designer to design test cases , Test cases are easier to understand and execute .
A typical application is to use business flow to connect isolated function points , Build an overall business sense for testers , So as to avoid falling into the wrong tendency of ignoring the key points of business process in functional details .
2.2.6 Wrong guess
Error guessing is a test method that experienced testers like to use .
Based on experience and intuition , Find out what you think may be wrong in the program , Design test cases purposefully . Experience may come from more testing of a business , It can also come from the feedback of after-sales users , Or sort it out from the fault management library bug. Sort out where the product was prone to problems in the past , The more problems there are , Potential bug The more .
Testers can use other methods of designing test cases to design test cases of requirements , Use error guessing as a supplementary way .
2.2 What is the validity of test cases ?
1、 The function corresponding to the test case has been deleted , Inoperable
2、 Executing a test case does not find BUG, Actually there are BUG
3、 Executing a test case found BUG
4、 Executing a test case does not find BUG, Actually BUG The modified
边栏推荐
- EAS(能量感知调度)绿色节能调度器
- 机器学习10:集成学习
- 笔记本电脑插入耳机仍然外放(亲测有效)
- Intel experts share: how to program efficiently on XPU architecture? Zhiqiang Research Institute
- Wechat e-book reading of small program graduation project (4) opening report
- 小程序毕设作品之微信电子书阅读小程序毕业设计(6)开题答辩PPT
- MAUI 框架入门学习05 MVVM数据模型理解
- C # use this keyword to concatenate constructor to call method
- Chapter 4 performance platform godeye source code analysis - monitoring module
- 寻找数组的中心下标
猜你喜欢

Nearly 90% of servers can be saved, but the anti fraud efficiency has increased significantly. Why is PayPal's plan to break the "Ai memory wall" so cost-effective?

Unity - 如何修改一个 Package 或是如何将 Package Local化

Academic sharing | design and development of multi staining pathological image information evaluation system based on openvino
![[database] knowledge and skills at the end of the term ----- Chapter 9 database design](/img/8d/90ccb1eac114706d27fccc1250b58c.png)
[database] knowledge and skills at the end of the term ----- Chapter 9 database design

FTXUI基础笔记(botton按钮组件基础)

Build a portrait matting server based on openvino model server

小程序毕设作品之微信在线教育视频点播学习小程序毕业设计(3)后台功能

2022 Yangtze River Delta mathematical modeling: Gearbox Fault Diagnosis

Understand │ what is cross domain? How to solve cross domain problems?
![[seventh issue of notebook series] download and use of openvino pre training model](/img/74/d5958137ddabadef1724afda5656e1.png)
[seventh issue of notebook series] download and use of openvino pre training model
随机推荐
C# 构造函数(Constructors)简单讲解
图形验证码验证
Record a troubleshooting when overseas pictures cannot be loaded
ffmpeg中AVFrame\AVPacket与自己的数据交互
小程序毕设作品之微信电子书阅读小程序毕业设计(8)毕业设计论文模板
What does the project set price mean?
Nearly 90% of servers can be saved, but the anti fraud efficiency has increased significantly. Why is PayPal's plan to break the "Ai memory wall" so cost-effective?
机器学习11:代价敏感学习
Introduction to Maui framework 05 MVVM data model understanding
Welcome to Hensen_ Blog directory of (full site navigation)
英特尔+联想共同推出开源云解决方案
WPF cannot find resource file problem
Chapter 2 performance platform godeye source code analysis - data module
【数据库】期末必知必会-----第二章 关系数据模型
C# 详解out输出参数
[database] must know and be able at the end of the term ----- Chapter 1 database overview
《云智面对面》直播等你来: 算力重新定义生产力
微信附近的人小程序怎么开(开通附近小程序的方法)
51单片机一究到底输入模式
Wechat e-book reading applet graduation design of applet completion works (2) applet function