WO2015104635A2 - Procédé et appareil permettant de réaliser une intégration continue - Google Patents

Procédé et appareil permettant de réaliser une intégration continue Download PDF

Info

Publication number
WO2015104635A2
WO2015104635A2 PCT/IB2015/000148 IB2015000148W WO2015104635A2 WO 2015104635 A2 WO2015104635 A2 WO 2015104635A2 IB 2015000148 W IB2015000148 W IB 2015000148W WO 2015104635 A2 WO2015104635 A2 WO 2015104635A2
Authority
WO
WIPO (PCT)
Prior art keywords
test
level
target
resolution
continuous integration
Prior art date
Application number
PCT/IB2015/000148
Other languages
English (en)
Other versions
WO2015104635A3 (fr
Inventor
Jianfeng Liu
Original Assignee
Alcatel Lucent
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alcatel Lucent filed Critical Alcatel Lucent
Publication of WO2015104635A2 publication Critical patent/WO2015104635A2/fr
Publication of WO2015104635A3 publication Critical patent/WO2015104635A3/fr

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management

Definitions

  • the invention relates to the field of software development and testing technology, and more particularly, a technology of performing continuous integration.
  • Continuous Integration is a major component for agile development and is critical to efficient product development with solid quality.
  • existing CI systems mainly provide a general framework for tests, for example, providing a general guideline (e.g., Continuous Integration, published online by Martin Fowler, one of the founders of the agile development method, http://martinfowler.com/articles/continuousIntegration.html) or framework (e.g., a continuous integration tool Hudson developed based on Java) for continuous integration.
  • a general guideline e.g., Continuous Integration, published online by Martin Fowler, one of the founders of the agile development method, http://martinfowler.com/articles/continuousIntegration.html
  • framework e.g., a continuous integration tool Hudson developed based on Java
  • An objective of this invention is to provide a method and apparatus for performing continuous integration.
  • the method comprises:
  • an integration device for performing continuous integration comprising:
  • a first-level test apparatus configured to, according to a continuous integration request, execute corresponding first-level target test cases for one or more target codes against the continuous integration request, wherein the first-level target test cases correspond to test resolution of first-level test against the continuous integration request;
  • a first merging apparatus configured to merge said one or more target codes into corresponding first merged target codes after the first-level target test cases are executed successfully;
  • a second-level test apparatus configured to, according to the continuous integration request, execute corresponding second-level target test cases for the first merged target codes, wherein the second-level target test cases correspond to test resolution of second-level test against the continuous integration request.
  • the continuous integration device includes the aforementioned integration device for performing continuous integration according to another aspect of the invention.
  • the invention provides a total solution that integrates automatic software development, test case design and selection, multi-resolution integration and quality enhancement process.
  • this invention executes corresponding first-level target test cases for target codes against a continuous integration request, wherein the first-level target test cases correspond to test resolution of first-level test against the continuous integration request, and then merges target codes into corresponding first merged target codes after the first-level target test cases are executed successfully.
  • the invention executes corresponding second-level target test cases for the first merged target codes, wherein the second-level target test cases correspond to test resolution of second-level test against the continuous integration request.
  • this invention enhances the efficiency of continuous integration. Moreover, before executing the first-level target test cases for the target codes, the invention can also detect whether test availability trigger condition for testing with the first-level target test cases is satisfied. Via performing automatic process check of products (software, hardware and the like) under development during the continuous integration process, good development quality is assured.
  • the invention can also provide a flexible user interface to allow to perform continuous integration under different test resolutions or with different test types based on different user needs. As a result, the invention improves efficiency and user experience during continuous integration practice.
  • Fig. l shows a schematic diagram illustrating an integration device for performing continuous integration according to one aspect of the invention
  • Fig.2 shows a schematic diagram illustrating a graphical user interface of a continuous integration system of the invention
  • FIG.3 shows a schematic diagram illustrating a continuous integration system of the invention
  • Fig.4 shows a schematic diagram of test case architecture of the invention
  • Fig.5 shows a schematic diagram illustrating one logical test environment with two targets and one test device
  • Fig.6 shows a schematic diagram illustrating an integration device for performing continuous integration according to one preferred embodiment of the invention
  • FIG.7 shows a flowchart illustrating a method for performing continuous integration according to another aspect of the invention.
  • Fig.8 shows a flowchart illustrating a method for performing continuous integration according to one preferred embodiment of the invention.
  • FIG. 1 shows a schematic diagram of an integration device for performing continuous integration according to one aspect of the invention, wherein the integration device 1 comprises a first-level test apparatus 11, a first merging apparatus
  • the first-level test apparatus 11 executes corresponding first-level target test cases for one or more target codes against the continuous integration request, wherein the first-level target test cases correspond to test resolution of first-level test against the continuous integration request.
  • the first merging apparatus 12 merges said one or more target codes into corresponding first merged target codes after the first-level target test cases are executed successfully.
  • the integration device 1 includes a continuous integration system or platform available for team development members to test and integrate source codes in software development practices so as to help the team members to identify project risks and quality issues as early as possible.
  • the integration device 1 can be implemented by a network device, user equipment, or a device composed by integrating the network device and the user equipment via network.
  • the network device includes, but is not limited to, a network host, a single network server, a set of multiple network servers or computer sets based on cloud computing.
  • cloud is formed by a considerable number of hosts or network servers based on cloud computing, wherein cloud computing is one kind of distributed computing and is a super virtual computer composed by a group of loosely coupled computer clusters.
  • the user equipment can be any kind of electronic product that performs human-machine interaction with the user through a keypad, a touch pad, or a touch screen, for example, a desktop computer, PC, MAC, PDA, etc..
  • the network includes, but is not limited to, Internet, Wide Area Network, Metropolitan Area Network, Local Area Network, VPN Network, and Wireless Ad Hoc Network, etc..
  • both the network device and user equipment include an electronic device that can perform numerical value calculation and process information automatically according to pre-set or pre-stored instructions, and its hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), an Filed Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), or an embedded device, etc..
  • ASIC Application Specific Integrated Circuit
  • FPGA Filed Programmable Gate Array
  • DSP Digital Signal Processor
  • the first-level test apparatus 11 first obtains a continuous integration request through, for example, an application program interface (API) provided by a continuous integration device; or, obtains a continuous integration request through an application program interface (API) corresponding to the user interface (e.g., a command line user interface, a graphical user interface, etc.) provided by the continuous integration device; or, obtains the continuous integration request through an agreed communication protocol such as http, https, and the like. Then, according to the continuous integration request, determines first-level target test cases corresponding to one or more target codes against the continuous integration request.
  • API application program interface
  • API application program interface
  • said target codes include source codes being changed due to update, modification, and correction and the like from a source control repository and/or a source code management (SCM) system.
  • the source control repository and the source code management system can be located either in the integration device 1 or in a server connected to the integration device 1 via network.
  • said first-level test includes unit test and feature integration test, wherein both the unit test and feature integration test include tests of different resolutions, i.e., testing the target codes using corresponding test cases with different scales (coarse or fine).
  • said test resolution reflects how precise the corresponding test is. Tests of different test resolutions are usually realized by employing corresponding test cases, wherein the test resolution includes, but is not limited to, at least one of the following items: 1) first test resolution, which refers to performing fundamental tests for target codes so as to verify the basic function. This scale of tests generally runs within a short period of time.
  • second test resolution refers to performing robust tests (such as stress tests, exceptional tests, analysis tests, and the like) for the target codes to further determine possible issues of the target codes.
  • This scale of tests normally runs over a long period of time; 3) other non-time-critical tests, e.g., exceptional tests, static analysis tests, code coverage tests, and the like, which can be categorized as third test resolution. These tests take longer period of time and normally run overnight or when the resources are available.
  • test resolutions and the grounds for their classification are only exemplary, and other existing test resolutions and the grounds for their classification, or those that can possibly come out later should also be covered in the protection scope of the invention and included here in a way of quotation, if they are adaptable to this invention.
  • the first-level test apparatus 11 first obtains a continuous integration request through, for example, an application program interface (API) provided by a continuous integration device; or, obtains a continuous integration request through an application program interface (API) corresponding to the user interface (e.g., a command line user interface, a graphical user interface, etc.) provided by the continuous integration device; or, obtains the continuous integration request through an agreed communication protocol such as http, https, and the like.
  • API application program interface
  • API application program interface
  • a continuous integration system e.g., CI1
  • start starts the operation of continuous integration on the graphical user interface (as shown in Fig. 2) of the continuous integration system (e.g., CI1)
  • API application program interface
  • success or failure of the execution result can be indicated by different colors, e.g., red indicates execution failure, and green indicates execution success.
  • the CI1 can generally prompt a command line to inform the user to select (e.g., by selecting Yes/No) whether to run unit test (UT), feature integration (FI), system integration (SI), code merge and so on, step by step.
  • UT unit test
  • FI feature integration
  • SI system integration
  • the first-level test apparatus 11 can determine first-level target test cases corresponding to the target codes (i.e., source code cl) against the continuous integration request. For example (continue with the above example), suppose after user A clicks on a button for starting a continuous integration operation in the graphical user interface (as shown in Fig.
  • the first-level test apparatus 11 can filter out 1 st scale and 2 nd scale unit-test-cases of the first-level target test cases from pre-created test cases under file directories corresponding to the target codes (i.e., source code cl), wherein the 1 st scale unit-test-cases of the first-level target test cases correspond to the first test resolution of the first-level test (i.e., unit test) against the continuous integration request, and the 2 nd scale unit-test-cases of the first-level target test cases correspond to the second test resolution of the first-level test (i.e., unit test) against the continuous integration request.
  • the target codes i.e., source code cl
  • the first-level test apparatus 11 further executes the first-level target test cases for the target code (i.e., source code cl), for example, first executes 1 st scale unit-test-cases of the first-level target test cases corresponding to the first test resolution, and then executes 2 nd scale unit-test-cases of the first-level target test cases corresponding to the second test resolution; or, the first-level test apparatus 11 first executes regression test cases in 1 st scale unit-test-cases of the first-level target test cases corresponding to the first test resolution, and then executes new test cases in 1 st scale unit-test-cases of the first-level target test cases corresponding to the first test resolution; and likewise, the first-level test apparatus 11, when executing 2 nd scale unit-test-cases of the first-level target test cases corresponding to the second test resolution, can first execute regression test cases in 2 nd scale unit-test-cases of the first-level target test cases, and then execute the new test cases in 2
  • the target code
  • the new test cases shall be treated as regression tests for the next rounds of tests.
  • these cases shall be automatically moved to the corresponding regression tests directories. No test cases under new tests directory remain.
  • the first-level test apparatus 11 can also, according to a continuous integration request, execute corresponding first-level target test cases for one or more target codes and dependent codes thereof against the continuous integration request, wherein the first-level target test cases correspond to test resolution of first-level test against the continuous integration request.
  • said dependent codes refer to other codes that have build dependency on the checked out target codes. For example, if source code cl is the checked out target code, while source code c2 and source code c3 depend on the source code cl according to the build dependency relationship, then while the first-level test apparatus 11 executes the first-level target test cases for the source code cl, the first-level target test cases corresponding to source code c2 and source code c3 shall also be executed.
  • the manner of the first-level test apparatus 11 executing corresponding first-level target test cases for one or more target codes and dependent codes thereof against the continuous integration request is identical or substantially identical to the manner of the aforesaid first-level testing apparatus 11 executing corresponding first-level target test cases for one or more target codes against the continuous integration request.
  • details are no longer described and only included here in a way of quotation.
  • the first merging apparatus 12 merges said one or more target codes into corresponding first merged target codes after the first-level target test cases are executed successfully.
  • the first merged target codes are codes corresponding to a specific feature in the feature branch of the project development branching tree.
  • the first merged target codes are codes corresponding to a combination of features in the system branch of the project development branching tree.
  • the first merging apparatus 12 merges source code cl into the feature branch (e.g., feature branch 1) of the software item software wl .
  • the test resolution is the first test resolution (i.e., the first-level test corresponding to user
  • the first-level test apparatus 11 executes 1 st scale feature-test-cases of the first-level target test cases corresponding to the first test resolution of the feature integration test)
  • the first merging apparatus 12 merges source code cl into the system branch (e.g., system branch 1) of the software project such as software wl .
  • the second-level test apparatus 13 executes corresponding second-level target test cases for the first merged target codes, wherein the second-level target test cases correspond to test resolution of second-level test against the continuous integration request.
  • said second-level test includes feature integration test and system integration test, wherein both the feature integration test and system integration test include tests of different resolutions, i.e., testing the target codes using corresponding test cases with different scales (coarse or fine).
  • the second-level test is feature integration test
  • the second-level test is system integration test.
  • the meaning of the test resolution of the second-level test and the grounds for its classification are similar to those of the aforesaid first-level test. For the sake of simplicity, details are no longer described and only included here in a way of quotation.
  • the second-level test apparatus 13 first determines second-level target test cases of the first merged target codes based on the continuous integration request. For example, filters out the second-level target test cases from pre-created test cases under file directories corresponding to the first merged target codes, or, obtains the second-level target test cases based on a mapping relationship between the first merged target codes and the second-level target test cases, wherein the second-level target test cases correspond to the test resolution of the second-level test against the continuous integration request. Next, executes the second-level target test cases for the first merged target codes.
  • the manner of the second-level test apparatus 13 determining the second-level target test cases is identical or substantially identical to the manner of the first-level test apparatus 11 determining the first-level target test cases. For the sake of simplicity, details are no longer described and only included here in a way of quotation.
  • the manner of the second-level test apparatus 13 executing the second-level target test cases for the first merged target codes is identical or substantially identical to the manner of the first-level test apparatus 11 executing the first-level target testing cases for the target codes.
  • details are no longer described and only included here in a way of quotation.
  • the second-level test apparatus 13 can also, according to the continuous integration request, execute corresponding second-level target test cases for the first merged target codes, wherein the second-level target test cases correspond to test resolution of second-level test against the continuous integration request.
  • the test resolution of second-level test corresponds to the test resolution of first-level test.
  • the meaning of the test resolution of the second-level test corresponding to the test resolution of the first-level test includes, but is not limited to, at least any one of the following: 1) the test resolution of the second-level test is identical to the test resolution of the first-level test.
  • the test resolution of the second-level test is also executed to the second test resolution accordingly.
  • the test resolution of the first-level test is only the first test resolution
  • the test resolution of the second-level test is also the first test resolution; 2) the test resolution of the second-level is lower than the test resolution of the first-level test. For example, if the test resolution of the first-level test is relatively higher, then the test resolution of the second-level test can be relatively lower.
  • test resolution of the second-level test corresponding to the test resolution of the first-level test is only an example, and other existing meaning of the test resolution of the second-level test corresponding to the test resolution of the first-level test, or those that can possibly come out later should also be covered in the protection scope of the invention and included here in a way of quotation, if they are adaptable to this invention.
  • the first-level test apparatus 11 For example, for a target code (e.g., source code cl), suppose user A selects unit test after starting the operation of continuous integration and its test resolution is the first test resolution (i.e., the first-level test corresponding to user A's continuous integration request is the 1 st scale unit test), the first-level test apparatus 11 only executes 1 st scale unit-test-cases of the first-level target test cases corresponding to the first test resolution of the unit test. If the 1 st scale unit-test-cases pass, the first merging apparatus 12 merges the source code cl into the feature branch (e.g., feature branch 1) of the software item software wl .
  • the feature branch e.g., feature branch 1
  • the second-level test apparatus 13 can determine that the second-level test corresponding to the continuous integration request is feature integration test, and its test resolution can be identical to the test resolution of the unit test, i.e., the first test resolution. In other words, the second-level test apparatus 13 can execute 1 st scale feature-test-cases of the second-level target test cases corresponding to the first test resolution of the second-level test (i.e., the feature integration test).
  • the various apparatus of the integration device 1 work continuously between each other.
  • the first-level test apparatus 11 continuously, according to a continuous integration request, executes corresponding first-level target test cases for one or more target codes against the continuous integration request, wherein the first-level target test cases correspond to test resolution of first-level test against the continuous integration request.
  • the first merging apparatus 12 continuously merges said one or more target codes into corresponding first merged target codes after the first-level target test cases are executed successfully.
  • the second-level test apparatus 13 continuously, according to the continuous integration request, executes corresponding second-level target test cases for the first merged target codes, wherein the second-level target test cases correspond to test resolution of second-level test against the continuous integration request.
  • “continuously” means the various apparatus of the integration device 1 continuously executes corresponding first-level target test cases for target codes against a continuous integration request, merges said one or more target codes into corresponding first merged target codes, and executes corresponding second-level target test cases for the first merged target codes till the integration device 1 stops obtaining the continuous integration request within a relatively long time.
  • the integration device 1 further comprises a detection apparatus (not shown). Specifically, the detection apparatus detects whether to satisfy test availability trigger condition for testing with the first-level target test cases. When the test availability trigger condition is satisfied, the first-level test apparatus 11 executes the first-level target test cases for one or more target codes against the continuous integration request, wherein the first-level target test cases correspond to test resolution of first-level test against the continuous integration request.
  • a detection apparatus detects whether to satisfy test availability trigger condition for testing with the first-level target test cases.
  • the first-level test apparatus 11 executes the first-level target test cases for one or more target codes against the continuous integration request, wherein the first-level target test cases correspond to test resolution of first-level test against the continuous integration request.
  • the detection apparatus detects whether to satisfy test availability trigger condition for testing with the first-level target test cases. Only if the test availability trigger condition is satisfied, can the follow up test move forward.
  • said test availability trigger condition includes, but is not limited to, for example, 1) the first-level target test cases are available; 2) execution of the first-level target test cases for one or more target codes corresponding to the continuous integration request is allowed; 3) all the mandatory files required for executing the first-level target test cases for the target codes are available.
  • test availability trigger conditions are only exemplary, and other existing test availability trigger conditions, or those that can possibly come out later should also be covered in the protection scope of the invention and included here in a way of quotation, if they are adaptable to this invention.
  • the detection apparatus determines whether to satisfy test availability trigger condition for testing with 1 st scale unit-test-cases of the first-level test by checking modification request (MR) status of the document corresponding to 1 st scale unit-test-cases of the first-level test and modification request (MR) status of the corresponding design document corresponding to the source code changes.
  • MR modification request
  • MR modification request
  • said MR status includes: “create”, “assign”, “submit”, “close”, and etc.
  • the detection apparatus finds that the MR status of the document corresponding to 1 st scale unit-test-cases of the first-level test is "submit”, then the detection apparatus can determine that it satisfies test availability trigger condition for testing with 1 st scale unit-test-cases of the first-level test.
  • the first-level test apparatus 11 executes the first-level target test cases for one or more target codes corresponding to the continuous integration request, wherein the first-level target test cases correspond to the test resolution of the first-level test against the continuous integration request.
  • the manner of the first-level test apparatus 11 executing the first-level target test cases for the target codes is identical or substantially identical to the aforesaid manner of the first-level testing device 11 executing the first-level target test cases for the target codes. For the sake of simplicity, details are no longer described and only included here in a way of quotation.
  • the integration device 1 further comprises a second merging apparatus (not shown) and a third-level test apparatus (not shown).
  • the second merging apparatus merges said target codes into corresponding second merged target codes after the second-level target test cases are executed successfully.
  • the third-level test apparatus executes corresponding third-level target test cases for the second merged target codes, wherein the third-level target test cases correspond to test resolution of third-level test against the continuous integration request.
  • the second merging apparatus merges said target codes into corresponding second merged target codes after the second-level target test cases are executed successfully.
  • said second merged target codes include codes in system branch.
  • the first-level test is unit test
  • the first merged target codes are codes in feature branch.
  • the manner of the second merging apparatus merging the target codes into corresponding second merged target codes is identical or substantially identical to the aforesaid manner of the first merging apparatus 12 merging the target codes into the corresponding first merged codes.
  • the first merging apparatus 12 merging the target codes into the corresponding first merged codes.
  • the third-level test apparatus executes corresponding third-level target test cases for the second merged target codes, wherein the third-level target test cases correspond to test resolution of third-level test against the continuous integration request.
  • said third-level test includes system integration test.
  • the first-level test is unit test
  • the second-level test is feature integration test, wherein the system integration test includes tests of different resolutions, i.e., testing the target codes using corresponding test cases at different scales (coarse or fine).
  • the meaning of the test resolution of the third-level test and the grounds for its classification are similar to those of the first-level test and the second-level test. For the sake of simplicity, details are no longer described and only included here in a way of quotation.
  • the third-level test apparatus first determines third-level target test cases for the second merged target codes based on the continuous integration request. For example, filters out the third-level target test cases from pre-created test cases pre-created under file directories corresponding to the second merged target codes. Or, obtains the third-level target test cases based on a mapping relationship between the second merged target codes and the third-level target test cases, wherein the third-level target test cases correspond to the test resolution of the third-level test against the continuous integration request. Next, executes the third-level target test cases for the second merged target codes.
  • the manner of the third-level test apparatus determining the third-level target test cases is identical or substantially identical to the manner of the first-level test apparatus 11 determining the first-level target test cases.
  • details are no longer described and only included here in a way of quotation.
  • the manner of the third-level test apparatus executing the third-level target test cases for the second merged target codes is identical or substantially identical to the manner of the first-level test apparatus 11 executing the first-level target test cases for the target codes.
  • details are no longer described and only included here in a way of quotation.
  • the invention can also perform detection mechanism which is similar to aforesaid detection mechanism for detecting whether to satisfy test availability trigger condition for testing with the first-level target test cases. That is, before second-level test apparatus 13 executing corresponding second-level target test cases for the first merged target codes, the invention can detect whether to satisfy test availability trigger condition for testing with the second-level target test cases. Similarly, before third-level test apparatus executing corresponding third-level target test cases for the second merged target codes, the invention can detect whether to satisfy test availability trigger condition for testing with the third-level target test cases.
  • the third-level test is system integration test.
  • Each type of tests includes test cases corresponding to different test resolutions.
  • the user can specify options via the user interface of the integration device 1 of the invention. For example, when the user triggers a continuous integration, the following options can be flexibly specified on the user interface:
  • the user can initiate unit test, feature integration test, and system integration test and select corresponding test resolutions and the like through operating on the user interface.
  • the user can also only specify unit test or feature integration test etc. on the user interface according to his/her needs.
  • default configuration shall be applied to the integration device 1 for execution.
  • Fig. 3 shows a schematic diagram illustrating a continuous integration system of the invention.
  • input of the integration device 1 is the changed source code set based on the codes checked out via SCM from the source control repository. For example, after the user makes all needed code changes to support a feature, he/she triggers an automatic continuous integration via the user interface of the integration device 1 in the invention.
  • the integration device 1 can automatically accomplish the continuous integration in sequence, i.e., automatically perform collection (or selection) of test cases for multi-resolution tests, unit test, process check, target codes merging into feature branch, feature integration test, target codes merging into system branch, and system integration test.
  • the integration device 1 of the invention can also automatically report the test results of each stage to the user via an automatic report and notification server.
  • the integration device 1 of the invention should check to determine successful completion of relevant steps before merging the codes and execute the detection mechanism via the detection apparatus for detecting whether to satisfy test availability trigger condition before testing with target test cases (e.g., first-level target test cases, second-level target test cases, and third-level target test cases).
  • target test cases e.g., first-level target test cases, second-level target test cases, and third-level target test cases.
  • any test or detection step fails, all corresponding parties will be automatically notified of the fault or problem, and only after all faults and problems are cleared (at least the test fault or problem of the first test resolution is cleared), can the continuous integration process move forward.
  • This enables early identification and resolution of product issues introduced during development, thereby guarantees development quality of the product and avoids important process such as documentation and reviews being neglected during agile development period. If relevant issues and faults are only found at later stage of the product project, the cost for solving the problems would be huge, which might cause delay or even failure of the proj ect.
  • the user can also choose to independently run different resolutions of unit test/feature integration test/system integration test or code merging at specified time as per needed base. If the "automatic merge" option is selected and file conflict occurs, the source code owner shall get a prompt and he/she needs to resolve the conflict before continuous integration moving forward.
  • the invention can also provide flexible user interface to allow for continuous integration under different test resolutions or with different test types based on different user needs, which enhances efficiency, flexibility and user experience during continuous integration practice.
  • test cases for different types of integration could be similar or even the same. If that's the case, simply adding a symbolic file/directory link from system integration test cases to feature integration test cases or from feature integration test cases to unit test cases shall be enough.
  • a feature test case may be designed for different modules. In such situation, simply check in the test case files at the main module directory and add symbolic file links for the rest of the modules at the corresponding directories.
  • the invention sets up the mapping structure between unit test cases, feature integration test cases and system integration test cases and allows for easy composition of all the test cases.
  • the target test cases (for example, first-level target test cases, second-level target test cases, and third-level target test cases) of the invention all include regression test cases and new test cases, as shown in Fig. 4.
  • the invention can execute the regression test cases and new test cases for the target codes.
  • the regression test cases and new test cases for the target codes it can execute the test cases corresponding to different test resolutions stage by stage.
  • the digit corresponding to a component in Fig.4 only represents the sequence number of the corresponding component thereof, not the reference sign of this component.
  • Fig. 5 shows a schematic diagram illustrating one logical test environment with two targets and one test device.
  • target gl and target g2 that have a connection relationship are back-to-back connected via four logical ports (port pi to port p4).
  • the two targets are connected to the test device respectively via another logic port pair (port p5 and port p6).
  • said test device generates test signals and checks for test results for executing corresponding test cases. It is part of the integration device 1 of the invention.
  • the logical test environment is regardless of such physical configuration as slot, port, etc.
  • a mapping table as illustrated in the following table 1 is defined in a configuration file mapping logical ports to the physical ports.
  • physical test environment change for example, changing of slot number due to backplane issue or changing of port number due to different pack characteristics, simply keeping the logical test environment and changing the configuration mapping table shall keep the original test cases intact and continue to work.
  • target gl and target g2 can be two hardware products with connection relationship, e.g., target lg is network element nl and target g2 is network element n2. They are back-to-back connected via different physical ports. No matter how the slot or port numbers change, and where the physical slots or ports are located, their logical port numbers should keep unchanged.
  • Target gl and target g2 can also be two software modules with connection relationship.
  • the digits corresponding to ports in Fig.5 only represents the port number of the corresponding target's port or the corresponding device's ports thereof, not the reference sign of the port.
  • the aforesaid integration device 1 for continuous integration can be combined with an existing continuous integration tool to form a new continuous integration tool.
  • the existing continuous integration tool includes, for example, CruiseControl of OpenSource, LuntBuild, Hudson and the like.
  • FIG. 6 shows a schematic diagram illustrating an integration device for performing continuous integration according to one preferred embodiment of the invention, wherein integration device 1 comprises a first-level test apparatus 11 ', a first merging apparatus 12', and a second-level test apparatus 13', wherein the first-level test apparatus 11 ' includes a resolution determination unit 111 ' and a first-level test unit 112'. Specifically, the resolution determination unit 111 ' determines test resolution of first-level test corresponding to a continuous integration request.
  • the first-level test unit 112' executes corresponding first-level target test cases for one or more target codes corresponding to the continuous integration request based on the test resolution of first-level test, wherein the first-level target test cases correspond to the test resolution of first-level test.
  • the first merging apparatus 12' merges said one or more target codes into corresponding first merged target codes after the first-level target test cases are executed successfully.
  • the second-level test apparatus 13 ' executes corresponding second-level target test cases for the first merged target codes, wherein the second-level target test cases correspond to test resolution of second-level test against the continuous integration request.
  • the first merging apparatus 12' and the second-level test apparatus 13' are identical or substantially identical to the contents of corresponding apparatus in the embodiment of Fig. 1. For the sake of simplicity, details are no longer described and only included here in a way of quotation.
  • the resolution determination unit 111 ' determines test resolution of first-level test corresponding to a continuous integration request.
  • the manner of the resolution determination unit 111 ' determining the test resolution includes, but is not limited to, at least one of the following approaches:
  • said relevant information includes, but is not limited to, at least any one of the following items: i) the application type of the target codes, e.g., civil product, aerospace product, etc.; ii) the device load information of the testing device which executes the first-level target test cases for the target codes.
  • the application type of the target codes e.g., civil product, aerospace product, etc.
  • the device load information of the testing device which executes the first-level target test cases for the target codes.
  • a target code e.g., source code cl
  • the product corresponding to the source code cl is an aerospace product, it is highly demanding on product quality and safety.
  • the resolution determination unit 111 ' can determine that the test resolution of the unit test is multi-level test resolution. This guarantees the function and robustness of the product. For another example, suppose the product corresponding to source code cl is a civil product, its product quality requirement is relatively lower than the quality requirement of an aerospace product. Hence the resolution determination unit 111 ' can determine that the test resolution of the unit test is the first test resolution, i.e., only executing basic tests or coarsest resolution tests.
  • the resolution determination unit 111 ' can determine that the test resolution of the unit test is the first test resolution, i.e., only executing basic tests at this point.
  • the device i.e., the integration device 1 performing the test has a lighter load
  • the resolution determination unit 111 ' can determine that the test resolution of the unit test is multi-level test resolution.
  • said predetermined rule includes, for example, establishing a FIFO (First In First Out) queue corresponding to each test resolution on a shared device resource of each-level test (i.e., first-level test, second-level test, and third-level test), and all test requests of the same test resolution waiting in line according to the FIFO order in the queue.
  • T(i) (i denotes the level of the test resolution or scale of the test)
  • the running time period of all test sets waiting for test in the FIFO queue corresponding to the i-1 test resolution are: Tl(i-l), T2 (i-1), ... , Tn(i-l) (n denotes the queue length). If T(i) is smaller than Tl(i-l) uT2(i-l)u...
  • test resolution can also be determined in conjunction with the user's selection of the test resolution.
  • priority can also act as the input parameter so as to preferentially execute the time-critical test according to the user's need.
  • the first-level test unit 112' executes corresponding first-level target test cases for one or more target codes against the continuous integration request based on the test resolution of first-level test, wherein the first-level target test cases correspond to the test resolution of first-level test.
  • the manner of the first-level test unit 112' executing the first-level test cases corresponding to the target codes is identical or substantially identical to the manner of the first-level test apparatus 11 ' executing the first-level target test cases for the target codes in Fig. 1. For the sake of simplicity, details are no longer described and only included here in a way of quotation.
  • FIG. 7 shows a flowchart illustrating a method for performing continuous integration according to another aspect of the invention.
  • the integration device 1 executes corresponding first-level target test cases for one or more target codes against the continuous integration request, wherein the first-level target test cases correspond to test resolution of first-level test against the continuous integration request.
  • the integration device 1 merges said one or more target codes into corresponding first merged target codes after the first-level target test cases are executed successfully.
  • the integration device 1 executes corresponding second-level target test cases for the first merged target codes, wherein the second-level target test cases correspond to test resolution of second-level test against the continuous integration request.
  • the integration device 1 includes a continuous integration system or platform available for team development members to test and integrate source codes in software development practices so as to help the team members to identify project risks and quality issues as early as possible.
  • the integration device 1 can be implemented by a network device, user equipment, or a device composed by integrating the network device and the user equipment via network.
  • the network device includes, but is not limited to, a network host, a single network server, a set of multiple network servers or computer sets based on cloud computing.
  • cloud is formed by a considerable number of hosts or network servers based on cloud computing, wherein cloud computing is one kind of distributed computing and is a super virtual computer composed by a group of loosely coupled computer clusters.
  • the user equipment can be any kind of electronic product that performs human-machine interaction with the user through a keypad, a touch pad, or a touch screen, for example, a desktop computer, PC, MAC, PDA, etc.
  • the network includes, but is not limited to, Internet, Wide Area Network, Metropolitan Area Network, Local Area Network, VPN Network, and Wireless Ad Hoc Network, etc..
  • the integration device 1 is only exemplary, other existing network device or user equipment, or those that can possibly come out later should also be covered in the protection scope of the invention and included here in a way of quotation, if they are adaptable to this invention.
  • both the network device and user equipment include an electronic device that can perform numerical value calculation and process information automatically according to pre-set or pre-stored instructions, and its hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), an Filed Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), or an embedded device, etc..
  • ASIC Application Specific Integrated Circuit
  • FPGA Filed Programmable Gate Array
  • DSP Digital Signal Processor
  • the integration device 1 first obtains a continuous integration request through, for example, an application program interface (API) provided by a continuous integration device; or, obtains a continuous integration request through an application program interface (API) corresponding to the user interface (e.g., a command line user interface, a graphical user interface, etc.) provided by the continuous integration device; or, obtains the continuous integration request through an agreed communication protocol such as http, https, and the like. Then, according to the continuous integration request, determines first-level target test cases corresponding to one or more target codes against the continuous integration request.
  • API application program interface
  • API application program interface
  • said target codes include source codes being changed due to update, modification, and correction and the like from a source control repository and/or a source code management (SCM) system.
  • the source control repository and the source code management system can be located either in the integration device 1 or in a server connected to the integration device 1 via network.
  • said first-level test includes unit test and feature integration test, wherein both the unit test and feature integration test include tests of different resolutions, i.e., testing the target codes using corresponding test cases with different scales (coarse or fine).
  • said test resolution reflects how precise the corresponding test is. Tests of different test resolutions are usually realized by employing corresponding test cases, wherein the test resolution includes, but is not limited to, at least one of the following items: 1) first test resolution, which refers to performing fundamental tests for target codes so as to verify the basic function. This scale of tests generally runs within a short period of time.
  • second test resolution refers to performing robust tests (such as stress tests, exceptional tests, analysis tests, and the like) for the target codes to further determine possible issues of the target codes.
  • This scale of tests normally runs over a long period of time; 3) other non-time-critical tests, e.g., exceptional tests, static analysis tests, code coverage tests, and the like, which can be categorized as third test resolution. These tests take longer period of time and normally run overnight or when the resources are available.
  • test resolutions and the grounds for their classification are only exemplary, and other existing test resolutions and the grounds for their classification, or those that can possibly come out later should also be covered in the protection scope of the invention and included here in a way of quotation, if they are adaptable to this invention.
  • the integration device 1 first obtains a continuous integration request through, for example, an application program interface (API) provided by a continuous integration device; or, obtains a continuous integration request through an application program interface (API) corresponding to the user interface (e.g., a command line user interface, a graphical user interface, etc.) provided by the continuous integration device; or, obtains the continuous integration request through an agreed communication protocol such as http, https, and the like.
  • API application program interface
  • the user interface e.g., a command line user interface, a graphical user interface, etc.
  • HTTP HyperText Transfer Protocol
  • a continuous integration system e.g., CI1
  • the integration device 1 obtains the user As request of starting the continuous integration in a user interface through an application program interface (API) provided by continuous integration system (e.g., CI1) and then proceeds with the follow up continuous integration activities.
  • API application program interface
  • success or failure of the execution result can be indicated by different colors, e.g., red indicates execution failure, and green indicates execution success.
  • the CI1 can generally prompt a command line to inform the user to select (e.g., by selecting Yes/No) whether to run unit test (UT), feature integration (FI), system integration (SI), code merge and so on, step by step.
  • UT unit test
  • FI feature integration
  • SI system integration
  • code merge code merge
  • step by step the continuous integration system CI1 should further prompt a command line to allow the user to specify configuration parameters of the step.
  • the integration device 1 can determine first-level target test cases corresponding to the target codes (i.e., source code cl) against the continuous integration request. For example (continue with the above example), suppose after user A clicks on a button for starting a continuous integration operation in the graphical user interface (as shown in Fig.
  • the integration device 1 can filter out 1 st scale and 2 nd scale unit-test-cases of the first-level target test cases from pre-created test cases under file directories corresponding to the target codes (i.e., source code cl), wherein the 1 st scale unit-test-cases of the first-level target test cases correspond to the first test resolution of the first-level test (i.e., unit test) against the continuous integration request, and the 2 nd scale unit-test-cases of the first-level target test cases correspond to the second test resolution of the first-level test (i.e., unit test) against the continuous integration request.
  • the target codes i.e., source code cl
  • the integration device 1 further executes the first-level target test cases for the target code (i.e., source code cl), for example, first executes 1 st scale unit-test-cases of the first-level target test cases corresponding to the first test resolution, and then executes 2 scale unit-test-cases of the first-level target test cases corresponding to the second test resolution; or, in the step SI, the integration device 1 first executes regression test cases in 1 st scale unit-test-cases of the first-level target test cases corresponding to the first test resolution, and then executes new test cases in 1 st scale unit-test-cases of the first-level target test cases corresponding to the first test resolution; and likewise, in the step SI, the integration device 1, when executing 2 nd scale unit-test-cases of the first-level target test cases corresponding to the second test resolution, can first execute regression test cases in 2 nd scale unit-test-cases of the first-level target test cases, and then execute the
  • the new test cases shall be treated as regression tests for the next rounds of tests.
  • these cases shall be automatically moved to the corresponding regression tests directories. No test cases under new tests directory remain.
  • the integration device 1 can also, according to a continuous integration request, execute corresponding first-level target test cases for one or more target codes and dependent codes thereof against the continuous integration request, wherein the first-level target test cases correspond to test resolution of first-level test against the continuous integration request.
  • said dependent codes refer to other codes that have build dependency on the checked out target codes.
  • source code cl is the checked out target code
  • source code c2 and source code c3 depend on the source code cl according to the build dependency relationship
  • the integration device 1 executes the first-level target test cases for source code cl
  • the first-level target test cases corresponding to source code c2 and source code c3 shall also be executed.
  • the aforesaid dependent codes are only exemplary, and other existing dependent codes, or those that can possibly come out later should also be covered in the protection scope of the invention and included here in a way of quotation, if they are adaptable to this invention.
  • the manner of, the integration device 1 executing corresponding first-level target test cases for one or more target codes and dependent codes thereof against the continuous integration request is identical or substantially identical to the manner of the aforesaid first-level testing device 11 executing corresponding first-level target test cases for one or more target codes against the continuous integration request.
  • the integration device 1 executing corresponding first-level target test cases for one or more target codes and dependent codes thereof against the continuous integration request is identical or substantially identical to the manner of the aforesaid first-level testing device 11 executing corresponding first-level target test cases for one or more target codes against the continuous integration request.
  • the integration device 1 merges said one or more target codes into corresponding first merged target codes after the first-level target test cases are executed successfully.
  • the first merged target codes are codes corresponding to a specific feature in the feature branch of the project development branching tree.
  • the first merged target codes are codes corresponding to a combination of features in the system branch of the project development branching tree.
  • the integration device 1 executes I s scale unit-test-cases of the first-level target test cases corresponding to the first test resolution and executes 2 nd scale unit-test-cases of the first target test cases corresponding to the second test resolution for the source code cl .
  • the integration device 1 merges the source code cl into the feature branch (e.g., feature branch 1) of the software item software wl .
  • the integration device 1 executes 1 st scale feature-test-cases of the first-level target test cases corresponding to the first test resolution of the feature integration test), if these test cases pass, in the step S2, the integration device 1 merges source code cl into the system branch (e.g., system branch 1) of the software project such as software wl .
  • the integration device 1 executes corresponding second-level target test cases for the first merged target codes, wherein the second-level target test cases correspond to test resolution of second-level test against the continuous integration request.
  • said second-level test includes feature integration test and system integration test, wherein both the feature integration test and system integration test include tests of different resolutions, i.e., testing the target codes using corresponding test cases with different scales (coarse or fine).
  • the first-level test is unit test
  • the second-level test is feature integration test
  • the second-level test is system integration test.
  • the meaning of the test resolution of the second-level test and the grounds for its classification are similar to those of the aforesaid first-level test. For the sake of simplicity, details are no longer described and only included here in a way of quotation.
  • the integration device 1 first determines second-level target test cases of the first merged target codes based on the continuous integration request. For example, filters out the second-level target test cases from pre-created test cases under file directories corresponding to the first merged target codes, or, obtains the second-level target test cases based on a mapping relationship between the first merged target codes and the second-level target test cases, wherein the second-level target test cases correspond to the test resolution of the second-level test against the continuous integration request. Next, executes the second-level target test cases for the first merged target codes.
  • the manner of the integration device 1 determining the second-level target test cases is identical or substantially identical to the manner of the integration device 1 determining the first-level target test cases in the step SI .
  • details are no longer described and only included here in a way of quotation.
  • the manner of, the integration device 1 executing the second-level target test cases for the first merged target codes is identical or substantially identical to the manner of the integration device 1 executing the first-level target testing cases for the target codes in the step SI,.
  • the integration device 1 can also, according to the continuous integration request, execute corresponding second-level target test cases for the first merged target codes, wherein the second-level target test cases correspond to test resolution of second-level test against the continuous integration request.
  • the test resolution of second-level test corresponds to the test resolution of first-level test.
  • the meaning of the test resolution of the second-level test corresponding to the test resolution of the first-level test includes, but is not limited to, at least any one of the following: 1) the test resolution of the second-level test is identical to the test resolution of the first-level test. For example, when the test resolution of the first-level test is the first test resolution and the second test resolution, the test resolution of the second-level test is also executed to the second test resolution accordingly. For another example, when the test resolution of the first-level test is only the first test resolution, the test resolution of the second-level test is also the first test resolution; 2) the test resolution of the second-level is lower than the test resolution of the first-level test.
  • test resolution of the first-level test is relatively higher, then the test resolution of the second-level test can be relatively lower.
  • the meaning of the test resolution of the second-level test corresponding to the test resolution of the first-level test is only an example, and other existing meaning of the test resolution of the second-level test corresponding to the test resolution of the first-level test, or those that can possibly come out later should also be covered in the protection scope of the invention and included here in a way of quotation, if they are adaptable to this invention.
  • the integration device 1 For example, for a target code (e.g., the source code cl), suppose user A selects unit test after starting the operation of continuous integration and its test resolution is the first test resolution (i.e., the first-level test corresponding to user A's continuous integration request is the 1 st scale unit test), then in the step SI, the integration device 1 only executes 1 st scale unit-test-cases of the first-level target test cases corresponding to the first test resolution of the unit test. If the 1 st scale unit-test-cases pass, in the step S2, the integration device 1 merges source code cl into the feature branch (e.g., feature branch 1) of the software item software wl .
  • the feature branch e.g., feature branch 1
  • the integration device 1 can determine that the second-level test corresponding to the continuous integration request is feature integration test, and its test resolution can be identical to the test resolution of the unit test, i.e., the first test resolution. In other words, in the step S3, the integration device 1 can execute 1 st scale feature-test-cases of the second-level target test cases corresponding to the first test resolution of the second-level test (i.e., the feature integration test).
  • the various steps of the integration device 1 work continuously between each other. Specifically, in the step SI, the integration device 1 continuously, according to a continuous integration request, executes corresponding first-level target test cases for one or more target codes against the continuous integration request, wherein the first-level target test cases correspond to test resolution of first-level test against the continuous integration request. In the step S2, the integration device 1 continuously merges said one or more target codes into corresponding first merged target codes after the first-level target test cases are executed successfully. In the step S3, the integration device 1 continuously, according to the continuous integration request, executes corresponding second-level target test cases for the first merged target codes, wherein the second-level target test cases correspond to test resolution of second-level test against the continuous integration request.
  • “continuously” means the various step of the integration device 1 continuously executes corresponding first-level target test cases for target codes against a continuous integration request, merges said one or more target codes into corresponding first merged target codes, and executes corresponding second-level target test cases for the first merged target codes till the integration device 1 stops obtaining the continuous integration request within a relatively long time.
  • the integration device 1 further comprises step S4 (not shown). Specifically, in the step S4, the integration device 1 detects whether to satisfy test availability trigger condition for testing with the first-level target test cases. When the test availability trigger condition is satisfied, then in the step S I, the integration device 1 executes the first-level target test cases for one or more target codes against the continuous integration request, wherein the first-level target test cases correspond to test resolution of first-level test against the continuous integration request.
  • the integration device 1 detects whether to satisfy test availability trigger condition for testing with the first-level target test cases. Only if the test availability trigger condition is satisfied, can the follow up test move forward.
  • said test availability trigger condition includes, but is not limited to, for example, 1) the first-level target test cases are available; 2) execution of the first-level target test cases for one or more target codes corresponding to the continuous integration request is allowed; 3) all the mandatory files required for executing the first-level target test cases for the target codes are available.
  • test availability trigger conditions are only exemplary, and other existing test availability trigger conditions, or those that can possibly come out later should also be covered in the protection scope of the invention and included here in a way of quotation, if they are adaptable to this invention.
  • the integration device 1 determines whether to satisfy test availability trigger condition for testing with 1 st scale unit-test-cases of the first-level test by checking modification request (MR) status of the document corresponding to 1 st scale unit-test-cases of the first-level test and modification request (MR) status of the corresponding design document corresponding to the source code changes.
  • MR modification request
  • MR modification request
  • said MR status includes: “create”, “assign”, “submit”, “close”, and etc.
  • the integration device 1 finds that the MR status of the document corresponding to 1 st scale unit-test-cases of the first-level test is "submit”, then in the step S4, the integration device 1 can determine that it satisfies test availability trigger condition for testing with 1 st scale unit-test-cases of the first-level test.
  • the integration device 1 executes the first-level target test cases for one or more target codes corresponding to the continuous integration request, wherein the first-level target test cases correspond to the test resolution of the first-level test against the continuous integration request.
  • the manner of the integration device 1 executing the first-level target test cases for the target codes is identical or substantially identical to the aforesaid manner of the first-level testing device 11 executing the first-level target test cases for the target codes. For the sake of simplicity, details are no longer described and only included here in a way of quotation.
  • the integration device 1 further comprises step S5 (not shown) and step S6 (not shown). Specifically, in the step S5, the integration device 1 merges said target codes into corresponding second merged target codes after the second-level target test cases are executed successfully. In the step S6, the integration device 1, according to the continuous integration request, executes corresponding third-level target test cases for the second merged target codes, wherein the third-level target test cases correspond to test resolution of third-level test against the continuous integration request.
  • the integration device 1 merges said target codes into corresponding second merged target codes after the second-level target test cases are executed successfully.
  • said second merged target codes include codes in system branch.
  • the first-level test is unit test
  • the first merged target codes are codes in feature branch.
  • the manner of, the integration device 1 merging the target codes into corresponding second merged target codes is identical or substantially identical to the aforesaid manner of the integration device 1 merging the target codes into the corresponding first merged codes in the step S2.
  • the steps S5 and S6 are identical or substantially identical to the aforesaid manner of the integration device 1 merging the target codes into the corresponding first merged codes in the step S2.
  • the integration device 1 executes corresponding third-level target test cases for the second merged target codes, wherein the third-level target test cases correspond to test resolution of third-level test against the continuous integration request.
  • said third-level test includes system integration test.
  • the first-level test is unit test
  • the second-level test is feature integration test, wherein the system integration test includes tests of different resolutions, i.e., testing the target codes using corresponding test cases at different scales (coarse or fine).
  • the meaning of the test resolution of the third-level test and the grounds for its classification are similar to those of the first-level test and the second-level test. For the sake of simplicity, details are no longer described and only included here in a way of quotation.
  • the integration device 1 first determines third-level target test cases for the second merged target codes based on the continuous integration request. For example, filters out the third-level target test cases from pre-created test cases pre-created under file directories corresponding to the second merged target codes. Or, obtains the third-level target test cases based on a mapping relationship between the second merged target codes and the third-level target test cases, wherein the third-level target test cases correspond to the test resolution of the third-level test against the continuous integration request. Next, executes the third-level target test cases for the second merged target codes.
  • the manner of the integration device 1 determining the third-level target test cases is identical or substantially identical to the manner of the integration device 1 determining the first-level target test cases in the step SI .
  • details are no longer described and only included here in a way of quotation.
  • the manner of the integration device 1 executing the third-level target test cases for the second merged target codes is identical or substantially identical to the manner of the integration device 1 executing the first-level target test cases for the target codes in the step SI .
  • details are no longer described and only included here in a way of quotation.
  • the invention can also perform detection mechanism which is similar to aforesaid detection mechanism for detecting whether to satisfy test availability trigger condition for testing with the first-level target test cases. That is, in the step S3, before the integration device 1 executing corresponding second-level target test cases for the first merged target codes, the invention can detect whether to satisfy test availability trigger condition for testing with the second-level target test cases. Similarly, in the step S6, before the integration device 1 executing corresponding third-level target test cases for the second merged target codes, the invention can detect whether to satisfy test availability trigger condition for testing with the third-level target test cases.
  • the third-level test is system integration test.
  • Each type of tests includes test cases corresponding to different test resolutions.
  • the user can specify options via the user interface of the integration device 1 of the invention. For example, when the user triggers a continuous integration, the following options can be flexibly specified on the user interface:
  • the user can initiate unit test, feature integration test, and system integration test and select corresponding test resolutions and the like through operating on the user interface.
  • the user can also only specify unit test or feature integration test etc. on the user interface according to his/her needs.
  • default configuration shall be applied to the integration device 1 for execution.
  • Fig. 3 shows a schematic diagram illustrating a continuous integration system of the invention.
  • input of the integration device 1 is the changed source code set based on the codes checked out via SCM from the source control repository. For example, after the user makes all needed code changes to support a feature, he/she triggers an automatic continuous integration via the user interface of the integration device 1 in the invention.
  • the integration device 1 can automatically accomplish the continuous integration in sequence, i.e., automatically perform collection (or selection) of test cases for multi-resolution tests, unit test, process check, target codes merging into feature branch, feature integration test, target codes merging into system branch, and system integration test.
  • the integration device 1 of the invention can also automatically report the test results of each stage to the user via an automatic report and notification server.
  • the integration device 1 of the invention should check to determine successful completion of relevant steps before merging the codes and execute the detection mechanism via the integration device 1 for detecting whether to satisfy test availability trigger condition before testing with target test cases (e.g., first-level target test cases, second-level target test cases, and third-level target test cases).
  • target test cases e.g., first-level target test cases, second-level target test cases, and third-level target test cases.
  • any test or detection step fails, all corresponding parties will be automatically notified of the fault or problem, and only after all faults and problems are cleared (at least the test fault or problem of the first test resolution is cleared), can the continuous integration process move forward.
  • This enables early identification and resolution of product issues introduced during development, thereby guarantees development quality of the product and avoids important process such as documentation and reviews being neglected during agile development period. If relevant issues and faults are only found at later stage of the product project, the cost for solving the problems would be huge, which might cause delay or even failure of the proj ect.
  • the user can also choose to independently run different resolutions of unit test/feature integration test/system integration test or code merging at specified time as per needed base. If the "automatic merge" option is selected and file conflict occurs, the source code owner shall get a prompt and he/she needs to resolve the conflict before continuous integration moving forward.
  • the invention can also provide flexible user interface to allow for continuous integration under different test resolutions or with different test types based on different user needs, which enhances efficiency, flexibility and user experience during continuous integration practice.
  • test cases for different types of integration could be similar or even the same. If that's the case, simply adding a symbolic file/directory link from system integration test cases to feature integration test cases or from feature integration test cases to unit test cases shall be enough.
  • a feature test case may be designed for different modules. In such situation, simply check in the test case files at the main module directory and add symbolic file links for the rest of the modules at the corresponding directories.
  • the invention sets up the mapping structure between unit test cases, feature integration test cases and system integration test cases and allows for easy composition of all the test cases.
  • the target test cases (for example, first-level target test cases, second-level target test cases, and third-level target test cases) of the invention all include regression test cases and new test cases, as shown in Fig. 4.
  • the invention can execute the regression test cases and new test cases for the target codes.
  • the regression test cases and new test cases for the target codes it can execute the test cases corresponding to different test resolutions stage by stage.
  • the digit corresponding to a component in Fig.4 only represents the sequence number of the corresponding component thereof, not the reference sign of this component.
  • Fig. 5 shows a schematic diagram illustrating one logical test environment with two targets and one test device.
  • target gl and target g2 that have a connection relationship are back-to-back connected via four logical ports (port pi to port p4).
  • the two targets are connected to the test device respectively via another logic port pair (port p5 and port p6).
  • said test device generates test signals and checks for test results for executing corresponding test cases. It is part of the integration device 1 of the invention.
  • the logical test environment is regardless of such physical configuration as slot, port, etc.
  • a mapping table as illustrated in the following table 2 is defined in a configuration file mapping logical ports to the physical ports.
  • physical test environment change for example, changing of slot number due to backplane issue or changing of port number due to different pack characteristics, simply keeping the logical test environment and changing the configuration mapping table shall keep the original test cases intact and continue to work.
  • target gl and target g2 can be two hardware products with connection relationship, e.g., target gl is network element nl and target g2 is network element n2. They are back-to-back connected via different physical ports. No matter how the slot or port numbers change, and where the physical slots or ports are located, their logical port numbers should keep unchanged.
  • Target gl and target g2 can also be two software modules with connection relationship.
  • the digits corresponding to ports in Fig.5 only represents the port number of the corresponding target's port or the corresponding device's ports thereof, not the reference sign of the port.
  • Fig. 8 shows a flowchart illustrating a method for performing continuous integration according to one preferred embodiment of the invention.
  • This method comprises step S I ', step S2', and step S3 ', wherein step S I ' includes step S 11 ' and step S 12' .
  • the integration device 1 determines test resolution of first-level test corresponding to a continuous integration request.
  • the integration device 1 executes corresponding first-level target test cases for one or more target codes corresponding to the continuous integration request based on the test resolution of first-level test, wherein the first-level target test cases correspond to the test resolution of first-level test.
  • the integration device 1 merges said one or more target codes into corresponding first merged target codes after the first-level target test cases are executed successfully.
  • the integration device 1 according to the continuous integration request, executes corresponding second-level target test cases for the first merged target codes, wherein the second-level target test cases correspond to test resolution of second-level test against the continuous integration request.
  • the step S2' and the step S3 ' in the integration device 1 are identical or substantially identical to the contents of corresponding apparatus in the embodiment of Fig. 7. For the sake of simplicity, details are no longer described and only included here in a way of quotation.
  • the integration device 1 determines test resolution of first-level test corresponding to a continuous integration request.
  • the manner of the integration device 1 determining the test resolution includes, but is not limited to, at least one of the following approaches:
  • said relevant information includes, but is not limited to, at least any one of the following items: i) the application type of the target codes, e.g., civil product, aerospace product, etc.; ii) the device load information of the testing device which executes the first-level target test cases for the target codes.
  • the application type of the target codes e.g., civil product, aerospace product, etc.
  • the device load information of the testing device which executes the first-level target test cases for the target codes.
  • a target code e.g., source code cl
  • the product corresponding to source codel is an aerospace product, it is highly demanding on product quality and safety.
  • the integration device 1 can determine that the test resolution of the unit test is multi-level test resolution. This guarantees the function and robustness of the product. For another example, suppose the product corresponding to source code cl is a civil product, its product quality requirement is relatively lower than the quality requirement of an aerospace product. Hence in the step S l l ', the integration device 1 can determine that the test resolution of the unit test is the first test resolution, i.e., only executing basic tests or coarsest resolution tests.
  • the device i.e., integration device 1
  • the integration device 1 can determine that the test resolution of the unit test is the first test resolution, i.e., only executing basic tests at this point.
  • the device i.e., the integration device 1 performing the test has a lighter load, then in the step S l l ', the integration device 1 can determine that the test resolution of the unit test is multi-level test resolution.
  • said predetermined rule includes, for example, establishing a FIFO (First In First Out) queue corresponding to each test resolution on a shared device resource of each-level test (i.e., first-level test, second-level test, and third-level test), and all test requests of the same test resolution waiting in line according to the FIFO order in the queue.
  • T(i) (i denotes the level of the test resolution or scale of the test)
  • the running time period of all test sets waiting for test in the FIFO queue corresponding to the i-1 test resolution are: Tl(i-l), T2 (i-1), . . . , Tn(i-l) (n denotes the queue length). If T(i) is smaller than Tl(i-l) uT2(i-l)u. . .
  • test resolution can also be determined in conjunction with the user's selection of the test resolution.
  • priority can also act as the input parameter so as to preferentially execute the time-critical test according to the user's need.
  • the integration device 1 executes corresponding first-level target test cases for one or more target codes against the continuous integration request based on the test resolution of first-level test, wherein the first-level target test cases correspond to the test resolution of first-level test.
  • the manner of the integration device 1 executing the first-level test cases corresponding to the target codes is identical or substantially identical to the manner of the integration device 1 executing the first-level target test cases for the target codes in the step S I ' in Fig. 7. For the sake of simplicity, details are no longer described and only included here in a way of quotation.
  • the invention can be implemented in software and/or a combination of software and hardware, for example, the invention can be implemented by using an Application Specific Integrated Circuit (ASIC), a general purpose computer or any other similar hardware equipment.
  • ASIC Application Specific Integrated Circuit
  • the software program of this invention can be executed by a processor to accomplish the aforesaid steps or functions.
  • the software program (including the relevant data structure) of the invention can be stored in a computer readable recording medium, for example, RAM memory, magneto-optical drive or floppy disk and similar devices.
  • some steps or functions of the invention can be realized by using hardware, for example, a circuit that cooperates with the processor to perform various steps or functions.
  • part of the invention can be applied as a computer program product, such as a computer program instruction.
  • the instruction When the instruction is executed by the computer, the method and/or technical solution according to this invention may be called or provided through an operation of the computer.
  • the program instruction for calling the method of the invention may possibly be stored in a fixed or movable recording medium, and/or be transmitted via broadcasting or other signal carrier mediums, and/or be stored in the operation memory of a computer device that is running according to said program instruction.
  • Said device comprises a memory for storing computer program instructions and a processor for executing program instructions. This device is triggered to operate the methods and/or technical solutions based on the aforesaid embodiments of the invention when the computer program instructions are executed by said processor.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

L'invention a pour objet un procédé et un appareil qui permettent de réaliser une intégration continue. En particulier, selon une demande d'intégration continue, des jeux d'essai sur cibles de premier niveau correspondants sont exécutés pour des codes cibles relatifs à ladite demande, les jeux d'essai sur cibles de premier niveau correspondant à la résolution d'essai de l'essai de premier niveau en référence à la demande d'intégration continue. Des codes cibles fusionnent avec des premiers codes cibles ayant fusionné qui correspondent, après que les jeux d'essai sur cibles de premier niveau ont été exécutés avec succès. Conformément à la demande d'intégration continue, des jeux d'essai sur cibles de second niveau correspondants sont exécutés pour les premiers codes cibles ayant fusionné, les jeux d'essai sur cibles de second niveau correspondant à la résolution d'essai de l'essai de second niveau en référence à la demande d'intégration continue. Par rapport à l'état de la technique, grâce à une architecture de jeu d'essai basée sur plusieurs résolutions, à une sélection et une mise en œuvre de jeu d'essai automatiques, à une interface utilisateur souple et à une vérification et un contrôle de processus efficaces, l'invention aboutit à un processus de développement logiciel et d'intégration continue global hautement automatisé, qui rend l'intégration continue plus efficace et accroît la qualité du développement de produit.
PCT/IB2015/000148 2014-01-09 2015-01-08 Procédé et appareil permettant de réaliser une intégration continue WO2015104635A2 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410010763.4 2014-01-09
CN201410010763.4A CN104778032A (zh) 2014-01-09 2014-01-09 一种用于进行持续集成的方法和设备

Publications (2)

Publication Number Publication Date
WO2015104635A2 true WO2015104635A2 (fr) 2015-07-16
WO2015104635A3 WO2015104635A3 (fr) 2015-11-19

Family

ID=52829232

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/IB2015/000148 WO2015104635A2 (fr) 2014-01-09 2015-01-08 Procédé et appareil permettant de réaliser une intégration continue

Country Status (2)

Country Link
CN (1) CN104778032A (fr)
WO (1) WO2015104635A2 (fr)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10310969B2 (en) 2017-05-31 2019-06-04 Oracle International Corporation Systems and methods for test prediction in continuous integration environments
CN110554954A (zh) * 2019-07-19 2019-12-10 中国科学院软件研究所 一种结合静态依赖和动态执行规则的测试用例选择方法

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106407101B (zh) * 2015-07-31 2021-04-30 三亚中兴软件有限责任公司 基于lxc的持续集成方法及装置
CN105843651B (zh) * 2016-03-31 2019-10-11 广州华多网络科技有限公司 一种管理持续集成处理脚本的方法、装置和系统
CN105912461A (zh) * 2016-04-05 2016-08-31 浪潮电子信息产业股份有限公司 一种软件敏捷测试方法及系统
CN106502758A (zh) * 2016-10-26 2017-03-15 安徽扬远信息科技有限公司 一种基于Scrum敏捷软件开发持续集成的方法
CN108205492A (zh) * 2016-12-20 2018-06-26 阿尔卡特朗讯 用于持续集成框架中的测试驱动开发的方法和设备
CN106649127A (zh) * 2016-12-29 2017-05-10 广东浪潮大数据研究有限公司 一种适用于软件敏捷开发的自动化测试方法及模型
CN108399082B (zh) * 2017-02-08 2022-11-15 中兴通讯股份有限公司 一种持续集成流水线的生成方法和系统
CN108572912A (zh) * 2017-09-22 2018-09-25 北京金山云网络技术有限公司 一种持续集成方法、装置、电子设备及存储介质
CN109062818A (zh) * 2018-10-24 2018-12-21 郑州云海信息技术有限公司 一种持续集成系统测试方法和装置
CN109634678A (zh) * 2019-01-07 2019-04-16 烽火通信科技股份有限公司 一种灵活支持多种板卡的方法及系统

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8037453B1 (en) * 2006-09-13 2011-10-11 Urbancode, Inc. System and method for continuous software configuration, test and build management
CN101515232A (zh) * 2008-02-21 2009-08-26 卓望数码技术(深圳)有限公司 一种软件持续集成系统及方法
US20090265693A1 (en) * 2008-04-18 2009-10-22 International Business Machines Corporation Method and system for test run prioritization for software code testing in automated test execution
CN101571798B (zh) * 2008-04-29 2013-01-09 环达电脑(上海)有限公司 自动化测试脚本产生及使用方法
CN101957778B (zh) * 2010-09-19 2012-11-21 华为技术有限公司 软件持续集成的方法、装置和系统
CN104185840B (zh) * 2012-04-30 2018-01-16 慧与发展有限责任合伙企业 在持续部署流水线中用来优先化多个测试的方法、系统和装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
None

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10310969B2 (en) 2017-05-31 2019-06-04 Oracle International Corporation Systems and methods for test prediction in continuous integration environments
CN110554954A (zh) * 2019-07-19 2019-12-10 中国科学院软件研究所 一种结合静态依赖和动态执行规则的测试用例选择方法

Also Published As

Publication number Publication date
WO2015104635A3 (fr) 2015-11-19
CN104778032A (zh) 2015-07-15

Similar Documents

Publication Publication Date Title
WO2015104635A2 (fr) Procédé et appareil permettant de réaliser une intégration continue
US9715441B2 (en) Risk-based test coverage and prioritization
CN108346028B (zh) 一种业务审批处理方法、装置及系统
US10114732B2 (en) Debugging in-cloud distributed code in live load environment
US10592237B2 (en) Efficient detection of architecture related bugs during the porting process
AU2019202251A1 (en) Automated program code analysis and reporting
US8782640B2 (en) Virtual image overloading for solution deployment
US8683449B2 (en) Automated parallel software code impact analysis
US20120209947A1 (en) Integrating cloud applications and remote jobs
US10917456B2 (en) Application management in an application deployment pipeline
CN108776643B (zh) 一种基于版本控制流程的目标代码合并控制方法及系统
CN106557878B (zh) 开发项目管理方法及装置
US10452508B2 (en) Managing a set of tests based on other test failures
US20150186124A1 (en) Merging weighted recommendations for installation and configuration of software products
US20160179570A1 (en) Parallel Computing Without Requiring Antecedent Code Deployment
CN113014445A (zh) 用于服务器的运维方法、装置、平台及电子设备
CN111459504A (zh) 智能合约的处理方法、装置、设备和存储介质
US20160217017A1 (en) Determining workflow completion state
US20150193228A1 (en) Unified planning for application lifecycle management
US9733928B2 (en) Dynamic setup of development environments
JP6336919B2 (ja) ソースコードレビュー方法及びそのシステム
US11119763B2 (en) Cognitive selection of software developer for software engineering task
US11740995B2 (en) Source quality check service
JP2017129970A (ja) 管理装置,管理方法および管理プログラム
US10248534B2 (en) Template-based methodology for validating hardware features

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15716124

Country of ref document: EP

Kind code of ref document: A2

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15716124

Country of ref document: EP

Kind code of ref document: A2