[Software Testing] The Differences and Examples of Unit Testing, System Testing, and Integration Testing

Table of contents

1. Unit testing

2. Integration testing

3. System test


1. Unit testing

  1. Definition: Unit testing is the testing of software components (fine-grained)
  2. Purpose of the test: to verify the correctness of the basic components of the software
  3. Test object: a unit of work, usually a method inside a class
  4. Test usage method: white box testing
  5. Test basis: detailed design document + code
  6. Test content: module interface test, local data structure test, path test, error handling test, boundary test
  7. Evaluation Benchmark: Logic Coverage
  8. time spent: less
  9. 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

  1. 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)
  2. Test purpose: used to verify the detailed design, the main purpose is to check whether the interface between software units is correct
  3. Test object: an internal function, the interaction between multiple classes or with an external system
  4. Test usage method: gray box testing
  5. Test sentence: outline design document + unit test case
  6. 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
  7. Evaluation Benchmark: Interface Coverage
  8. Time spent: Moderate
  9. 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

  1. Definition: Test the function, performance, and the hardware and software environment in which the software runs, such as regression testing, smoke testing (coarse-grained)
  2. Test purpose: to verify the outline design
  3. Test object: an external function that verifies the requirements from the user's perspective
  4. Test usage method: black box testing
  5. Test basis: requirements specification
  6. Test content: function, interface, reliability, usability, performance, compatibility, security, etc.
  7. Evaluation Benchmark: Coverage of Requirements Specifications
  8. time spent: many
  9. 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

(10 messages) The four stages of software testing [unit testing, integration testing, system testing and acceptance testing]_When does integration testing and unit testing start?_ty6693's Blog-CSDN Blog

(11 private messages / 80 messages) What is the difference between unit testing, integration testing, and system testing? - Zhihu (zhihu.com)

--END--

Guess you like

Origin blog.csdn.net/qq_41539778/article/details/131087735