This article tells you the difference and connection between black box testing, white box testing, integration testing and system testing

For developers, they are often confused about various test methods. Especially when integrating code, we can deeply feel the importance of being tested. Many developers only focus on writing code and despise the importance of testing. The code is always written and submitted and then handed over to the test group for testing, and it doesn't take long for the test group to send back test reports. Then I am annoyed to modify my own code bugs, and slowly start to hate the test crew. The code that has not been carefully tested by yourself not only wastes other people's time but also affects your mood.
Next, I will tell you about the environment and functions of various test applications.

1. Test environment and roles:
Black box testing, white box testing, unit testing, integration testing, system testing, acceptance testing:
The scope of these tests happens to be in a gradually increasing relationship, but the roles of testing personnel are different.

Black box testing, white box testing, and unit testing: What developers do in different development stages.
Black box testing, integration testing, and system testing: work
acceptance testing done by testers at various levels in the testing cycle : generally Work done by the user

2.
Tests can be divided into unit tests, integration tests, system tests and acceptance tests according to different scopes .
It embodies the gradual test process and the idea of ​​divide and conquer from small to large, internal to external.

Three, the function of the test

1. The unit test has the smallest granularity. Generally, the development team uses a white box method to test whether the main test unit conforms to the "design".
Unit testing refers to the inspection and verification of the smallest testable unit in the software. For the meaning of a unit in a unit test, generally speaking, the specific meaning should be determined according to the actual situation. For example, a unit in C language refers to a function, a unit in Java refers to a class, and graphical software can refer to a window or a menu. Wait. In general, the unit is the smallest functional module under test that is specified by man. Unit testing is the lowest level of testing activities to be carried out in the software development process. Independent units of the software will be tested in isolation from other parts of the program.

2. Integration testing is between unit testing and system testing, and plays a "bridge role". Generally, the development team adopts a white box and black box method for testing to verify both the "design" and the "requirement". Mainly used to test the interface between the module and the module, but also to test some main business functions. Integration testing (also called assembly testing, joint testing) is a logical extension of unit testing. Its simplest form is: Combine two tested units into one component and test the interface between them. In this sense, components refer to the integration of multiple units. In a real solution, many units are combined into components, and these components are aggregated into a larger part of the program. The method is to test the combination of fragments and finally expand into a process, testing the modules together with other groups of modules. Finally, all the modules that make up the process are tested together. In addition, if the program consists of multiple processes, you should test them in pairs instead of testing all
integration test processes at the same time .

3. The system test has the largest granularity. Generally, an independent test team uses a black box method to test whether the system meets the "requirements specification". After testing and confirming in the above stages, the system is tested in a complete simulation of the customer environment. System testing is to combine the confirmed software, computer hardware, peripherals, network and other elements together to carry out various assembly tests and confirmation tests of the information system. Its purpose is to compare with the requirements of the system and discover the developed Where the system does not meet or contradict the needs of users, a more complete solution is proposed. Its task is to check out the errors in the program as thoroughly as possible and improve the reliability of the software system. Its purpose is to check the system "how is it doing?". This stage can be divided into three steps: module testing, testing whether there are errors in the program of each module; assembly testing, testing whether the interfaces between the modules are correct; confirming testing, testing whether the entire software system meets the user's functional and performance requirements . At the end of this phase, a test report should be delivered, stating the choice of test data, test cases and whether the test results meet the expected results. After the test finds the problem, it is necessary to debug to find out the cause and location of the error, and then correct it. It is a black box test based on the overall system requirements specification, which should cover all joint components of the system. System testing is a test for the entire product system. The purpose is to verify whether the system meets the definition of the requirement specification, and to find out what is inconsistent with or contradictory to the requirement specification.
The object of system testing includes not only the software of the product system that needs to be tested, but also the hardware, peripherals and even some data, some supporting software and its interfaces on which the software depends. Therefore, the software in the system must be combined with various dependent resources and tested in the actual operating environment of the system

4. Acceptance test is similar to system test, the main difference is that the tester is different, and the acceptance test is performed by the user.

5. Black box test: regardless of the internal structure and logical structure of the program, it is mainly used to test whether the function of the system meets the requirements specification. Generally there will be an input value, an input value, and the expected value to compare. Black box testing is also called functional testing, which is to test whether each function can be used normally. In the test, the program is regarded as a black box that cannot be opened, and the program interface is tested without considering the internal structure and internal characteristics of the program. It only checks whether the program functions are used normally according to the requirements specification. Whether the program can properly receive input data and produce correct output information. Black box testing focuses on the external structure of the program without considering the internal logical structure, and mainly tests the software interface and software functions.
6. White box testing: Mainly used in the unit testing stage, mainly for code-level testing. For the internal logic of the program, the testing methods include: statement coverage, judgment coverage, condition coverage, path coverage, and condition combination coverage. White box testing is also called structural testing or logic-driven testing. It is based on the internal structure test procedure of the program to check whether the internal actions of the product are carried out normally according to the design specification, and whether each path in the procedure can be checked The reservation requires correct work. This method treats the test object as an open box. The tester designs or selects test cases based on the information related to the internal logic structure of the program, tests all the logic paths of the program, and determines the actual status by checking the status of the program at different points. Whether the status is consistent with the expected status.

The difference between system testing and integration testing

The general small system distinction is not very big

1. Planning and preparation of cases by the order
from the V model in terms of the requirements phase will develop system test plans and use cases, HLD time to do the integration test plans and use cases, some of the company's practice is not the same, but along the
order must be Do system test plan use cases first, then do integration

2. Granularity of use cases
System test cases are relatively close to user acceptance test cases.
Integration test cases are more detailed than system test cases, and the interface part should be written mainly, after all, each module or subsystem should be integrated.

3. The order of execution of the test is
to execute the integration test first. After the problems in the integration test are fixed, (configuration management, baseline), then the system test.

4. The number of use cases The number of use cases for
system testing is generally less than the number of use cases for integration testing. The specific number should be determined according to the performance baseline of each company. Generally, the number of test cases that cannot be written will not pass the audit.

The term system testing is often used for stress testing, capacity testing, performance testing, security testing, etc.

The term integration testing is often used as a superset of detailed functional testing-designing and organizing larger granular functional testing from user requirements.

The most important part of system testing is functional testing, which is to test whether the functions mentioned in the software "Requirement Specification" are missing and whether they are implemented correctly. Do the system test strictly in accordance with the "Requirement Specification" and use it as the standard. Testing methods generally use black box testing;
integration testing is performed before system testing and after unit testing is completed during system integration. Integration testing is mainly to test the internal structure of the program, especially the interface between the programs. Integration testing requires relatively high scripting ability of testers. The test method generally selects a combination of black box testing and white box testing.

Integration test: It is a test carried out in the process of software system integration. Its main purpose is to check whether the excuses between software units are correct. According to the integration test plan, it runs the system while combining modules or other units over the years into a larger and larger system to analyze whether the composed system is correct and whether the various components are in sync. There are two main integration testing strategies, top-down and bottom-up. It can also be understood as a joint test of the various components of the application system (software unit, functional module interface, link, etc.) when the software design unit and functional module are assembled and integrated into a system to determine whether they can work together. Components can be code blocks, stand-alone applications, client-side or server-side programs on the network.

System test: System test is a black box test based on the software requirements specification. It is a thorough test of the integrated software system to verify that the correctness and performance of the software system meets the requirements specified in the specification and check the behavior of the software And whether the output is correct is not a simple task. It is called the "prophet question" of testing. Therefore, system testing should be carried out in accordance with the test plan, and its input, output and other dynamic operating behaviors should be compared with the software specifications. There are many methods for software system testing, including functional testing, performance testing, random testing, etc.

Summary: In
layman's terms, in the engineering of a product from R&D to delivery, the test is divided into three stages: unit test, integration test, system test; unit test: a module function and routine error test; integration test: complete unit test After that, the joint debugging test of each module; focus on whether the interface of each module is consistent, whether the data flow and control sulfur between each module realize its function according to the design, and verify the correctness of the result, etc.; it can make the integration test of the entire product, It can also be used for integration testing of large modules; System testing: Comprehensive testing of the entire product, including both confirmatory testing of each module (verification of the correctness of the first two phases of testing) and functional (functionality of the product submitted to each user) testing , Including testing of the robustness, safety, maintainability and various performance parameters of the entire product

Here I recommend a software testing exchange group I created by myself, qq:642830685. The group will share software testing resources, test interview questions and industry information from time to time. You can actively exchange technology in the group, as well as industry leaders. You are so beautiful to answer your questions.

Written at the end:
You might as well take a bolder risk when dealing with life, because at any rate you will lose it. If there is a miracle in this world, it is just another name for hard work. The hardest stage in life is not that no one understands you, but that you don't understand yourself.
Maybe you feel that your efforts are always in vain, but there is no doubt that you are one step further from the top every day. Today you are still far from the top. But through your efforts today, you have accumulated the strength to climb the peak tomorrow. Finally, I hope everyone will work a little bit every day, and Yifei looks forward to your success.

Guess you like

Origin blog.51cto.com/15086761/2608740