当前位置:网站首页>Design and common methods of test case documents
Design and common methods of test case documents
2022-07-04 10:45:00 【A little boy who studies hard】
Principles for writing test case documents
- Of use cases Clarity
Clear description .
Result only . - Of use cases Representative
It can represent and cover all kinds of reasonable and unreasonable .
It can represent and cover all kinds of legal and illegal .
Can represent and cover all kinds of boundaries and cross-border . - The result of the use case Decidability
That is to say, the correctness of test execution results can be determined .
Each test case should have the corresponding expected results .
Black box test method
- Equivalence class division – Classify the test conditions :
Equivalence class division : Put all the possible input data , That is, the input field of the program is divided into several parts ( A subset of ) Equivalence class , Then select a few representative data from each subset / Equivalence classes as test cases .
It is mainly divided into effective equivalence classes ( positive , No mistake. ) Invalid equivalence class ( negative , Throw an error )
Case study : Wechat sends red envelope :0.01——200
analysis :
1: To test the function of normal transmission : Effective equivalence class :0.01-200
2: To test exception sending , Close to the user's use scenario : Invalid equivalence class :1、 Less than 0.01 2、 Greater than 200:0-200.01
The above is the equivalence classification
3: When there are too many tests , Choose the combined boundary value method : Exactly equal to / Greater than / Values less than the range , As test data
Tap hidden needs :
1: The red envelope amount must be a number
2: Red envelope input cannot exceed two decimal places
3: The red envelope amount cannot be blank
4: The red envelope amount cannot be negative and 0
The test case : Equivalent valid class
Use case design description Test data Cover equivalence class ( The main points of : Effective equivalence classes cover as many effective equivalence classes as possible with one use case )
The selection of invalid equivalence classes is opposite to that of valid equivalence classes ( A column covers only one )
Case summary : WeChat Lucky Money , Email registration
Boundary value analysis – Test for critical conditions ( This kind of method is often used in combination with the equivalence class division ):
The principle is to take values on the boundary of conditions or ranges , According to the specific situation , Take respectively equal to 、 a little bigger than 、 Slightly less than the condition or range value .
It's mainly : Two point method , Three point method , Four point method
Common boundary value situations :
The cursor is at the top left of the screen 、 The bottom right position ;
The first and last lines of the report ;( Two point method )
The first and last of the array elements ;( Two point method )
The second part of the cycle 0 Time , First and penultimate 2 Time 、 Count down for the first time ( Four point method )A false assumption – Based on empirical intuition, the calculation is wrong :
According to intuition or Experience Speculate on various errors that may exist in the program , Thus there are Write targeted test cases to check these errors .
Higher requirements for the ability of testers .
characteristic :
Highly subjective
Compared with the test set generated by other methods , Easier to find defectsCause and effect diagram – A combination of multiple test conditions :
Cause and effect diagrams are suitable for combinations with various input conditions , And there is a certain restrictive relationship between various conditions
The advantages of cause and effect diagram ∶
1. The combination of input conditions is fully considered , Sufficient coverage of the combination .2. Ultimately, each use case covers multiple input scenarios , It is helpful to improve the test efficiency .
3. During the design process , The constraints between input conditions are considered , Avoid invalid use cases , The effectiveness of use cases is high .
4. Be able to get the expected output of each test item at the same time
shortcoming ∶
1. When there are many inputs of the tested characteristics , The scale of the decision table will be very large .
2. The constraints between inputs cannot effectively distinguish whether the input really needs to be combined , It will cause the input that does not need combination test to be combined , Thus producing use case redundancy .Scene analysis – Design different scenarios according to business processes :
Scenario analysis is applicable to many process branches , The logic is more complicated , Conditions 、 There are many functional requirements under special circumstances .
You can use the flow chart to sort out the flow lines and test them one by one , If the development is not provided, you need to paint by yourself , If provided, it can generally be found in the requirements specification .Output domain coverage : Overwrite all outputs , Regardless of input
There are valid and invalid rules for visible parameters in the requirements interface , Unlimited input conditions , There are output constraints , We need to push the input backward from the output according to the business ,
1. Ask the developer or find out all the output results according to the code
2. Check whether the written test case covers all the output results , If there are test cases that are not covered, supplement the test cases
3. Backward deduce the test case steps and test data according to the output resultsInput domain coverage : Overwrite all inputs , Regardless of the output , Related to equivalent class boundary value method
Anomaly analysis : When testing, we must test the abnormal conditions ( Abnormal operation 、 Analyze the faults caused by software and hardware defects ), power failure , Abnormal condition of network disconnection , Design test cases based on this .
Mainly for testing the system Fault tolerance 、 Fault recovery capability To test .
Simply put, it means that the system breaks down artificially , Then check the fault recovery capability of the system .
On the other hand , Abnormal test for the system ( Did you do something you shouldn't do ) Also through anomaly analysis and other means .Exploratory testing : most , No requirements, no use cases , Information is not complete , Pit , Or test according to your own experience , Try to test the system function
State migration
Orthogonal experiment
Decision table
边栏推荐
- Recursion and divide and conquer strategy
- Write a thread pool by hand, and take you to learn the implementation principle of ThreadPoolExecutor thread pool
- Rhsca day 11 operation
- Network connection (III) functions and similarities and differences of hubs, switches and routers, routing tables and tables in switches, why do you need address translation and packet filtering?
- Static comprehensive experiment ---hcip1
- Tables in the thesis of latex learning
- Jianzhi offer 04 (implemented in C language)
- Basic principle of servlet and application of common API methods
- [test theory] test the dimension of professional ability
- Delayed message center design
猜你喜欢
The future education examination system cannot answer questions, and there is no response after clicking on the options, and the answers will not be recorded
If you don't know these four caching modes, dare you say you understand caching?
PHP code audit 3 - system reload vulnerability
[FAQ] summary of common causes and solutions of Huawei account service error 907135701
leetcode1-3
如果不知道這4種緩存模式,敢說懂緩存嗎?
【Day2】 convolutional-neural-networks
Debug:==42==ERROR: AddressSanitizer: heap-buffer-overflow on address
Introduction to extensible system architecture
Work order management system OTRs
随机推荐
Network disk installation
Reasons and solutions for the 8-hour difference in mongodb data date display
Leetcode48. Rotate image
Differences among opencv versions
The last month before a game goes online
Communication layer of csframework
Basic principle of servlet and application of common API methods
C language - stack
1. Circular nesting and understanding of lists
RHCE - day one
[Galaxy Kirin V10] [desktop] login system flash back
[Galaxy Kirin V10] [server] set time synchronization of intranet server
Es advanced series - 1 JVM memory allocation
Ruby time format conversion strftime MS matching format
Idea SSH channel configuration
[Galaxy Kirin V10] [desktop] FTP common scene setup
2020-03-28
Learning XML DOM -- a typical model for parsing XML documents
Doris / Clickhouse / Hudi, a phased summary in June
[Galaxy Kirin V10] [server] system partition expansion