1. Software quality model
functional | Check whether service functions meet requirements |
---|---|
reliability | Fault tolerance (recovery time, recovery ability) |
Ease of use | Can read it, can use it |
efficiency | Performance (response time, resources consumed (PU, memory)) |
maintainability | Facilitate subsequent function development and maintenance |
portability | Software needs to work well in different software and hardware environments |
Information security | The degree to which information is secure during transmission or storage |
2 Software test cases
2.1 Concept of software test cases
A document, in the form of Excel, Xmind, etc., designed for a specific purpose (to verify that the developed code implementation meets the user’s needs)
Test caseCopy the code
2.2 template
- ID: unique
- Module: The module to which the test belongs
- Priority:
- Function: shows the sequence of test case execution
- Classification:
High, medium, low- P0: It is designed to ensure that the most important functions and basic processes of the software work properly
- P1: Secondary features and minor features
- P2: UI, boundaries, and error Settings
- P3: Complex error information or uncommon error information
- Use-case title: Uniqueness by name
- Prerequisite: This parameter is mandatory
- Test steps:
- Requirements: be as detailed as possible
- Test data: fill in as required
- Expected result: Expected result based on data or procedure
- Test results:
pass | through |
---|---|
fail | failure |
block | Unable to continue filling in due to a bug |
Na | Cannot be executed due to lack of environmental resources |
- Test version: Indicates the software version used in the current test task
- The tester
- Note: Problems and solutions of use cases fail bugID If you set block or Na, enter the reason in the remarks
2.3 Functions of Test Cases
- It is easy to clarify the test thinking and ensure that the function points that need to be covered are not missing
- Easy to estimate test effort
- Prepare test data in advance
- Easy to control the test work progress
- Facilitate regression testing
- Facilitate the organization of test work, improve test efficiency, reduce test handover cost
3. Equivalence class division
Requirements analysis, equivalence classification, valid data, invalid data
3.1 QQ Account – Case study
QQ account: 6-10 natural numbers
3.2 Equivalence class division method
- define
Find a subset of all the test data that has some common feature
3.3 classification
- Valid equivalence class: a subset of data satisfying a condition
- Invalid equivalence class: a subset of data that does not meet a condition
3.4 Design test case steps
- Demand analysis
- Partitioning equivalence classes:
- Valid equivalence class
- Invalid equivalence classes: rule, length, whether the type is null, whether it is repeated
3.5 Application scenarios of equivalence Class Classification
Business scenarios with typical input fields (e.g. mailbox registration, user registration)
4. Boundary value analysis (Important)
Is the complement of equivalence class division
4.1 Determination of boundary range
Select data that is exactly equal to, greater than, or less than the boundary value as test data
4.2 Up point, inside point, off point
-
Superpoint: a point on a boundary
-
Interior point: the point within the range of the interval
-
Distance: the point on the distance nearest, just greater than or just less than
4.3 Steps of boundary value design use case
1. Define requirements; 2. Determine valid and invalid classes; 3. Extract data and write test cases
4.4.7 — > 5
- Interior point: mandatory, try to select the range seen in
- Upper point: Mandatory
- Off-point: select according to open and close situation
4.4.8 Applicable to Scenarios
Boundaries exist (e.g. 9-20 bits, at least 10 bits, greater than or equal to, less than or equal to, equal to)
5. Decision Table (critical)
5.1 Definition of decision table
A multi-condition logic judgment tool expressed in table form has multiple input conditions, multiple output results, and there is a combination relationship between the input and output conditions and dependency relationship between the output conditions
5.2 Components
5.2.1 concept
Conditions of the pile | List all conditions in the current problem, order does not matter | For example, power status, green code status |
---|---|---|
Dynamic pile | Lists all possible actions in the current problem, without order effect | For example: Into the subway, not into the subway |
Item condition | List the values of the condition, true and false values of all possibilities | Valid equivalence classes, invalid equivalence classes |
Action item | Lists the action results for each condition | Based on the combination of various conditions, a definite result is obtained |
5.2.2 Expression form of conditions
- Character expressions valid equivalence class: truth /Y Invalid equivalence class: false /N
- Numeric expressions: valid equivalence class: truth /1 Invalid equivalence class: false /0
5.3 Steps for designing test cases
1. Identify all conditional piles (find all input conditions) 2. Identify action piles (find all output results) 3. Combine all the conditional piles 4. Define the corresponding action pile 5 for each combination. Design test cases, one test case for each piece of data
5.4 Application Scenarios
Multiconditional combination
6. Cause and effect diagram
6.1 show figure
6.2 Basic Symbols
- And or not relation
v | or | As long as one condition is true |
---|---|---|
^ | with | Multiple conditions hold |
~ | non | If the condition is true, the result is not true, if the condition is not true, the result is true |
– | Constant set up | The condition is true, the result is true |
- The example analysis
Product description: There is a vending machine software that handles boxed drinks for $1.50 each. If you put in a $1.50 coin and press the button “Cola”, “Sprite” or “black tea”, the corresponding beverage will be delivered. If you put in a $2 coin, return the $50 coin with the drink.
(1) Determine the cause and effect of requirements
(2) Determine the logical relationship between causes and results
C1 and C2 require an intermediate result, Cm1; C3, C4, and C5 require an intermediate result, Cm2.
(3) Determine the constraints in the causal graph
C1 and C2 are or, C3, C4, and C5 are or.
(4) Draw a causal diagram and turn it into a decision table
A decision table
The reasons C1, C2, C3, C4 and C5 are respectively valued according to the binary from small to large, and whether the intermediate results are valid or not is analyzed, so as to obtain the following simplified version (that is, the intermediate results Cm1 and Cm2 are valid)
- Simplified version
(5) Design test cases according to the decision table
Step 6.3
- Demand analysis
- Draw a cause and effect diagram
- Transform causal diagrams into decision tables
- Generate corresponding test cases
7. The orthogonal method
7.1 define
Maximize test coverage with minimum test cases
- Basic Definition:
Factors: conditional pile, input parameter conditions, electric quantity, green code level: the input parameter value is sufficient, no is the electric quantity level
- Using the step
- Demand analysis
- Determining factor level
- Determining orthogonal table
- Test cases are written according to orthogonal tables, and a piece of data is a test case
Orthogonal test method is a kind of test method that studies multi-factor and multi-level. It uses orthogonal table to design the test and replaces the comprehensive test by a few tests
In an experiment, the quantities that affect the result of the experiment are called test factors (factors), or factors for short. Factors can be logically solved as independent variables in the process of test, and test results can be regarded as functions of factors. In the test process, each factor can be in a different state or condition, the state or condition of the factor is called the level of the factor, referred to as the level.
- For example
There are two classes in the department of communication in a university, and they just finished a course. They want to inquire about the distribution of the result of this course, the ratio of men to women or the ratio of the class by “gender”, “class” and “result”
Query information based on gender = Male, female
Query according to class = Class 1, Class 2
Query according to “grade” = “pass, fail”
Follow the traditional design — all tests
Analyzing the above test requirements, there are three elements to be tested, which are called factors. Each factor has two values, which are called horizontal values (i.e., 2).
For a normal full test, it would be as follows (2^3=8 times) \
If the orthogonal test is used
Using orthogonal table design test cases, the number of test cases we get is n=3*(2-1)+1=4 (this company is (factor number (maximum level number -1)+1) *), for three factors and two levels of the orthogonal table just L4(2^3) can be applied
Therefore, the orthogonal table test method is used to obtain 4 tests, such as the following (the type of the orthogonal test table is generally given)
Method 8. Scene
Draw the flow chart
8.1 define
Scene method: flow chart method, using flow chart to describe the user to use the scene, through the flow chart path to design test cases
8.2 Case ordering take-out
8.3 Use the test phase
- Integration testing
- The system test
- The acceptance test
8.4 Procedure
- Demand analysis
- Drawing flow chart
- Design test cases along each path of the flowchart
9. False speculation
9.1 define
Based on experience and analysis, it is possible to predict errors in the program
9.2 Application Scenarios
- Products of the same type
- The task is tight
10 Test case method summary
- There are input functions, but there are no combinatorial equivalence classes between functions
- The input has boundaries, such as length boundary values
- Multi – input, multi – output, input and output between the combination of relations, decision table, causal diagram
- Orthogonal tables are used for maximum coverage with the smallest test cases
- Scenarios are used for combinatorial testing of multiple functions
- Error conjecture is further supplemented