Table of contents
1. Unit testing
- Definition: Unit testing is the testing of software components (fine-grained)
- Purpose of the test: to verify the correctness of the basic components of the software
- Test object: a unit of work, usually a method inside a class
- Test usage method: white box testing
- Test basis: detailed design document + code
- Test content: module interface test, local data structure test, path test, error handling test, boundary test
- Evaluation Benchmark: Logic Coverage
- time spent: less
- Test example (taking the user management module as an example, the focus is on the function or error handling of the user management module itself)
Test case number |
UNIT_001 |
||||||
Test Module/Object |
User Management |
||||||
Is there a test code |
none |
test code |
none |
||||
Testing purposes |
When adding a user, when the input information is incomplete, see if a prompt can be given and the addition fails |
||||||
prerequisites (if any) |
|||||||
serial number |
operate |
expected outcome |
Test Results |
Remark |
|||
1 |
Start the software, click Settings-User Management to enter the user management interface |
Log in normally and display the user management interface |
|||||
2 |
Click the Add button |
Show Add User Form |
|||||
3 |
Enter the user name, leave the rest of the information blank |
Normal display with the entered username |
|||||
4 |
Click the save button |
The prompt password cannot be empty, and the user addition fails |
|||||
Use case test results |
2. Integration testing
- Definition: also known as joint testing (joint debugging), assembly testing, assembling program modules with appropriate integration strategies, and testing the correctness of system interfaces and integrated functions (medium granularity)
- Test purpose: used to verify the detailed design, the main purpose is to check whether the interface between software units is correct
- Test object: an internal function, the interaction between multiple classes or with an external system
- Test usage method: gray box testing
- Test sentence: outline design document + unit test case
- Test content: data transmission between modules, function conflicts between modules, correctness of module assembly functions, global data structure, and the impact of single module defects on the system
- Evaluation Benchmark: Interface Coverage
- Time spent: Moderate
- Test example (taking the user login module as an example, the focus is on the connection between modules, such as adding user modules and user management display interface)
Test case number |
INTEGRATE_001 |
||||||
Test Module/Object |
User Management |
||||||
Is there a test code |
none |
test code |
none |
||||
Testing purposes |
Can the new user be displayed on the user management interface after entering the correct information to add the user? |
||||||
prerequisites (if any) |
|||||||
serial number |
operate |
expected outcome |
Test Results |
Remark |
|||
1 |
Start the software, click Settings-User Management to enter the user management interface |
Log in normally and display the user management interface |
|||||
2 |
Click the Add button |
Show Add User Form |
|||||
3 |
Enter user name, mnemonic, password, confirm password and other information, select permissions |
Enter all information correctly |
|||||
4 |
Click the save button |
Add a new user data in the user management interface |
|||||
Use case test results |
3. System test
- Definition: Test the function, performance, and the hardware and software environment in which the software runs, such as regression testing, smoke testing (coarse-grained)
- Test purpose: to verify the outline design
- Test object: an external function that verifies the requirements from the user's perspective
- Test usage method: black box testing
- Test basis: requirements specification
- Test content: function, interface, reliability, usability, performance, compatibility, security, etc.
- Evaluation Benchmark: Coverage of Requirements Specifications
- time spent: many
- Test example (taking the user login module as an example, the focus is whether this function meets the user's needs and the performance is good or bad)
Test case number |
SYSTEM_001 |
||||||
Test Module/Object |
User Management |
||||||
Is there a test code |
none |
test code |
none |
||||
Testing purposes |
Is it possible to add, edit, and delete users normally? |
||||||
prerequisites (if any) |
|||||||
serial number |
operate |
expected outcome |
Test Results |
Remark |
|||
1 |
Start the software, click Settings-User Management to enter the user management interface |
Log in normally and display the user management interface |
|||||
2 |
Click the Add button, enter all the information as required, and click Save |
Added user successfully |
|||||
3 |
In the user management interface, select an existing user, click the Edit button, re-enter the user's information, and click Save |
Edit user succeeded |
|||||
4 |
In the user management interface, select an existing user, click the delete button, and select Yes |
User deleted successfully |
|||||
Use case test results |
reference:
The difference between unit testing, integration testing, and system testing
--END--