I believe that in the job structure of many companies, the position of integration testing is not planned separately. Many of them merge integration testing and system testing into one position, which is software testing. As shown in the figure below, the process group of ASPICE shows that the software process group involves software integration testing and software qualification testing.
Software integration testing belongs to SWE.5 of the software engineering group, which corresponds to our software architecture design. In this article we focus on software
integration
testing.
Regarding the position of software integration testing, everyone must have great doubts. What is the difference between it and software qualification testing? What does the test include? How to perform software integration testing? Let me introduce it to you next. Through this article, you can know:
What is software integration testing
The purpose of software integration testing
Test content of software integration testing
Dependent objects of software integration testing
Software integration test execution process
1. What is software integration testing?
Software integration testing is a software test that is completed after developers complete code development, self-verification and software unit testing, package and integrate the software, and then hand it over to the integration testing department.
Unit testing focuses on software units; software integration testing focuses on software components. Based on unit testing, testing is in the process of assembling all software units into modules, subsystems or systems in accordance with the requirements of the architectural design specifications. Activities to see whether each part of the work meets or realizes the corresponding technical indicators and requirements; mainly to verify the interaction of the interfaces between the software components (a collection of units) in the integrated software, resource usage, etc., and to verify whether the software architecture design is met, and the software Whether the test cases cover all design items in the software architecture design; it can be seen that the main scope of software integration testing is based on the software architecture design.
One thing to note is that unit testing should have been completed before integration testing, and the objects used in integration testing should be software units that have been unit tested. Without unit testing, the effectiveness of integration testing will be greatly affected and the cost of software unit code error correction will be significantly increased.
The following is a diagram of the four-quadrant distribution of the code:
Unit testing is responsible for the domain code part. It mainly tests the basic units of the software (such as functions). It does not involve external dependencies and is an independent part of the test.
Integration testing is responsible for the dependent code part, which is the part that unit testing cannot test. The popular understanding of "dependency" is that there are strong correlations other than itself.
summary:
When we design software architecture, we will design the interface interaction mode and content between components. Developers develop code based on the interface designed by the software architecture, and integration testers conduct interface testing based on the software architecture design, forming a closed loop (design --development--verification).
Software integration testing is an activity that tests whether the interface design, resources, requirements, etc. between software components meet the requirements and indicators based on the software architecture design document based on the completion of unit testing.
2. The purpose of software integration testing
Verify that the software components in the integrated software comply with the software architectural design
Verify that software components in integrated software comply with software and hardware interface protocols
Verify that the software components in the integrated software meet specific property requirements (robustness, reliability)
Verify that software components in integrated software meet software functional requirements
Verify that integrated software meets original software specifications
3. Test content of software integration testing
According to the definition of integration testing, the main testing content of integration testing is the interface interaction between components, and also includes requirements-based testing, fault injection testing, resource usage evaluation, back-to-back comparison testing of models and codes, and verification of control flow and data flow. , static code analysis, etc.
The following is an example to illustrate the testing of component interfaces:
The dynamic behavior between the following components (Figure 1 timing diagram):
"Mobile APP" can be called our component A, "TSP system" can be called component B, and "vehicle" can be called component C (the definition of components follows the software architecture design);
If there is the following interface design between components:
Interface of component A: *FuncA_1(...), *FuncA_2(...), *FuncA_3(...)
Interface of component B: *FuncB_1(...), *FuncB_2(...), *FuncB_3(...)
Interface of component C: *FuncC_1(...), *FuncC_2(...), *FuncC_3(...)
*FuncA_1(...) in component A is the function interface for requesting to open the window; *FuncB_1(...) in component B is the interface for the command to open the window when getting off the car; in component C *FuncC_1(...) is returned as our result.
The integration test is to verify the correctness of the interaction between the *FuncA_1(...), *FuncB_1(...), *FuncC_1(...) interfaces. There is generally more than one interface data flow direction between components. Different test cases are designed based on the timing from normal values, abnormal values, and boundary values.
4. Dependent objects of software integration testing
Integration testing relies on software architecture design documents, software requirement description documents, functional specifications, etc. as assistance.
5. Software integration test execution process
1. Formation of integration test plan
The integration test plan mainly considers several aspects: environment construction, test tool deployment, test case preparation and execution, test problem sorting, and test report preparation.
2. Compilation of integration test cases
The preparation of test cases can be considered through requirements analysis, equivalence class analysis, boundary value analysis, and error speculation based on experience or knowledge.
Requirements analysis is to design test cases based on the understanding of requirements, and the result is mainly to determine whether the function is OK;
Equivalence class analysis is to classify input and output and select representative data for verification for classification;
Boundary value analysis is to analyze the variables and parameters designed in the code when they reach the boundary and cross the boundary to judge whether it meets the design requirements. A simple understanding is that the code design must consider all situations of the boundary and set different boundaries. Different outcomes of situations.
Wrong speculation based on experience or knowledge is to combine your own testing experience and problem summaries from similar projects to add additional test cases to cover more complete test scenarios.
3. Integration test case review
Review whether the design of test cases covers all design items in the software architecture design and the coverage of the software architecture.
Review whether test cases cover all functional requirements
Review test cases for adequacy
You can also review the compliance of test cases based on your own company's requirements.
Review whether the test case design test environment is roughly similar to the target environment
4. Execute test cases
The prerequisite for executing test cases is that the test environment and test tools are deployed. One of the most important tasks in the early stage of integration testing is to deploy the testing tool chain. Depending on the content of the test, the testing tools used are also different. Commonly used testing tools in the automotive industry are CanOe, Lauba, PCAN, E2, etc.
5. Prepare test report
The test report focuses on the test content, test case execution rate, pass rate, problem closure rate, etc. Output according to company requirements.
6. Thinking: The necessity of software integration testing
All software projects cannot escape the system integration stage. No matter what development model is adopted, the specific development work must start from each software unit. Only after integration can the software units form an organic whole. The specific integration process may be explicit or implicit. As long as there is integration, there will always be some common problems. In engineering practice, there are almost no cases where there are no problems during the integration of software units. At the same time, integration testing takes far longer than unit testing. From Figure 2, we can see that unit testing and integration testing focus on different content. Therefore, it is extremely inappropriate to directly transition from unit testing to system testing. Integration testing is also our code. One of the guarantees of quality.
The prerequisite for starting integration testing is to complete the unit test. After the unit test is passed, the integration test can be performed. If the number of questions is 0, I believe the answer must be "NO". This is why integration testing is needed. The unit test scenario does not cover the integration test scenario. In general, the number of problems discovered by the integration test is much more than that of the unit test. The unit test only tests a single individual, and independent testing is fine. However, there are many problems after integration. That is Because there are many external relationships after integration, whether the external relationships pass the test is one of the important factors that affects the final test result. An effective integration test helps resolve issues related to the compatibility and operability of software with other systems.
Unit testing is completed by development engineers, and integration testing is completed by the integration testing part alone. It is not recommended that integration testing and unit testing be completed by the same personnel.
Add the WeChat account below to join the automotive R&D management exchange group