A method and device for generating software integration test cases
By analyzing the interface relationship table of the software outline design description and the target source code, checking its consistency and generating test cases, the problem of incomplete interface tests in the existing technology is solved, and the integrity and correctness of software integration tests are ensured.
Patent Information
- Application Number
- CN202010911948.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-02
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2040-09-02
AI Technical Summary
The existing software integration testing methods rely on the software outline design instructions provided by developers. There are problems such as simple interface description, incomplete references or calls, resulting in missing and errors in the test case design, and the integrity and correctness of software interface testing cannot be ensured. sex.
By obtaining the software outline design description and target source code, parsing and comparing the interface relationship table between the two, verifying their consistency and integrity, and if there are no defects, generate test cases for software integration testing to ensure interface testing completeness and correctness.
It avoids incomplete and errors in interface testing caused by defective software outline design instructions, ensures that the generated test cases can fully cover the interface relationship between modules, and improves the accuracy and completeness of software interface testing.
Smart Images

Figure CN112015658B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of signal system product software testing, and in particular to a method and device for generating software integration test cases. Background Art
[0002] Software integration testing, also known as assembly testing or joint testing, is based on unit testing. All modules are assembled into subsystems or systems according to design requirements for integration testing. Practice shows that although some modules can work individually, they cannot be guaranteed to work properly when connected. Some problems that cannot be reflected locally are likely to be exposed globally.
[0003] At present, the main purpose of software integration testing is to verify the correctness and integrity of the software module interface. The traditional test case design method mainly screens out the interfaces between modules based on the software outline design description, and then analyzes and formulates a reasonable module hierarchy layer by layer based on the hierarchical calling relationship between modules, and designs test cases according to the classic software integration test case design method (such as: top-down, bottom-up and big bang).
[0004] However, the software outline design specifications provided by developers often have simple interface descriptions and incomplete references or calls between interfaces. If the test cases are designed completely according to such software outline design specifications, there will be omissions in the interface test design, and the existing test cases obtained will also miss / incorrectly test the interface relationship of the modules. Summary of the invention
[0005] In view of this, the present invention provides a method and device for generating software integration test cases, the main purpose of which is to pre-check the correctness of the software outline design description, and then automatically generate test cases using the interface relationships contained therein, thereby ensuring the integrity and correctness of the software interface test.
[0006] In order to solve the above problems, the present invention mainly provides the following technical solutions:
[0007] In a first aspect, the present invention provides a method for generating a software integration test case, the method comprising:
[0008] Obtain the software outline design description and its corresponding target source code;
[0009] Respectively parsing the software outline design description and the target source code to obtain a first interface relationship table corresponding to the software outline design description and a second interface relationship table corresponding to the target source code;
[0010] Using the second interface relationship table, determining whether the first interface relationship table has a defect;
[0011] If not, the first interface relationship table is used to generate a test case for software integration.
[0012] Optionally, the using the second interface relationship table to determine whether the first interface relationship table has a defect includes:
[0013] Determining whether the first interface relationship table is consistent with the second interface relationship table;
[0014] If not, determining whether the interfaces between the modules and the associations between the interfaces recorded in the first interface relationship table are included in the second interface relationship table;
[0015] If not, it is determined that the first interface relationship table has defects.
[0016] Optionally, the using the first interface relationship table to generate a test case for software integration includes:
[0017] Pre-set test case generation strategies, each generation strategy corresponds to a packaged script file;
[0018] When receiving a target generation strategy specified by a user trigger, the script file corresponding to the target generation strategy is called, the first interface relationship table is imported, and the corresponding test case is generated according to the target generation strategy.
[0019] Optionally, if it is determined that the first interface relationship table has a defect, the method further includes:
[0020] marking the defects and displaying their characteristics;
[0021] Output a verification report based on the defects and the characteristics and submit it for defect management.
[0022] In a second aspect, the present invention further provides a device for generating software integration test cases, the device comprising:
[0023] An acquisition unit, used for acquiring a software outline design description and its corresponding target source code;
[0024] A parsing unit, used to parse the software outline design description obtained by the obtaining unit and the target source code obtained by the obtaining unit, respectively, to obtain a first interface relationship table corresponding to the software outline design description and a second interface relationship table corresponding to the target source code;
[0025] a judging unit, configured to judge whether the first interface relationship table obtained by the parsing unit has defects by using the second interface relationship table obtained by the parsing unit;
[0026] A generating unit is used to generate a software integration test case using the first interface relationship table when the judging unit judges that there is no defect in the first interface relationship table.
[0027] Optionally, the judging unit includes:
[0028] A first judging module, used for judging whether the first interface relationship table is consistent with the second interface relationship table;
[0029] a second judgment module, configured to judge whether the interfaces between the modules and the associations between the interfaces recorded in the first interface relationship table are included in the second interface relationship table when the first judgment module judges that the first interface relationship table is not consistent with the second interface relationship table;
[0030] The determination module is used to determine that the first interface relationship table has defects when it is determined that the interfaces between the modules and the associations between the interfaces recorded in the first interface relationship table are not included in the second interface relationship table.
[0031] Optionally, the generating unit includes:
[0032] The setting module is used to pre-set the test case generation strategy, and each generation strategy corresponds to a packaged script file;
[0033] The execution module is used to call the script file corresponding to the target generation strategy when receiving the target generation strategy triggered by the user, import the first interface relationship table and generate the corresponding test case according to the target generation strategy.
[0034] Optionally, the device further comprises:
[0035] a marking unit, configured to mark the defect and display the characteristics if it is determined that the first interface relationship table has a defect;
[0036] The output unit is used to display and output the verification report according to the defect and the feature, and submit it for defect management.
[0037] In a third aspect, the present invention further provides an electronic device, comprising: a memory, a processor, and a program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for generating software integration test cases as described above is implemented.
[0038] In a fourth aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, which implements the method for generating software integration test cases as described above when the program is executed.
[0039] By means of the above technical solution, the technical solution provided by the present invention has at least the following advantages:
[0040] The present invention provides a method and device for generating software integration test cases. The present invention parses the software outline design description and its corresponding target source code respectively, and obtains the first interface relationship table corresponding to the software outline design description and the second interface relationship table corresponding to the target source code respectively, thereby using the second interface relationship table to check the first interface relationship table. If no defects are found in the check, the first interface relationship table is used to generate test cases for software integration testing. Compared with the prior art, the technical problem of incomplete and incorrect interface testing caused by constructing interface test cases using defective software outline design descriptions is solved. The present invention pre-checks the software outline design description and then generates the required test cases, which can avoid deficiencies in the interface test design and ensure the integrity and correctness of the generated test cases for the interface test.
[0041] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0043] Figure 1 A flow chart of a method for generating software integration test cases provided by an embodiment of the present invention;
[0044] Figure 2 Another flow chart of a method for generating software integration test cases provided by an embodiment of the present invention;
[0045] Figure 3 A block diagram of a device for generating software integration test cases provided by an embodiment of the present invention;
[0046] Figure 4 A block diagram of another device for generating software integration test cases provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0047] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.
[0048] The embodiment of the present invention provides a method for generating software integration test cases, such as Figure 1 As shown, the method is to check the interface relationship table included in the software outline design description in advance. If there are no defects, the interface relationship table is relied upon to generate test cases for software integration testing to ensure the integrity and correctness of the interface test. For this, the embodiment of the present invention provides the following specific steps:
[0049] 101. Obtain the software outline design description and its corresponding target source code.
[0050] The software outline design description refers to the outline design description of the target source code provided by the developer, and the outline design description records the interfaces between modules.
[0051] In the embodiment of the present invention, the software outline design description is equivalent to a document explanation of the interface relationship between modules included in the target source code, and there is a one-to-one correspondence between the software outline design description and the target source code.
[0052] 102. Analyze the software outline design description and the target source code respectively to obtain a first interface relationship table corresponding to the software outline design description and a second interface relationship table corresponding to the target source code.
[0053] In an embodiment of the present invention, an analysis tool is used to sort out the interfaces between modules contained in the software outline design description, and then a first interface relationship table is obtained, which at least includes the interface names between modules and the associations between different interfaces, and then the hierarchical calling relationship between modules is obtained using the associations between the interfaces.
[0054] Furthermore, the target source code may be parsed using a code analysis tool to obtain the interface names between modules and the hierarchical calling relationships between modules contained in the target source code, and store them to obtain a second interface relationship table.
[0055] 103. Use the second interface relationship table to determine whether the first interface relationship table has defects.
[0056] In the embodiment of the present invention, since the software outline design description is equivalent to a document explanation of the interface relationship between the modules included in the target source code, there is a one-to-one correspondence between the software outline design description and the target source code, so the interface recorded in the software outline design description should exist in the target source code. Therefore, the present invention can use the second interface relationship table corresponding to the target source code to check the first interface relationship table, mainly to compare whether the interface name and interface relationship are consistent or exist in the second interface relationship table, and further determine whether there are defects such as incorrect interface reference or call, missing / wrong interface name, etc. in the first interface relationship table.
[0057] 104. If it is determined that there is no defect in the first interface relationship table, use the first interface relationship table to generate a test case for software integration.
[0058] In an embodiment of the present invention, after pre-judging that there are no defects in the first interface relationship table, that is, pre-verifying that the software outline design description is complete and correct, the content contained in the first interface relationship table corresponding to the software outline design description is used to generate test cases for software integration testing, thereby also ensuring the integrity and correctness of the interface test.
[0059] The embodiment of the present invention provides a method for generating software integration test cases. The embodiment of the present invention is to parse the software outline design description and its corresponding target source code respectively, and obtain the first interface relationship table corresponding to the software outline design description and the second interface relationship table corresponding to the target source code respectively, so as to use the second interface relationship table to check the first interface relationship table. If no defects are found in the check, the first interface relationship table is used to generate test cases for software integration testing. Compared with the prior art, the technical problem of incomplete and incorrect interface testing caused by constructing interface test cases using defective software outline design descriptions is solved. The embodiment of the present invention pre-checks the software outline design description and then generates the required test cases, which can avoid deficiencies in the interface test design and ensure the integrity and correctness of the generated test cases for the interface test.
[0060] In order to explain the above embodiment in more detail, the embodiment of the present invention also provides another method for generating software integration test cases, such as Figure 2 As shown, this method refines and supplements the above embodiment, and this embodiment of the present invention provides the following specific steps:
[0061] 201. Obtain a software outline design description and its corresponding target source code.
[0062] In the embodiment of the present invention, the software outline design description is equivalent to a document explanation of the interface relationship between modules included in the target source code, and there is a one-to-one correspondence between the software outline design description and the target source code.
[0063] It should be noted that in order to avoid redundant operations of interface testing and meet different specific testing requirements of users, specific modules in the software outline design description can be labeled in advance, so that the first interface relationship table corresponding to the software outline design description contains the interfaces between the labeled modules, and then subsequently only the interfaces and interface relationships between the labeled modules are checked.
[0064] 202. Analyze the software summary design description and the target source code respectively to obtain a first interface relationship table corresponding to the software summary design description and a second interface relationship table corresponding to the target source code.
[0065] In the embodiment of the present invention, it should be noted that the second interface relationship table corresponding to the target source code records all modules included in the target source code, interfaces between modules, and associations between interfaces. There are two situations in the software outline design description, specifically: one situation is that the first interface relationship table records all modules included in the software outline design description, interfaces between modules, and associations between interfaces; the other situation is that in order to avoid redundant operations of interface testing, specific modules in the software outline design description are labeled in advance, so that the first interface relationship table only contains the labeled modules, interfaces between them, and associations between interfaces.
[0066] 203. Use the second interface relationship table to determine whether the first interface relationship table has defects.
[0067] In the embodiment of the present invention, mainly for the two situations existing in the software outline design description mentioned in step 202, to realize checking whether the first interface relationship table has defects, the specific statement is as follows:
[0068] In one case, if the first interface relationship table records all modules, interfaces between modules, and associations between interfaces included in the software outline design description, then it is determined whether the first interface relationship table is consistent with the second interface relationship table. If they are consistent, the software outline design description is checked to see if there are defects such as incorrect interface references or calls, missing / wrong interface names, etc. Otherwise, it is determined that the first interface relationship table is defective.
[0069] Another situation is that in order to avoid redundant operations of interface testing, specific modules in the software outline design description are labeled in advance, so that the first interface relationship table only contains the labeled modules, interfaces between them, and associations between interfaces. Then it is determined whether the interfaces between modules and the associations between interfaces recorded in the first interface relationship table are included in the second interface relationship table. If so, the software outline design description is checked to see if there are defects such as incorrect interface references or calls, missing / wrong interface names, etc. Otherwise, it is determined that the first interface relationship table is defective.
[0070] 204a. If it is determined that there is no defect in the first interface relationship table, a test case generation strategy is pre-set, and each generation strategy corresponds to a packaged script file.
[0071] For the embodiments of the present invention, in order to meet the diverse needs of testing, the mapping relationship between the test case generation strategy and each trigger control can be pre-set. The pre-set test case generation strategy can be a bottom-up, top-down or big bang test strategy. The trigger control is an encapsulated script file, which is used to automatically call the corresponding script file to perform automated operations when the user triggers the control.
[0072] 205a. When receiving a target generation strategy specified by a user trigger, calling a script file corresponding to the target generation strategy, importing the first interface relationship table and generating a corresponding test case according to the target generation strategy.
[0073] For an embodiment of the present invention, when it is detected that a user triggers a test case generation strategy, it can specifically be triggered by touching an icon, button, etc. (i.e., corresponding to a test generation strategy), and then calling the script file corresponding to the target generation strategy, importing the first interface relationship table into a generator, and according to the triggered test generation strategy, realizing automatic generation of test cases for software integration testing.
[0074] 204b. If it is determined that the first interface relationship table has defects, mark the defects and perform feature display, output a verification report based on the defects and feature display, and submit it to defect management.
[0075] In addition, for the embodiment of the present invention, if it is determined that there are defects in the first interface relationship table, that is, there are defects in the outline design description of the verification software, these defects are marked and characteristics are displayed. The specific characteristic display method can be highlighting, bold marking, pop-up box selection, etc., so that the verification report can be output according to the defects and characteristic display, and defect management can be automatically submitted. The verification report can clearly display the defects and related information, thereby facilitating the verification personnel to solve the defect problems.
[0076] Furthermore, as a response to the above Figure 1 , Figure 2 The embodiment of the present invention provides a device for generating software integration test cases. The device embodiment corresponds to the aforementioned method embodiment. For ease of reading, the device embodiment will not repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in this embodiment can correspond to all the contents of the aforementioned method embodiment. The device is used to generate test cases for interface testing, specifically as follows Figure 3 As shown, the device comprises:
[0077] An acquisition unit 31 is used to acquire a software outline design description and its corresponding target source code;
[0078] The parsing unit 32 is used to parse the software outline design description obtained by the obtaining unit 31 and the target source code obtained by the obtaining unit 31, respectively, to obtain a first interface relationship table corresponding to the software outline design description and a second interface relationship table corresponding to the target source code;
[0079] A judging unit 33, configured to use the second interface relationship table obtained by the parsing unit 32 to judge whether the first interface relationship table obtained by the parsing unit 32 has defects;
[0080] The generating unit 34 is configured to generate a test case for software integration by using the first interface relationship table when the judging unit 33 judges that there is no defect in the first interface relationship table.
[0081] Further, such as Figure 4 As shown, the judging unit 33 includes:
[0082] A first judging module 331, configured to judge whether the first interface relationship table is consistent with the second interface relationship table;
[0083] A second judgment module 332 is used to judge whether the interfaces between modules and the associations between interfaces recorded in the first interface relationship table are included in the second interface relationship table when the first judgment module 331 judges that the first interface relationship table is not consistent with the second interface relationship table;
[0084] The determination module 333 is used to determine that there is a defect in the first interface relationship table when it is determined that the interfaces between the modules and the associations between the interfaces recorded in the first interface relationship table are not included in the second interface relationship table.
[0085] Further, such as Figure 4 As shown, the generating unit 34 includes:
[0086] A setting module 341 is used to pre-set a test case generation strategy, each generation strategy corresponds to a packaged script file;
[0087] The execution module 342 is used to call the script file corresponding to the target generation strategy, import the first interface relationship table and generate the corresponding test case according to the target generation strategy when receiving the target generation strategy triggered by the user.
[0088] Further, such as Figure 4 As shown, the device also includes:
[0089] A marking unit 35, configured to mark the defect and display the characteristics if it is determined that the first interface relationship table has a defect;
[0090] The output unit 36 is used to display and output a verification report based on the defects and the characteristics, and submit it for defect management.
[0091] In summary, an embodiment of the present invention provides a method and device for generating software integration test cases. The embodiment of the present invention parses the software outline design description and its corresponding target source code respectively, and obtains the first interface relationship table corresponding to the software outline design description and the second interface relationship table corresponding to the target source code respectively, thereby using the second interface relationship table to verify the first interface relationship table. If no defects are found during the verification, the first interface relationship table is used to generate test cases for software integration testing. Compared with the prior art, the technical problem of incomplete and incorrect interface testing caused by constructing interface test cases using defective software outline design descriptions is solved. The embodiment of the present invention pre-verifies the software outline design description and then generates the required test cases, which can avoid deficiencies in the interface test design and ensure the integrity and correctness of the generated test cases for the interface test.
[0092] The device for generating software integration test cases includes a processor and a memory. The above-mentioned acquisition unit, parsing unit, judgment unit and generation unit are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0093] The processor contains a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set to pre-check the correctness of the software outline design description by adjusting the kernel parameters, and then automatically generate test cases using the interface relationships contained in it, thereby ensuring the integrity and correctness of the software interface test.
[0094] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0095] An embodiment of the present invention provides an electronic device, comprising: a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the method for generating software integration test cases is implemented.
[0096] An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed, the method for generating a software integration test case is implemented.
[0097] The devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0098] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing program code that initializes the following method steps: obtaining a software outline design description and its corresponding target source code; parsing the software outline design description and the target source code respectively to obtain a first interface relationship table corresponding to the software outline design description and a second interface relationship table corresponding to the target source code; using the second interface relationship table, determining whether the first interface relationship table has defects; if not, using the first interface relationship table to generate a test case for software integration.
[0099] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0100] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0101] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0102] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0103] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0104] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0105] Computer readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (traHsitory media), such as modulated data signals and carrier waves.
[0106] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0107] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0108] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for generating software integration test cases, characterized in that: The method comprises: Obtain the software outline design description and its corresponding target source code; The software outline design description and the target source code are parsed respectively to obtain a first interface relationship table corresponding to the software outline design description and a second interface relationship table corresponding to the target source code, wherein the software outline design description is a document explanation of the interface relationship between modules included in the target source code; The first interface relationship table at least includes: using an analysis tool to sort out the interface names between modules in the software outline design description, the associations between different interfaces, and obtaining the hierarchical calling relationships between modules using the associations between interfaces; the second interface relationship table at least includes: using a code analysis tool to parse the interface names between modules and the hierarchical calling relationships between modules contained in the target source code; Using the second interface relationship table, determining whether the first interface relationship table has defects, including: determining whether the interfaces between the modules and the associations between the interfaces recorded in the first interface relationship table are included in the second interface relationship table; wherein the modules recorded in the first interface relationship table are pre-tagged for specific modules in the software outline design description, so that the first interface relationship table includes the tagged modules, the interfaces between the tagged modules, and the associations between the interfaces; If it is included in the second interface relationship table, it is determined that the first interface relationship table has no defects; if it is not included in the second interface relationship table, it is determined that the first interface relationship table has defects; When it is determined that there are no defects in the first interface relationship table, a test case for software integration is generated using the first interface relationship table.
2. The method according to claim 1, characterized in that The step of using the first interface relationship table to generate a test case for software integration includes: Pre-set test case generation strategies, each generation strategy corresponds to a packaged script file; When receiving a target generation strategy specified by a user trigger, the script file corresponding to the target generation strategy is called, the first interface relationship table is imported, and the corresponding test case is generated according to the target generation strategy.
3. The method according to claim 1, characterized in that If it is determined that the first interface relationship table has a defect, the method further includes: marking the defects and displaying their characteristics; Output a verification report based on the defects and the characteristics and submit it for defect management.
4. A device for generating software integration test cases, characterized in that: The device comprises: An acquisition unit, used for acquiring a software outline design description and its corresponding target source code; a parsing unit, configured to parse the software outline design description obtained by the obtaining unit and the target source code obtained by the obtaining unit, respectively, to obtain a first interface relationship table corresponding to the software outline design description and a second interface relationship table corresponding to the target source code, wherein the software outline design description is a document explanation of the interface relationship between modules included in the target source code; The first interface relationship table at least includes: using an analysis tool to sort out the interface names between modules in the software outline design description, the associations between different interfaces, and obtaining the hierarchical calling relationships between modules using the associations between interfaces; the second interface relationship table at least includes: using a code analysis tool to parse the interface names between modules and the hierarchical calling relationships between modules contained in the target source code; a judging unit, configured to judge whether the first interface relationship table obtained by the parsing unit has defects by using the second interface relationship table obtained by the parsing unit; The judging unit comprises: A second judgment module is used to judge whether the interfaces between the modules and the associations between the interfaces recorded in the first interface relationship table are included in the second interface relationship table when the first judgment module judges that the first interface relationship table is not consistent with the second interface relationship table; wherein the modules recorded in the first interface relationship table are pre-labeled for specific modules in the software outline design description, so that the first interface relationship table contains the labeled modules, the interfaces exist between the labeled modules, and the associations exist between the interfaces; a determination module, configured to determine that the first interface relationship table has no defects when it is determined that the interfaces between the modules and the associations between the interfaces recorded in the first interface relationship table are included in the second interface relationship table; and determine that the first interface relationship table has defects when it is determined that the interfaces between the modules and the associations between the interfaces recorded in the first interface relationship table are not included in the second interface relationship table; A generating unit is used to generate a software integration test case using the first interface relationship table when the judging unit judges that there is no defect in the first interface relationship table.
5. The device according to claim 4, characterized in that The generating unit comprises: The setting module is used to pre-set the test case generation strategy, and each generation strategy corresponds to a packaged script file; The execution module is used to call the script file corresponding to the target generation strategy when receiving the target generation strategy triggered by the user, import the first interface relationship table and generate the corresponding test case according to the target generation strategy.
6. The device according to claim 4, characterized in that The device also includes: a marking unit, configured to mark the defect and display the characteristics if it is determined that the first interface relationship table has a defect; The output unit is used to display and output the verification report according to the defect and the feature, and submit it for defect management.
7. An electronic device, characterized in that: include: A memory, a processor, and a program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for generating software integration test cases as described in any one of claims 1 to 3 is implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is run, the method for generating software integration test cases as described in any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
System and method for model based technology and process for safety-critical software development
CN106528100A
Method for analyzing consistency of source codes and target codes in airborne software
CN107391368A
Method, system and equipment for managing test cases and storage medium
CN110309051A
Interface document verification method and device
CN111274120A
System for detecting source code security flaws through analysis of code history
US10084819B1
