Integration test, also calledAssembly testOr joint testing.stayunit 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
[2]Integration test (also calledAssembly test, joint test) Yesunit testing Logical extension of.The simplest form is to combine two tested units into a component and test theInterface。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 unittest planYou 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 relatedSoftwareCompatibility and operability with other systems.
The integration test is conducted inunit testing On the basis ofSoftwareUnit according toOutline designThe 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 testedSoftwareUnit.This is important because if you don'tunit testing , the effect of integration testing will be greatly affected and greatly increasedSoftwareThe cost of unit code correction.
Integration test isunit 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 testingSoftwareWhether 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《SoftwareOutline designSpecification ", any item that does not conform to the specificationProgram moduleAll actions should be recorded and reported.
integration testing
be-allSoftwareThe 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 oneSoftwareThe 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 practiceSoftwareUnit assemblyThere is no problem in the process.As can be seen from Figure 1, integration testing takes far more time thanunit testing , transitioning directly from unit testing toSystem testIt is extremely inappropriate.
target
Announce
edit
The goal of integration testing is to use those that have passed theunit 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.useBlack box testThe 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 asIterative development, design and implementation are iterative.In this case, the significance of integration testing is that it can indirectly verifyOutline designWhether 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.useBlack box testMethod to test the integrated function.And the previous integrationregression testing。
implementation
Announce
edit
Integration test is a formalTest process, must be carefully planned, andunit testing The completion time of should be coordinated.In developingtest planThe following factors shall be considered:
1. Which system assembly method is usedAssembly test;
2. Sequence of connecting each module during assembly and test;
3. Whether the module code preparation and test progress is consistent withAssembly testThe order of is consistent
4、Test processWhether 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 moduleunit testing Date of completion, date of first integration test, date of full completion of integration test, and requiredtest caseAnd expected test results.
Is missingsoftware test When hardware equipment is required, check whether the delivery date of the hardware is integrated withtest planagreement.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 thetest planNeed to consider the need for testingSoftware(Drive module、Pile module、test caseGenerate 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 requiredSoftwareSubsystem 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 modulestest caseThe 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:
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 scheduledAssembly testAfter work, the test team shall be responsible for sorting out and analyzing the test results to formTest report。Test reportThe 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
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 needstest tools7. Consider the strength and depth of external technical support and relevant training arrangements 8. Define test completion standards
5) OutputIntegration 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 integrationcomponentIntegration 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 versionUse Case。
3.test caseIt shall cover all message flow sequences of each external interface of the working version.
Note: An external interface andtest caseThe relationship between is many to many, and the test requirements of some integrated working versions can be mapped toSystem testTherefore, reuse system test case technology can be used for these integration test cases.
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 assemblysoftware 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: OKregression 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 fromProgram moduleThe 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 preparePile module(A type of test that can simulate the real module and provide the calling interface or data for the module to be testedSoftwareModule).The steps of bottom-up integration testing are roughly as follows:
Step 1: FollowOutline designSpecify 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 relationshipSoftwareThe unit sets into modules and tests the problems that occur in the integration process.Here, testers may be required to develop someDrive moduleTo drive the tested module formed in the integration activities.For larger modules, you can first convert some of themSoftwareThe unit is integrated into sub modules and then into a larger module.
Step 3:SoftwareModules are integrated into subsystems (or subsystems).Check whether each subsystem can work normally.Similarly, testers may be required to develop a small number ofDrive moduleTo 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 lockSoftwareThe location of the fault.However, it is not applicable to some development modes, such as using the XP development method, which requires testers toSoftwareComplete 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 coreSoftwareThe 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 timeSoftwareAll parts produce one productbaselineAnd 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 closecurve, 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 necessaryDrive moduleandPile 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 peripheralSoftwareThe 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 outSoftwareIntegration of components.
Step 4: On the peripherySoftwareBefore adding components to the core system, the external software components shall first complete the internal module level integration test.
Step 5: Add peripherals in orderSoftwareComponent, eliminate the problems in the integration of peripheral software components, and form the final user system.
Scheme comment: This integration test method is applicable toRapid software developmentIt 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 coreSoftwareComponents, peripheral software components and core software components shall have highCoupling degreeThe 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 withsoftware developmentProcess, 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 stablebaselineIn 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 packageAnd code development must be carried out in parallel, andversion control Tools to ensure that theTest scriptAnd 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: Setversion control Tools to ensure that the version obtained by the integration test automation tool is the latest version.If using CVSversion control 。
Step 3: testers and developers are responsible for writing the corresponding program codeTest script。
Step 4: Set the automated integration test tool, andconfiguration managementThe newly added code of the library is automatically integrated and testedTest reportReport 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 finalSoftwareProducts.
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 maintainsource codeAnd development and maintenancesoftware 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 thatTest packageSometimes 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 timesSoftwareIn 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 traditionalWaterfall developmentThe 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 testdesigner。
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 teamprogrammerBased 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"
4. Reviewtest case, if it fails, return to the third step
5. The tester shalltest caseCarry out test activities item by item, and fill in the test results inTest reportUpper;(Test reportAll must be overwrittentest case)
sixTest processIf 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 newTest report(The test report must cover all REOPENEDtest 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 testtest case95% 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;
Otest caseIt 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 themtest case;
OTest reportSeparate 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;
Operformance testing Large capacity inData testPart of the rounds after the test (the second step only needs to be carried out once)
Test pass criteria
Test results andtest caseIf 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 Integration (test) manager: control and complete test tasks andTest processTo determine whether the bug submitted by the tester needs to be modified;
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]