当前位置:网站首页>How to design test cases
How to design test cases
2022-06-30 22:14:00 【wangmcn】
Catalog
1.2、 Use case design principles
1.3、 Use case design dimension
2.1、 Test case writing premise
2.3、 Use case level distribution
1、 Test case design
1.1、 Determine test scope
1、 There must be a complete requirements document
2、 Requirements have been reviewed and clarified
3、 There must be a complete list of functions
1.2、 Use case design principles
1、 follow “ The boundary value ” The principle of full coverage
2、 follow ” Equivalence class partition scenario “ The principle of full coverage
3、 follow ” The test case path is unique “ principle
When there are multiple paths , You need to create a new use case to cover . A use case covers only one test point . Reduce the risk of missing measurements .
4、 follow “ Single use case coverage is minimized ” principle
If you want to test a function A, It has three sub function points A1,A2 and A3, There are two ways to design test cases :
Method 1: Cover three sub functions with one test case - TestA1A2A3
Method 2: Three separate use cases are used to cover three sub functions - TestA1,TestA2,TestA3
Method 2 Followed “ Single use case coverage is minimized ” principle , benefits , When the use case execution fails , Reduce recurrence / Positioning complexity
5、 follow “ Minimum coupling between test cases ” principle
(1) Use the results of the previous test case carefully , As input for the next test case .
(2) Every test case , Should be completely independent .
The advantage of this is that it is easy to pull test cases 、 Reuse 、 Maintainable 、 Reduce subsequent input costs .
1.3、 Use case design dimension
1、 function
(1) positive ( normal ) scene
(2) reverse ( abnormal ) scene
2、 Non functional
(1) performance
Performance testing , First of all, we need to have specific 、 Clear performance index requirements .
Performance focus indicators :CPU、Memory、IO、 Network transmission rate, etc .
a. Item ( modular ) performance , such as SDK、 Algorithm 、 Individual performance requirements
b. Overall performance , Performance requirements after system integration
c. Network transmission performance
(2) reliable ( Stable ) sex
a. Time dimension
b. Load stability
(3) Robustness,
a. watchdog
b. Abnormal power failure
c. Restart again and again
(4) Ease of use
a. Ease of installation
b. O & M ease of use
c. Functional ease of use
(5) customer experience
For example, video playback effect 、 Whether the operation is smooth 、 Startup time, etc .
(6) Security
a. Data storage security
b. Network transmission security
2、 Test case writing
2.1、 Test case writing premise
1、 The test scope has been determined
2、 The test points have been sorted out
3、 Use case transformation path : Business needs - functional requirement - Test requirements - Test point - The test case
2.2、 Use case title
Outline the main content of the test case , Clarify the use case test intent
1、 The language is simple , Clarify what this use case does
2、 A complete sentence
3、 follow “ Conditions / action " The rules
2.3、 Use case level distribution
1、Lve 1: basic (~10%)
System basic function use cases , It can be used for smoke test during version submission , It can be used as the basis for whether the version passes the transfer test and business acceptance .
Basis of division : The failure of the execution of this use case will lead to the failure of many important functions .
for example : Switchgear 、 Upgrade, etc. .
2、Lve 2: important (~20%)
Important functional use cases in the system .
Basis of division : It mainly includes some functions related to interaction 、 Various application scenarios 、 Normal function test cases that are frequently used by customers .
for example : Equipment report 、 Video playback effect 、 Preview and other functions .
3、Lve 3: commonly (~60%)
General functions of the system .
Basis of division : General functional use cases , Test cases including exception paths ; The frequency of use is lower than 2 Level use cases .
for example : Form input boundary value 、 Verification of special characters, etc .
4、Lve 4: Obscure (~10%)
There are generally few use cases at this level . It is mainly some functions that are rarely used . If the use case execution fails , Test cases that will not cause too much harm to the system and business .
Basis of division : This use case corresponds to the less common preset conditions and data settings .
for example : Logging errors, etc .
2.4、 Preset conditions
1、 Key prerequisites for executing test cases
2、 Let the executor of the use case know more about the current state of the system
3、 Preset conditions cannot block the execution of test cases
2.5、 Operation steps
1、 It needs to be clear “ Test key inputs ” data
2、 The operation path is unique , If it is not unique, multiple use cases cover ( To reduce the coupling )
3、 With “ Process oriented ” Write in the form of
(1) The process description is accurate 、 unambiguous .
(2) The context must be consistent .
benefits : Reduce execution costs 、 Reduce the cost of subsequent maintenance
2.6、 Expected results
1、 Each step of operation has corresponding expected results
2、 The expected result must be objective 、 Decidable
(1) That is to say, the correctness of test execution results can be determined , Each test case should have the corresponding expected results .
(2) The expected results prohibit the use of correct , normal , Vague subjective words like mistakes .
3、 The expected result must meet the demand
4、 The expected result must be certain
For the same test case , The execution results of the system should be the same 、 affirmatory .
3、 Test case review
3.1、 Before review
1、 Make the review object familiar with test cases in advance
2、 Talk about requirements in reverse
3、 Clarify the final test scope
3.2、 Under review
1、 test
(1) Explanation of test cases .
(2) Once again, make a deep understanding of the requirements .
2、 Development
(1) From the perspective of development and coding , Check whether the test case is missing .
(2) From the perspective of code implementation , Provide suggestions on the internal association logic of the module .
3、 The product manager
(1) Check whether the test case scenario meets the business requirements .
(2) Provide suggestions for test cases from the customer's point of view .
3.3、 After review
1、 Send and file review minutes
2、 Update test cases according to review recommendations
Highlights
Linux Common command wallpaper
The test framework pytest series
Automatic test framework structure diagram
Mobile security framework (MobSF)

边栏推荐
- 1. Summary of wechat applet page Jump methods; 2. the navigateto stack does not jump to the tenth floor
- 2022中国国潮发展新动向
- How to use filters in jfinal to monitor Druid for SQL execution?
- Nansen double disk encryption giant self rescue: how to prevent the collapse of billions of dominoes
- Document layout analysis: a comprehensive survey 2019 paper learning summary
- Look at the top 10 capabilities of alicloud cipu
- B_ QuRT_ User_ Guide(33)
- 【BSP视频教程】BSP视频教程第19期:单片机BootLoader的AES加密实战,含上位机和下位机代码全开源(2022-06-26)
- Is machine learning suitable for girls?
- Error reporting: internal error XFS_ WANT_ CORRUPTED_ GOTO at line 1635 of file fs/xfs/libxfs/xfs_ alloc. c.
猜你喜欢

Is there a shortage? No need to download the free online resources! 2022 favorites must have it!

Troubleshooting the problem of pytorch geometric torch scatter and torch spark installation errors

《安富莱嵌入式周报》第271期:2022.06.20--2022.06.26

latex中 & 号什么含义?

Windbg调试工具介绍

Graduation project

A new one from Ali 25K came to the Department, which showed me what the ceiling is

The Jenkins download Plug-in can't be downloaded. Solution

1. Summary of wechat applet page Jump methods; 2. the navigateto stack does not jump to the tenth floor

RP prototype resource sharing - shopping app
随机推荐
电脑版微信文件存储在哪个文件夹可以找到
Nansen double disk encryption giant self rescue: how to prevent the collapse of billions of dominoes
机器学习工作要求研究生吗?
看阿里云 CIPU 的 10 大能力
JVM Part 21 of interview with big companies Q & A
How to realize the center progress bar in wechat applet
Excitatory neurotransmitter glutamate and brain health
Technical principle of decentralized exchange system development - digital currency decentralized exchange system development (illustrative case)
Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource could
Qsort function and Simulation Implementation of qsort function
Alibaba Kube eventer MySQL sink simple usage record
牛逼|珍藏多年的工具让我实现了带薪摸鱼自由
The Jenkins download Plug-in can't be downloaded. Solution
B_ QuRT_ User_ Guide(34)
[BSP video tutorial] BSP video tutorial issue 19: AES encryption practice of single chip bootloader, including all open source codes of upper and lower computers (June 26, 2022)
《安富莱嵌入式周报》第270期:2022.06.13--2022.06.19
Flip the linked list ii[three ways to flip the linked list +dummyhead/ head insertion / tail insertion]
I want to know who I need to know to open a stock account? In addition, is it safe to open a mobile account?
请问,启牛证券开户,可以开户吗?安全吗?你想要的答案全在这里
交易所系统开发如何开发?数字货币交易所系统开发成熟技术案例