integration testing

Joint testing
Collection
zero Useful+1
zero
Integration test, also called Assembly test Or joint testing. stay unit testing On the basis of, assemble all modules into subsystems or systems according to design requirements (such as according to the structure diagram) for integration testing. [1]
Practice shows that although some modules can work independently, they can not guarantee that they can work normally even when connected. Some problems that cannot be reflected locally are likely to be exposed globally.
Chinese name
integration testing
Overview
Also called assembly test or joint test
Introduction
There is a problem when integrating test combination units
Step
Integration test process requirements working mechanism
Common scheme selection
Overview Top down testing Bottom up testing
prospectus
Introduction Tested characteristics of test items

brief introduction

Announce
edit
[2] Integration test (also called Assembly test , joint test) Yes unit testing Logical extension of. The simplest form is to combine two tested units into a component and test the Interface In this sense, components refer to the integration and aggregation of multiple units. In a real scenario, 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 them into processes to test modules together with other groups of modules. Finally, test all the modules that make up the process together. In addition, if your program consists of multiple processes, you should test them in pairs rather than all processes at the same time.
Problems occurred during integration testing of composite units. It is required to test each unit before combining units and ensure the viability of each unit test plan You can know that any errors found when combining cells are likely related to the interfaces between cells. This approach reduces the number of possible scenarios to a simpler analysis level. An effective integration test helps to solve the related Software Compatibility and operability with other systems.
The integration test is conducted in unit testing On the basis of Software Unit according to Outline design The activity of whether each part of the work in the process of assembling the module, subsystem or system according to the requirements of the specification meets or realizes the corresponding technical indicators and requirements. That is, before integration testing, unit testing It should have been completed. The objects used in the integration test should have been unit tested Software Unit. This is important because if you don't unit testing , the effect of integration testing will be greatly affected and greatly increased Software The cost of unit code correction.
Integration test is unit testing Logical extension of. In reality, integration refers to the aggregation of multiple units, many of which are combined into modules, and these modules are aggregated into a larger part of the program, such as subsystems or systems. The integration test adopts the method of testing Software Whether the combination of units can work normally and whether they can be integrated with modules of other groups. Finally, it is necessary to test whether all module combinations constituting the system can work normally. The main standards for integration testing are《 Software Outline design Specification ", any item that does not conform to the specification Program module All actions should be recorded and reported.
integration testing
be-all Software The project cannot get rid of the system integration phase. No matter what development mode is adopted, the specific development work must be carried out one by one Software The software unit can form an organic whole only after integration. The specific integration process may be explicit or implicit. As long as there is integration, there will always be some common problems, which almost do not exist in engineering practice Software Unit assembly There is no problem in the process. As can be seen from Figure 1, integration testing takes far more time than unit testing , transitioning directly from unit testing to System test It is extremely inappropriate.

target

Announce
edit
The goal of integration testing is to use those that have passed the unit testing To construct the program structure. A single module has high quality but is not enough to ensure the quality of the whole system. Many hidden failures are caused by unexpected interactions between high-quality modules. The following two test techniques are used for integration testing:
1) Functional test. use Black box test The technology tests the interface specification of the module under test.
integration testing
2) Non functional test. Test the performance or reliability of the module.
In addition, the necessity of integration testing lies in that although some modules can work independently, they cannot guarantee that they can work normally even when connected. Problems that cannot be reflected in some parts of the program may be exposed in the overall situation, affecting the implementation of functions. In addition, in some development modes, such as Iterative development , design and implementation are iterative. In this case, the significance of integration testing is that it can indirectly verify Outline design Whether it is feasible.
Integration testing is to ensure that all units can run cooperatively according to the established intention after being combined, and ensure that the incremental behavior is correct. It tests the interface between units and functions after integration. use Black box test Method to test the integrated function. And the previous integration regression testing

implementation

Announce
edit
Integration test is a formal Test process , must be carefully planned, and unit testing The completion time of should be coordinated. In developing test plan The following factors shall be considered:
1. Which system assembly method is used Assembly test
2. Sequence of connecting each module during assembly and test;
3. Whether the module code preparation and test progress is consistent with Assembly test The order of is consistent
4、 Test process Whether special hardware equipment is required in;
integration testing
After the above problems are solved, the preparation and test schedule of each module can be listed, indicating each module unit testing Date of completion, date of first integration test, date of full completion of integration test, and required test case And expected test results.
Is missing software test When hardware equipment is required, check whether the delivery date of the hardware is integrated with test plan agreement. For example, if a digitizer and a plotter are required for the test, the corresponding test should be arranged when these equipment can be put into use, and a period of time should be reserved for the installation and delivery of hardware to leave time margin. In addition, on the test plan Need to consider the need for testing Software Drive module Pile module test case Generate program, etc.).
unit testing After that, it is necessary to conduct integration test to find and eliminate the above problems that may occur in module connection, and finally form the required Software Subsystem or system. For subsystems, integration testing is also called component testing.
Any reasonable organization of integration testing, that is, how to assemble modules to form a workable system, directly affects the modules test case The form of, the type of test tool used, module number and test order, the cost of generating test cases and debugging. Generally, there are two different assembly methods: one-time assembly and value-added assembly.

Completion criteria

Announce
edit
How to determine whether the integration test process is completed can be checked in the following aspects:
1. Successfully executed test plan All integration tests specified in;
2. Corrected the errors found;
3. The test results passed the review of the special group.
The integration test shall be carried out by a special test team composed of experienced system designers and programmers. The whole test activity shall be carried out in the presence of reviewers.
At the completion of the scheduled Assembly test After work, the test team shall be responsible for sorting out and analyzing the test results to form Test report Test report The actual test results, the problems found in the test, the methods to solve these problems, and the results of the retest after the solution should be recorded in. In addition, some problems that cannot be solved and need the attention of managers and developers should be put forward, and test review and final decision should be provided to put forward handling suggestions.

content

Announce
edit

Integration test process

According to IEEE standard, integration testing is divided into four phases: planning phase, design phase, implementation phase, and implementation phase (implementation phase)
Planning stage
1) About one week after the review of the outline design
2) Input requirements specification outline design document product development Planning roadmap
3) The entry condition outline design document has passed the review
4) Activity step 1. Determine the tested object and test scope 2. Evaluate the number and difficulty of the integration test tested object, i.e. workload 3. Determine the role division and task 4. Identify the time, task, constraints and other conditions of each stage of the test 5. Consider certain risk analysis and contingency plan 6. Consider and prepare for the integration test needs test tools 7. Consider the strength and depth of external technical support and relevant training arrangements 8. Define test completion standards
5) Output Integration test plan
6) The export condition integration test plan passes the baseline review in the preliminary design phase
design phase
1) Time schedule: start of detailed design phase
2) Input requirements specification outline design integration test plan
3) The inlet condition outline design baseline passed the review
4) Activity step 1. Structure analysis of tested object 2. Analysis of integration test module 3. Analysis of integration test interface 4. Analysis of integration test strategy
5. Analysis of integration test tools 6. Analysis of integration test environment 7. Estimation and arrangement of integration test workload.
5) Output integration test design (scheme)
6. The export condition integration test design passed the detailed design baseline review.
Implementation phase
1) The time is scheduled after the start of the coding phase
2) Input requirement specification outline design integration test plan integration test design
3) Detailed design stage of entrance conditions
4) Activity steps: 1. Integrated test case design 2. Integrated test code design (if required) 3. Integrated test script (if required) 4. Integrated test tool (if required)
5) Output integration test case integration test procedure integration test code integration test script integration test tool
6) Export condition test cases and test procedures pass the baseline review in the coding phase
Implementation phase
1) The integration test can be executed after the scheduling unit test has been completed
2) Input the requirements specification, outline design, integration test plan, high level design, integration test case, integration test procedure, integration test code (if any), integration test script, integration test tool, detailed design, code, unit test report
3) The unit test phase of entrance conditions has passed the baseline review
4) Activity Steps Execute Integration Test Cases Regression Integration Test Cases Write Integration Test Reports
5) Output integration test report
6) The export condition integration test report passes the baseline review in the integration test phase
Integration test process
job content
Work content and process of unit test

Demand acquisition

integration testing
The integration test requirements determine the content of the test for an integration version, that is, the specific object of the test. Integration test requirements mainly come from the design model and integration component Integration Build Plan. Integration testing focuses on the behavior of the external interface of the integration version. Therefore, the test requirements must be observable and measurable.
1. The integration working version should analyze its class collaboration and message sequence to find out the external interface of the working version.
2. The integration test is determined by the external interface of the integration version Use Case
3. test case It shall cover all message flow sequences of each external interface of the working version.
Note: An external interface and test case The relationship between is many to many, and the test requirements of some integrated working versions can be mapped to System test Therefore, reuse system test case technology can be used for these integration test cases.

Workpiece list

1、 Software integrate test plan
2. Integration test case
5. Test log
6. Test Evaluation Summary

Common scheme selection

Announce
edit

overview

There are many implementation schemes for integration testing, such as bottom-up integration testing, top-down integration testing, Big Bang integration testing, sandwich integration testing, core integration testing, layered integration testing, and usage based integration testing.

Top down test

Top down integration is an incremental assembly software structure Method. Start from the main control module (main program) and move down the control layer to combine the modules one by one. There are two methods:
First: Depth first: according to the structure, all modules are combined by a main control path;
integration testing
Second: first width: combine all subordinate modules layer by layer and move horizontally along each layer.
The assembly process is divided into the following five steps:
Step 1: use the main control module as the test driver, and its direct subordinate module is replaced by the receiving module;
Step 2: According to the selected integration test method (depth first or width first), use the actual module to replace the subordinate receiving module each time
Step 3: Test each actual module when combining;
Step 4: After completing a set of tests, replace another receiving module with an actual module;
Step 5: OK regression testing (That is, redo all or part of the tests that have been done) to ensure that no new errors are introduced.

Bottom up test

Bottom up integration is the most commonly used method. Other integration methods have more or less inherited and absorbed the idea of this integration method. Bottom up integration from Program module The lowest module in the structure starts to assemble and test. Because modules are assembled from bottom to top, for a given level of module, its sub modules (including all sub modules of the sub module) have been assembled and tested in advance, so it is no longer necessary to prepare Pile module (A type of test that can simulate the real module and provide the calling interface or data for the module to be tested Software Module). The steps of bottom-up integration testing are roughly as follows:
Step 1: Follow Outline design Specify which modules are tested. On the basis of being familiar with the nature of the module under test, the module under test can be layered. Tests at the same level can be conducted in parallel, and then the test activities can be arranged in order to develop a test schedule. Figure 2 shows the topological relationship of each test activity in the bottom-up integration test process. Using the relevant knowledge of graph theory, the time series relationship between activities can be arranged, and the testing activities at the same level can be carried out at the same time without mutual influence.
Step 2: On the basis of step 1, according to the chronological relationship Software The unit sets into modules and tests the problems that occur in the integration process. Here, testers may be required to develop some Drive module To drive the tested module formed in the integration activities. For larger modules, you can first convert some of them Software The unit is integrated into sub modules and then into a larger module.
Step 3: Software Modules are integrated into subsystems (or subsystems). Check whether each subsystem can work normally. Similarly, testers may be required to develop a small number of Drive module To drive the subsystem under test.
Step 4: Integrate each subsystem into the end-user system, and test whether each subsystem can work normally in the end-user system.
Scheme comment: bottom-up integration test scheme is the most commonly used test method in engineering practice. Relevant technologies are also relatively mature. Its advantages are obvious: easy management, and testers can better lock Software The location of the fault. However, it is not applicable to some development modes, such as using the XP development method, which requires testers to Software Complete the integration test of core software components before unit implementation. However, the bottom-up integration test method is still a reference integration test scheme.

Core system testing

The idea of the core system first integration test method is to first focus on the core Software The components are integrated into the core system one by one according to the importance of each peripheral software component after passing the integration test. Add one periphery at a time Software All parts produce one product baseline And finally form a stable software product. The integration process corresponding to the core system first integration test method is a spiral that gradually tends to close curve , which represents the process of product gradual finalization. The steps are as follows:
Step 1: Test each module in the core system separately and fully, and use it when necessary Drive module and Pile module
Step 2: All modules in the core system are integrated into the system under test at one time to solve various problems in the integration. In the case of relatively large scale of the core system, each component module of the core system can also be integrated in a bottom-up manner.
Step 3: According to the peripheral Software The importance of components and the mutual restriction relationship between modules, and the sequential scheme for the integration of peripheral software components into the core system. After the scheme has been reviewed, the periphery can be carried out Software Integration of components.
Step 4: On the periphery Software Before adding components to the core system, the external software components shall first complete the internal module level integration test.
Step 5: Add peripherals in order Software Component, eliminate the problems in the integration of peripheral software components, and form the final user system.
Scheme comment: This integration test method is applicable to Rapid software development It is very effective, suitable for the integration test of more complex systems, and can ensure the realization of some important functions and services. The disadvantage is that the system adopting this method should be able to clearly distinguish the core Software Components, peripheral software components and core software components shall have high Coupling degree The peripheral software components shall also have a high degree of coupling inside, but the coupling between the peripheral software components shall be low.

High frequency integration test

High frequency integration test refers to synchronization with software development Process, to conduct integration testing on the existing code of the development team at regular intervals. For example, some automated integration test tools can implement an integration test on the existing code of the development team every night, and then send the test results to the e-mail of each developer. This integration test method frequently adds new code to an already stable baseline In order to avoid difficulties in finding integration failures and control possible baseline deviations. The use of high-frequency integration test requires certain conditions: a stable increment can be obtained continuously, and the increment has been verified to be free of problems internally; Most meaningful function increases can be obtained within a relatively stable time interval (such as every working day); Test package And code development must be carried out in parallel, and version control Tools to ensure that the Test script And the latest version of the code; This must be done with the help of automated tools. A prominent feature of high-frequency integration is the frequent integration times. Obviously, manual methods are not competent.
High frequency integration test is generally completed by the following steps:
Step 1: Select the integration test automation tool. For example, many Java projects use the Junit+Ant solution to automate integration testing, and there are also some commercial integration testing tools to choose from.
Step 2: Set version control Tools to ensure that the version obtained by the integration test automation tool is the latest version. If using CVS version control
Step 3: testers and developers are responsible for writing the corresponding program code Test script
Step 4: Set the automated integration test tool, and configuration management The newly added code of the library is automatically integrated and tested Test report Report to developers and testers.
Step 5: The tester supervises the code developer to close the unqualified items in time.
Follow Step 3 to Step 5 to circulate continuously until the final Software Products.
Scheme comment: this test scheme can find code errors in time during the development process, and can visually see the effective project progress of the development team. In this scheme, develop and maintain source code And development and maintenance software test Packages are given equal importance, which is very helpful to effectively prevent errors and correct errors in time. The disadvantage of this scheme is that Test package Sometimes you may not be able to expose deep coding errors and graphical interface errors.
We have introduced several common integration test schemes. Generally speaking, in modern times Software In the process of project integration testing, the combination of core system first integration testing and high-frequency integration testing is usually used. The bottom-up integration testing scheme adopts the traditional Waterfall development The pattern is common in the process of software project integration. Readers should make reasonable selection based on the actual engineering environment of the project and the applicable scope of each test scheme.

prospectus

Announce
edit

introduction

1.1 Compilation purpose
This is an outline article describing * * * * integration testing. It mainly describes how to conduct integration testing activities? How to control integration test activities? The process of integration test activities and the work arrangement of integration test activities. The main readers of this article are the project leader, the manager of the integration department, and the integration test designer
1.2 Background
Project name: * * * Integration Test
Project related objects:******************
1.3 Definitions
**********:********************
1.4 References
《*********》

Test items

This test is mainly the integration test of * * * system. The version of * * * is 2.0. The test is the final integration test of * * *, which is established in the development team programmer Based on the completion of their own tests and the tests of the development team

Measured characteristic

3.1 Operational test
Whether the main test operation is correct and whether there is error? It is divided into two parts:
3.1.1 Return test
Enter the final interface step by step from the main interface, press the EXIT key to return step by step, and check whether the screen focus is correct when returning
For example:
1. Enter "System Settings"
2. Enter "Channel Search"
3. Enter "Automatic Channel Search"
4. Press EXIT to return and check whether the current focus is "channel search"
5. Press EXIT key to return and check whether the current focus is "system setting"
3.1.2 Entry test
Enter the final interface step by step from the main interface, press the MENU key to return to the main interface, enter again, and check whether the focus is correct
For example:
1. Enter "System Settings"
2. Enter "Channel Search"
3. Enter "Automatic Channel Search"
4. Press the MENU key to return to the main interface
5. Whether the current focus is "System Setting"
6. Enter "System Settings" and check whether the current focus is "Channel Search"
three point two functional testing
Test whether the functions of each application in the set-top box are correct
three point three performance testing
3.3.1 Fatigue test
In the test, the machine is turned on continuously for one month, and the application is run every three days. See the stability of the system
3.3.2 Large capacity data test
Anterior segment*** data base The table contains a lot of data to test the * * * function

Unmeasured characteristics

test method
1. Writing test plan
2. Audit test plan , if it fails, return to the first step
3. Writing test case
4. Review test case , if it fails, return to the third step
5. The tester shall test case Carry out test activities item by item, and fill in the test results in Test report Upper; Test report All must be overwritten test case
six Test process If a bug is found in, fill it in bugzilla and send it to the manager of the integration department; (bug status NEW)
7. The manager of the integration department receives the bug sent by Bugzilla
7.1 For obvious bugs that can be solved immediately, send the bugs to the developers; (bug status ASSIGNED);
7.2 For the submission of non bugs, the manager of the Integration Department shall notify the test designers and testers to modify the corresponding documents; (The bug status is RESOLVED, which is set to INVALID);
7.3 For those that cannot be modified, put the bug to the next round for modification; (The bug status is RESOLVED, and it is decided to set to REMIND)
8. The developers will immediately modify the bugs sent; (The bug status is RESOLVED, and it is set to FIXED)
9. The tester should retest item by item after receiving the error change information sent by bugzilla, and fill in the new Test report (The test report must cover all REOPENED test case );
10. If there is a problem in the retest, return to step 6 (bug status REOPENED)
11. Otherwise, close this bug (bug status CLOSED)
12. In this round of test test case 95% of them passed the test at one time and ended the test task;
13. 98% of the errors found in this round of testing have been modified and passed the retest (that is, the bug status is CLOSED). Return to step 5 for a new round of testing;
14. Write the test summary report after the test task is completed;
15. After the formal test, enter the informal test. The first is the ALPHA test. Other non-technical personnel in the company are invited to use the system as users. If a bug is found, notify the tester, and the tester will handle the bug event in a normal process;
16. Next is BETA test. Please ask the user representative to conduct the test. If a bug is found, the tester will be notified, and the tester will handle the bug event in a normal process.
Notes:
O Test regression plan is three times;
O test case It should be written in detail, and the steps must be clearly marked (it should include: number, test description, preconditions, test steps and expected test results);
O For the test items that the tester thinks should be carried out, the tester should report to the test designer to improve and perfect them test case
O Test report Separate from the test case, and the test report shall indicate the serial number of the test case and whether it passes Y/N;
O For those that cannot be decided by the manager of the integration department, submit them to the project leader for decision;
O performance testing Fatigue testing in can be combined with functional testing Partial, that is, do not shut down the machine during the test;
O performance testing Large capacity in Data test Part of the rounds after the test (the second step only needs to be carried out once)

Test pass criteria

Test results and test case If the expected results are consistent, the test will be passed; otherwise, the test will be marked as failed.
6.1 Test result approval process
6.1.1 End of test regression application
The tester applies for the completion of this round of test and submits it to the manager of the Integration Department;
The manager of the Integration Department convenes a meeting of his team to discuss;
After discussion, the next round of testing will be carried out, and the precautions and procedures for the next round of testing will be deployed;
If it is found that there are still problems in this round of testing, the next round of testing will be postponed to discuss how to proceed.
6.1.2 End of test result application
The tester applies for the completion of the test and submits it to the manager of the Integration Department;
The manager of the Integration Department convenes a meeting of his team to discuss;
1. The test task is ended after discussion;
2. If it is found that there are still problems in the test that have not been solved, extend the end time of the test and discuss how the next step should be carried out.

Suspend and Resume

7.1 Suspend conditions
O After entering the first round of testing, the testers generally understand the product situation. If more than 5 (including 5) operational errors or more than 3 (including 3) functional errors are found within one hour, they will be returned to the test team for testing;
O Integration test tasks with higher project priority;
O Integration tasks with higher project priority;
O During the retest, it is found that the product cannot run;
O Insufficient personnel and equipment.
7.2 Restoration conditions
O Meet the conditions for entering the integration test (less than 5 (excluding 5) operational errors or less than 3 (excluding 3) functional errors are found within one hour);
O Integration test tasks with higher project priority are temporarily completed;
O Integration tasks with higher project priority are temporarily completed;
O The product can run during the retest;
O Personnel and equipment are in place.

Test file

O test plan book
O Test case
O Test report
O Test summary

Test task

O Develop review test plan
O Development and review test case
O Conduct test activities
O Writing Test report

Test environment requirements

10.1 Hardware requirements
***********
************
10.3 Test tools
*************
10.4 Conditions required for testing
**************
10.4.1 Required documents
O User Manual
O Application Manual
O Installation instructions
10.4.2 Tasks to be completed
O Programmer test
O The test team completes the test

Roles and responsibilities

O Integration (test) manager: control and complete test tasks and Test process To determine whether the bug submitted by the tester needs to be modified;
O Test designer: writing integration test case
O Tester: According to test case Conduct test activities;
O Developer: MHP program bug modification;
O User representative: conduct BETA test.

Personnel and training

O The integration test manager is responsible for training the test related personnel on the test process, rules and regulations;
O Test designers are responsible for training test operators

Test progress

Test progress (person * workday)
Test Design 60
Total progress of test execution 30
Progress of each regression 10
Test report 2

Risk and emergency plan

Equipment not in place: speed up equipment purchase;
Personnel are not in place
Personnel asking for leave: the personnel asking for leave come back to work overtime or quickly test the progress/apply for deployment of new personnel;
Resignation: deploy new personnel;
Personnel deployment to other departments or projects: deploy new personnel;
Developers frequently make mistakes in development: notify the development department to discuss strategies;
Testing work is frequently suspended for other reasons or cannot be recovered after suspension: overtime or delay

Approval

Manager of Integration Department Manager of Technology Department
Name: Name:
Date: Date:

Comparison of unit tests

Announce
edit

Different units tested

Unit testing refers to the testing of basic software units (such as functions), while integration testing refers to the testing of modules and subsystems, which mainly tests the relationship between interfaces.

The basis for testing is different

Unit test is the test for the detailed design of software, and the main basis of test cases is also the detailed design. Integration testing is a test for the general design of software, and the main basis of test cases is the general design.

Different test spaces

Integration testing mainly tests the test space of the interface layer, while unit testing mainly tests the test space of the internal implementation layer.

The test uses different methods

Integration testing focuses on the integration of interfaces, and unit testing only focuses on a single unit, so the specific test methods are different. [1]