Comprehensive design of test cases

What is the test case

The core of the test work is
a set
of specific comparisons of the standard software requirements for input and output during testing

The role of test cases

Verify that the software meets the customer's needs (if the test cases corresponding to each requirement are passed, then the customer's needs are met)
reflects the workload
of a tester and shows the design ideas of the test cases

Test case contains content

Insert picture description here

Test case writing process

Insert picture description here
1. Demand analysis:

Business needs
Focus on whether the system meets the business

User needs
Pay attention to whether the system meets user habits

Functional requirements
Pay attention to whether the system meets the functional requirements

If there is no demand (such as no product manager):
Then refer to the similar products on the market
What if the demand is ambiguous?
Collect and sort out the existing requirements
and the product manager confirms one by one.
Refer to the realization of the same type of product

Extract test points
What is a test point?
The test point is the specific content that needs to be tested after the needs analysis
benefit:
Quickly design test cases to
cover requirements
Use test methods to
show some details of requirements

A brief summary of the test case writing method

1. Equivalence class division method
How to select the appropriate data subset to represent the entire data set. By reducing the number of tests to achieve "reasonable" coverage, covering more possible data, to find more software defects,
select the most representative data to test,
use effective equivalence classes to verify whether the program meets the specifications

2. Boundary value analysis method
When designing test cases using the boundary value analysis method, it is generally combined with the division of equivalence classes. , Select the test data that is exactly equal to, just above or just below the boundary value

3. Scenario method
By using scenarios to describe the function points or business processes of the system, the test effect is improved. The scene method generally includes the basic flow and the backup flow, starting from a process, by describing the path to determine the process, after traversing all the basic flow and the backup flow to complete the entire scene

For example, the user enters the account password or does not enter the account password

4. Guessing method
intuition + experience

Pay attention to the test method when writing test cases
For example:
Insert picture description here
here shows that the password needs to be used in 6-16
test cases. Test methods
such as equivalence classes (represented in mailbox registration success and mailbox registration failure, etc.)
such as boundary values ​​(represented in the password input section or too long or included Space)

Beautify after writing:
Insert picture description here
frame all of the table, select all the border options of the border

Comprehensive design of test cases

1. Test
case division The classic method of test case division is the waterfall model, which is gradually subdivided from top to bottom. Large modules include small modules, and small modules include smaller modules. (Taobao has large modules such as login, registration, and shopping cart, such as shopping with product search, adding shopping cart, product comparison and other small modules.)
To cut into the system from more angles, cut the system into pieces for testing In order to ensure the integrity of the test items
(start with the most sub-item test design)

2. Cut surface design
Function point cut surface: The
most common cut surface, usually think that a button on the page is a function point. According to the complexity of the function, use cases are written for each function.

Implicit aspect:
test the complete business process; write it from the perspective of demand and business
(for example, if you find that the balance is insufficient when you buy, jump to the recharge page)
3. Function point use case design

  1. In any case, the boundary value analysis method must be used. Experience has shown that the test cases designed by this method have the strongest ability to find program errors (the boundary value is generally in the input place, such as the input box must use the boundary value method )
    2) If necessary, supplement some test cases with the equivalent class division method (may have combined input and output, so you need to add)
    3) If the function description of the program contains a combination of input conditions, you can choose a causality diagram from the beginning Method
    4) If the business complexity of the program is relatively high, use the scene method to supplement some test cases.

Test Case 1: Recharge of shared bicycle

Shared bicycle recharge, you can choose the recharge amount and payment channel.

Insert picture description here
1. Boundary value considers the recharge amount: 0 yuan, 1 yuan, negative number, non-amount parameter, multiple decimals (3 decimal places), bank card limit (may be a bank card transfer out a limited amount at a time) [equivalence class can be rubbed Into the boundary value method]

2. Since different banks and payment channels can be selected when recharging, test cases are designed for channels such as Alipay, WeChat, Tonglian, UnionPay, and direct bank connection

3. Consider abnormal scenarios, such as recharge failure, insufficient bank card balance, and bank return timeout.

4. If the scene also contains more complex business scenarios, such as full reduction, full gift, increase the number of draws, etc., you also need to combine the scene method for testing
[the boundary value can also be used]
Insert picture description here

Test Case 2: Write test points for some functional modules of MuKe.com

Insert picture description hereInsert picture description here
Written test conducted in accordance with test point:
test cases form the actual situation of the project
use cases do not rote format

Test case review

The review of test cases includes tripartite review by the peer group.

What is the significance of the review?
1. Through the review, you can find the shortcomings of the test cases
2. It is convenient for the testers to improve the use cases
3. To achieve the purpose of improving the test quality during the test

Review process :
Insert picture description here

Test case management:

Why do you need to manage use cases?
1. The number of test cases is huge
2. Test cases will change with requirements
3. Test cases need to be supplemented and improved

How to manage?
1. Original excel (can only be applied to small projects, which is inconvenient and troublesome to
manage ) 2. Professional project management system
Insert picture description here

ALM: Commercial is more expensive and powerful.
Zen Tao: The open source version is free, and the professional version can be customized for paid
testlink: open source, general ease of use

The main
application is Zen Tao. Basic application of Zen Tao
1. Professional R & D project management software
2. Complete support for agile development process
3. Complete software lifecycle management

You can export a template from ZenTao or import a use case:
export a template as a test case template, select the use case first! ! Re-export
Insert picture description here
Open this template:
Insert picture description here
we can import the test cases we have written into the Zen Tao project:
Insert picture description herecan be modified in Zen Tao

Published 82 original articles · praised 7 · visits 4172

Guess you like

Origin blog.csdn.net/sunshine612/article/details/105420339