Complete classification of software testing methods

[Software Testing] Quick Start in 30 Days with Zero Basics! ! !

I believe that students who have been exposed to testing have heard of black box testing, white box testing, functional testing, performance testing, security testing, unit testing, integration testing, interface testing, etc. However, it will be confusing to remember in this way. If you divide it into categories, it will be clearer and easier to understand, making it easier for everyone to remember.

1. Based on the internal structure and specific implementation of the software, software testing can be divided into:

  White box testing, black box testing, gray box testing

  (1) White box testing: Also known as structural testing or logic testing, it is based on the internal logical structure and coding structure of the program, and tests whether the internal actions of the product are performed normally in accordance with the design specifications, and whether each path in the program is All can work correctly according to the predetermined requirements. This method treats the test object as an open box, and the tester designs or selects test cases and completes the test based on information related to the internal logical structure of the program. This type of testing needs to find shortcomings or errors in the internal code from the code statements in algorithms, overflows, paths, conditions, etc., and then correct them.

  Common white box testing methods include: statement coverage, condition coverage, judgment coverage, condition combination coverage, basic path coverage, etc.

  The purpose of white box testing:
  ① Ensure the testing of all critical paths in the program and prevent unexpected situations due to unexecuted paths after actual operation ② Measure the integrity of the
  test
  ③ The true and false branches of all logical values ​​​​in the program Covers
  ④ Checking memory leaks
  ⑤ Execution of branch statements for exception handling
  ⑥ Solving the problem of difficulty in setting up a real test environment under experimental conditions
  ⑦ Checking that the code complies with certain coding standards and reducing errors introduced due to irregular coding
  By checking the program at different points status to determine whether the actual status is consistent with the expected status.

  (2) Black box testing: Also called functional testing, it does not consider the internal structure and logical structure of the program. It is mainly used to test whether the function of the system meets the requirements specifications. It is from the perspective of using the software or program, from the input data Test based on the correspondence with the output data.

     Common black box testing methods: equivalence class division method, boundary value analysis method, error speculation method, cause-and-effect diagram method, orthogonal test method, decision table-driven method, function diagram method

  Black box testing purpose:

  ① Check whether the program functions are used normally according to the requirements of the requirements specification, test whether there are any omissions in each function, and test whether the performance characteristics meet the requirements.

  ② Test whether the human-computer interaction is wrong, detect whether the data structure or external database access is wrong, whether the program can properly input data and produce correct output results, and maintain the integrity of external information (such as databases or files).

  ③Detect errors in program initialization and termination.

  (3) Gray box testing: It is between white box testing and black box testing. It not only focuses on the correctness of output and input, but also pays attention to the internal situation of the program. Gray box testing is not as detailed and complete as white box testing, but it pays more attention to the internal logic of the program than black box testing. It often judges the internal running status through some representative phenomena, events, and signs.

  What are the characteristics of gray box testing compared to other black and white boxes:
  ① Gray box testing is more efficient than white box testing and starts from the overall program rather than details.
  ② Gray box testing is more robust and reduces program code compared to white box testing Risk of use cases becoming invalid due to changes.
  ③Gray box testing is more detailed. Gray box testing requires testers to pay attention to the code logic of the program, expand use cases based on the code logic, and be more detailed.
2. Divide according to the stages of software testing:

  Unit test—>Integration test—>System test—>Acceptance test

  (1) Unit testing: Unit testing is a testing work used to check the correctness of a module, a function or a class. It refers to checking and verifying the smallest testable unit in the software. As for the meaning of unit in unit testing, generally speaking, its specific meaning should be determined based on the actual situation.

  (2) Integration testing: also called assembly testing or joint testing. On the basis of unit testing, all modules are assembled into subsystems or systems according to design requirements (such as according to the structure diagram) for integration testing. Although some modules can work independently, there is no guarantee that they will work properly when connected, and they may be exposed globally. Generally, the development team uses a white box plus black box approach to test, which not only verifies the "design" but also verifies the "requirements". It is designed to test the interface relationship between software units, with the hope of discovering problems between the interfaces of each software unit through testing, and finally forming the tested units into software that meets the design requirements.

  (3) System testing: Testing activities for integrated software and hardware systems to determine whether the system meets the requirements. It uses the integrated software system as an element based on the entire computer system, together with computer hardware and peripherals. , certain supporting software, personnel, data and other system elements are combined together to conduct a series of assembly tests and confirmation tests on the computer system in the actual operating environment.

  (4) Acceptance testing: User-oriented testing, software testing activities conducted after the software product has completed unit testing, integration testing and system testing, and before product release. It is the last stage of technical testing, also known as delivery testing. The purpose of acceptance testing is to ensure that the software is ready and can be used by end users to perform the software's intended functions and tasks. Acceptance testing demonstrates to future users that the system will work as intended. After integration testing, all modules have been assembled into a complete software system according to the design, and interface errors have been basically eliminated. Then the effectiveness of the software should be further verified. This is the task of acceptance testing, that is, the function and function of the software. Performance is as users would reasonably expect.

3. Performance testing can be divided into stress testing and load testing

  Performance testing: Performance testing uses automated testing tools to simulate a variety of normal, peak, and abnormal load conditions to test various performance indicators of the system.

  (1) Stress test: Gradually increase the system load, test the changes in system performance, and finally determine under what load the system performance is in a failure state, and use this to obtain the maximum service level that the system can provide.

  (2) Load testing: simulate the system load of the load adjustment of the actual software system, and observe the system response time and data throughput under different loads, and the resources occupied by the system through continuous loading (such as increasing the number of simulated users) or other loading methods (such as CPU, memory, etc.) to check the behavior and characteristics of the system.

  Similar points: they are all performance tests. Load testing emphasizes the performance indicators of the system under normal working conditions; the purpose of stress testing is to discover under what conditions the system performance becomes unacceptable and to discover the inflection point of application performance degradation.

4. Other tests

  (1) Regression testing: Regression testing refers to re-testing after modifying the old code to confirm that the modification did not introduce new errors or cause errors in other codes. Automatic regression testing will significantly reduce the cost of system testing, maintenance and upgrades.

  (2) Smoke test: After completing the development of a new version, test the basic functions of the version to ensure that the basic functions and processes can be passed. If it fails, then it needs to be developed and re-developed. If it passes the test, it will proceed to the next step. One-step testing (functional testing, integration testing, system testing, etc.) has the advantage of saving testing time and preventing build failure, but the disadvantage is that the coverage rate is low.

Guess you like

Origin blog.csdn.net/dad22211/article/details/131797540