Integration testing methods, devices, storage media and electronic equipment
By generating upstream mock data and execution snapshots, the problem of low efficiency in joint debugging testing was solved, enabling parallel execution of modules and regular testing, thereby improving the efficiency and progress of joint debugging testing in the e-commerce industry.
Patent Information
- Application Number
- CN202210031915.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-12
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2042-01-12
AI Technical Summary
The existing joint testing is inefficient, cannot enable modules to enter testing periodically, and suffers from long waiting times and high costs.
By querying the upstream production data that the module under test depends on, if it exists, the test cases of the module are executed using the upstream production data; otherwise, upstream mock data is generated for simulation, an execution snapshot is generated, and joint debugging tests are performed using the mock snapshot and the execution snapshot. This supports parallel execution of modules and periodic testing.
It improves the efficiency of joint debugging and testing, enables parallel execution and regular testing of modules, reduces costs, and meets the high-efficiency joint debugging needs of the e-commerce industry.
Smart Images

Figure CN116467156B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a method, apparatus, storage medium and electronic device for joint testing. Background Technology
[0002] Integration testing, also known as assembly testing, joint testing, subsystem testing, or component testing, focuses on the correctness of interfaces between modules, whether the data flow and control flow between modules achieve their functions as designed, and the correctness of the overall function after integration.
[0003] In related technologies, integration testing is mostly conducted manually according to the integration process, requiring all application modules to be connected for testing. This results in low efficiency and makes it impossible to periodically test modules. Furthermore, even when using real data for integration testing, downstream application modules must wait for upstream modules to transmit data normally before they can perform integration testing, leading to long waiting times. Additionally, when problems occur, multiple modules need to work together to execute integration test cases for regression testing, resulting in high costs and uncontrollable progress.
[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] The purpose of this disclosure is to provide a method, apparatus, storage medium, and electronic device for joint debugging and testing, so as to solve the problems of low efficiency in joint debugging and testing of related technologies and the inability to periodically enter the testing of modules.
[0006] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part from practice of this disclosure.
[0007] According to one aspect of this disclosure, a method for joint debugging testing is provided, comprising: querying whether there is upstream production data that the module under test depends on; if so, executing the process test cases of the module under test using the upstream production data to generate an execution snapshot of the module under test; if not, generating upstream mock data according to the upstream interface definition, executing the process test cases of the module under test using the upstream mock data to generate an execution snapshot of the module under test; obtaining the mock snapshot of the module under test, and performing joint debugging testing on the module under test based on the mock snapshot and the execution snapshot of the module under test.
[0008] In one embodiment of this disclosure, obtaining a mock snapshot of the module under test and performing joint debugging tests on the module under test based on the mock snapshot and the execution snapshot of the module under test includes: determining whether a mock snapshot of the module under test exists; if no mock snapshot of the module under test exists, determining that the joint debugging test of the module under test has passed; if a mock snapshot of the module under test exists, determining whether the mock snapshot and the execution snapshot of the module under test are consistent; if yes, determining that the joint debugging test of the module under test has passed; if no, if the joint debugging test of the previous module of the module under test has passed, re-executing the process test cases of the module under test.
[0009] In one embodiment of this disclosure, the method further includes: if the mock snapshot of the module under test and the execution snapshot of the module under test are inconsistent, and the joint debugging test of the previous module fails, then the joint debugging test of the module under test is suspended until the joint debugging test of the previous module passes.
[0010] In one embodiment of this disclosure, after re-executing the test cases of the module under test, the method further includes: obtaining the execution result and verifying the execution result; if the verification is successful, the joint debugging test of the module under test is determined to be successful; if the verification fails, the project test cases are re-executed.
[0011] In one embodiment of this disclosure, the method further includes: when the next stage module of the tested stage module is connected for joint debugging and testing, if there is no upstream production data that the next stage module depends on, then upstream mock data corresponding to the next stage module is generated, and then a mock snapshot of the tested stage module is generated.
[0012] In one embodiment of this disclosure, after generating upstream mock data according to the upstream interface definition and executing the process test cases of the module under test using the upstream mock data, the method further includes: generating a correspondence between the upstream mock data and the process test cases of the module under test.
[0013] In one embodiment of this disclosure, before executing the process test cases of the tested process module using the upstream production data, the method further includes: determining whether the correspondence exists; if yes, then if the upstream mock data and the upstream production data are inconsistent, executing the process test cases of the tested process module using the upstream production data; if no, then executing the process test cases of the tested process module using the upstream production data.
[0014] In one embodiment of this disclosure, the method further includes: creating a joint debugging project and obtaining multiple test module components included in the joint debugging project; creating project use cases corresponding to the joint debugging project, and then obtaining the multiple test module component use cases.
[0015] In one embodiment of this disclosure, the method further includes: generating execution snapshots of multiple modules under test; and performing joint debugging tests on multiple modules under test based on the execution snapshots and mock snapshots of multiple modules under test, so as to realize the joint debugging test of the joint debugging scenario.
[0016] In one embodiment of this disclosure, the method is implemented based on a domain model.
[0017] According to another aspect of this disclosure, a joint debugging and testing apparatus is provided, comprising: a query module for querying whether there is upstream production data that the module under test depends on; a generation module for, if yes, executing the process test cases of the module under test using the upstream production data to generate an execution snapshot of the module under test, and if no, generating upstream mock data according to the upstream interface definition, executing the process test cases of the module under test using the upstream mock data to generate an execution snapshot of the module under test; and a joint debugging and testing module for obtaining the mock snapshot of the module under test, and performing joint debugging and testing on the module under test based on the mock snapshot and the execution snapshot of the module under test.
[0018] In one embodiment of this disclosure, the integration testing module is further configured to: determine whether a mock snapshot of the module under test exists; if no mock snapshot of the module under test exists, determine that the integration testing of the module under test has passed; if a mock snapshot of the module under test exists, determine whether the mock snapshot of the module under test and the execution snapshot of the module under test are consistent; if yes, determine that the integration testing of the module under test has passed; if no, if the integration testing of the previous module of the module under test has passed, re-execute the process test cases of the module under test.
[0019] In one embodiment of this disclosure, the joint debugging test module is further configured to: if the mock snapshot of the module under test and the execution snapshot of the module under test are inconsistent, and the joint debugging test of the previous module fails, then suspend the joint debugging test of the module under test until the joint debugging test of the previous module passes.
[0020] In one embodiment of this disclosure, the joint debugging and testing module is further configured to: obtain execution results and verify the execution results; if the verification is successful, the joint debugging and testing of the module under test is determined to be successful; if the verification fails, the project test cases are re-executed.
[0021] In one embodiment of this disclosure, the generation module is further configured to: when the next stage module of the tested stage module is connected for joint debugging and testing, if there is no upstream production data that the next stage module depends on, generate upstream mock data corresponding to the next stage module, and then generate a mock snapshot of the tested stage module.
[0022] In one embodiment of this disclosure, the generation module is further configured to: generate a correspondence between the upstream mock data and the test cases of the module under test.
[0023] In one embodiment of this disclosure, the generation module is further configured to: determine whether the correspondence exists; if yes, then, if the upstream mock data and the upstream production data are inconsistent, execute the process test case of the tested process module using the upstream production data; if no, execute the process test case of the tested process module using the upstream production data.
[0024] In one embodiment of this disclosure, the apparatus further includes a creation module, configured to: create a joint debugging project, obtain a plurality of the tested component modules included in the joint debugging project; create project use cases corresponding to the joint debugging project, and then obtain the component use cases of the plurality of the tested component modules.
[0025] In one embodiment of this disclosure, the generation module is further configured to: generate execution snapshots of multiple modules under test; and perform joint debugging tests on multiple modules under test based on the execution snapshots and mock snapshots of the multiple modules under test, so as to realize the joint debugging test of the joint debugging scenario. According to another aspect of this disclosure, a computer-readable storage medium is provided, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the above-described joint debugging test method.
[0026] According to another aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the above-described joint debugging test method by executing the executable instructions.
[0027] The integration testing method provided in this disclosure can perform integration testing by executing test cases using upstream production data that the module under test depends on, if such upstream production data exists. If upstream production data does not exist, upstream mock data is generated according to the upstream interface definition, and then test cases are executed using the upstream mock data. Integration testing can also be performed using the module's execution snapshot and mock snapshot. Integration testing can start from any module without having to test all application modules together, thus achieving parallel execution of modules, improving integration testing efficiency, and enabling modules to enter testing periodically without requiring all modules to cooperate in regression testing, reducing costs and accelerating the progress of integration testing.
[0028] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0029] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0030] Figure 1 This is a flowchart illustrating a joint testing method according to an exemplary embodiment;
[0031] Figure 2 This is a flowchart illustrating the joint debugging test of the module under test according to an exemplary embodiment;
[0032] Figure 3 This is a flowchart illustrating the joint debugging test of the module under test according to yet another exemplary embodiment;
[0033] Figure 4 This is a flowchart illustrating an execution phase use case according to an exemplary embodiment;
[0034] Figure 5 This is a block diagram of a domain model-based joint debugging and testing apparatus according to an exemplary embodiment;
[0035] Figure 6 This is a flowchart illustrating a domain model-based integration testing method according to an exemplary embodiment;
[0036] Figure 7 This is a block diagram of a joint debugging and testing apparatus according to an exemplary embodiment;
[0037] Figure 8This is a structural block diagram of a joint debugging and testing device according to an exemplary embodiment. Detailed Implementation
[0038] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, they are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted.
[0039] The features, structures, or characteristics described in this disclosure can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more specific details omitted, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this disclosure.
[0040] The flowchart shown in the accompanying drawings is merely illustrative and does not necessarily include all content and steps, nor does it require execution in the described order. For example, some steps may be broken down, while others may be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0041] In this specification, the terms “a,” “an,” “the,” “the,” and “at least one” are used to indicate the presence of at least one element / component / etc.; the terms “comprising,” “including,” and “having” are used to indicate an open-ended inclusion and to mean that there may be other elements / components / etc. in addition to the listed elements / components / etc.; the terms “first,” “second,” and “third,” etc., are used only as markings and are not a limitation on the number of objects.
[0042] The methods provided in this disclosure can be executed by any type of electronic device, such as a server or terminal device, or by interaction between a server and a terminal device. Terminal devices and servers can be directly or indirectly connected via wired or wireless communication, and this application does not impose any limitations on this.
[0043] The server can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0044] Terminal devices can be smartphones, tablets, laptops, desktop computers, smart speakers, smartwatches, etc., but are not limited to these.
[0045] Figure 1 This is a flowchart illustrating a joint testing method according to an exemplary embodiment. Figure 1 As shown, the joint debugging and testing method may include the following steps.
[0046] In step S110, it is checked whether there is upstream production data that the tested module depends on.
[0047] The module under test is the application module that needs to be tested. The upstream production data that the module under test depends on is the real data generated by the module preceding the module under test, that is, the data generated by the module preceding the module under test in the production environment.
[0048] In this embodiment of the disclosure, during joint debugging testing, a joint debugging project can be created, and multiple tested component modules included in the project can be obtained. Obtaining these modules may include acquiring the name of each module, its application function, and the upstream and downstream relationships between them. For example, a joint debugging project A may include five tested component modules, A1 to A5, with the upstream and downstream relationships defined as A1 to A5, meaning the data flow direction is from A1 to A5. Furthermore, project test cases corresponding to the joint debugging project can be created, and component test cases for each tested component module can be obtained from these test cases. These project test cases are the test cases used when testing the joint debugging project; they contain component test cases for each tested component module, thus allowing the acquisition of component test cases for each module.
[0049] Therefore, when performing integration testing on a module under test, the upstream and downstream modules of the module under test can be identified, as well as the test cases for that module. During the integration testing process, the system first checks if any upstream production data the module under test depends on exists; that is, it retrieves all upstream production data that the module under test depends on.
[0050] In step S120, if so, the process test cases of the module under test are executed using upstream production data to generate an execution snapshot of the module under test.
[0051] In step S130, if not, upstream mock data is generated according to the upstream interface definition, and the test cases of the module under test are executed using the upstream mock data to generate an execution snapshot of the module under test.
[0052] If upstream production data exists that the module under test depends on, the test cases for the module under test can be executed using the upstream production data to generate an execution snapshot of the module under test. If upstream production data does not exist that the module under test depends on, upstream mock data can be generated according to the upstream interface definition, and then the test cases for the module under test can be executed using the upstream mock data to generate an execution snapshot of the module under test. A snapshot is defined as: a fully usable copy of a specified data set, which includes an image of the corresponding data at a certain point in time (the time the copy begins). A snapshot can be a copy of the data it represents, or a replica of the data. An execution snapshot can be viewed as a copy obtained by copying the execution result.
[0053] In the absence of upstream production data that the module under test depends on, a JAR file can be automatically imported into the module under test using the unique identifier of the integration testing project. Based on the input parameters required by the module under test, the missing interface result data from the upstream is mocked, i.e., upstream mock data is generated according to the upstream interface definition, enabling the test cases of the module under test to execute normally. "Mock" can be understood as simulation; specifically, during testing, a mock object is created to simulate the behavior of objects that are difficult to construct / obtain. Mock data can be understood as generated simulated data.
[0054] In addition, the execution snapshots generated in steps S120 and S130 are execution snapshots obtained when the process test cases of the module under test have been completed and passed. If the process test cases fail to execute, the problems in the module under test are fixed and the test is repeated, and finally the execution snapshot of the module under test is obtained, that is, the execution snapshot is the execution result of the process test cases passing.
[0055] For example, integration testing project A includes five modules under test, A1 to A5, with data flowing from A1 to A5. When performing integration testing on A2, it checks if upstream production data that A2 depends on exists. If it does, the test cases for A2 are executed using that upstream production data to obtain an execution snapshot of A2. If it does not exist, upstream mock data is generated according to the upstream interface definition of A2, and then the test cases for A2 are executed using that upstream mock data to obtain an execution snapshot of A2.
[0056] In step S140, a mock snapshot of the module under test is obtained, and the module under test is subjected to joint debugging test based on the mock snapshot and the execution snapshot of the module under test.
[0057] Considering that the focus of integration testing is on the correctness of normal and abnormal data between application module interfaces, whether the control flow between modules implements its data flow transfer function as designed, and the correctness of the overall system function after integration, in addition to testing the module under test using process test cases in steps S120 and S130, integration testing can also be performed on the module under test based on the mock snapshot and execution snapshot of the module under test, that is, to test whether the integration testing of the module under test passes.
[0058] The mock snapshot of the module under test can be a copy obtained by copying the mock data of the module under test, where the mock data of the module under test is the output parameter data of the mocked module under test. In an exemplary embodiment, the integration testing method may further include: when the next stage module of the module under test is connected to the integration testing, if there is no upstream production data that the next stage module depends on, then upstream mock data corresponding to the next stage module is generated, and then a mock snapshot of the module under test is generated. Continuing with the example above, when the next stage module A3 of A2 is connected to the integration testing, if there is no upstream production data that A3 depends on, then upstream mock data corresponding to A3 needs to be generated, and it is determined that this upstream mock data is the mock data of A2, thus obtaining a mock snapshot of A2.
[0059] As can be seen, the execution snapshot of the module under test is the execution result obtained from the test cases of the execution phase, that is, the module output parameter data obtained from the test cases of the execution phase. The mock snapshot of the module under test, on the other hand, is the mocked output parameter data of the module under test. The mock snapshot of the module under test can be used to test the next module. Therefore, the mock snapshot and the execution snapshot of the module under test can be used to perform integration testing on the module under test.
[0060] Furthermore, in an exemplary embodiment, the integration testing method may further include: generating execution snapshots of multiple modules under test; and performing integration testing on the multiple modules under test based on the execution snapshots and mock snapshots of the multiple modules under test, thereby achieving integration testing of the integration scenario. Integration testing requires testing multiple modules under test included in the entire integration project; therefore, generating execution snapshots of multiple modules under test and performing integration testing on the multiple modules under test based on the execution snapshots and mock snapshots of the multiple modules under test completes the testing of the entire integration scenario.
[0061] The integration testing method provided in this disclosure can perform integration testing by executing test cases using upstream production data that the module under test depends on, if such upstream production data exists. If upstream production data does not exist, upstream mock data is generated according to the upstream interface definition, and then test cases are executed using the upstream mock data. Integration testing can also be performed using the module's execution snapshot and mock snapshot. Integration testing can start from any module without having to test all application modules together, thus achieving parallel execution of modules, improving integration testing efficiency, and enabling modules to enter testing periodically without requiring all modules to cooperate in regression testing, reducing costs and accelerating the progress of integration testing.
[0062] Furthermore, the e-commerce industry conducts transactions and related services electronically via the internet. Currently, no standardized integration testing methods have been proposed for the e-commerce industry, and existing methods cannot meet the product requirements of the e-commerce sector. However, the integration testing method provided in this disclosure can accommodate various system integration methods and supports the orderly, efficient, and high-quality completion of large-scale projects across all scenarios, thus fulfilling the product requirements of the e-commerce industry.
[0063] Figure 2 This is a flowchart illustrating the integration testing of a module under test according to an exemplary embodiment. For example... Figure 2 As shown, joint debugging tests on the tested module may include:
[0064] Step S210: Determine whether there is a mock snapshot of the module under test;
[0065] Step S220: If there is no mock snapshot of the module under test, then the joint debugging test of the module under test is determined to be passed.
[0066] Step S230: If a mock snapshot of the module under test exists, determine whether the mock snapshot of the module under test and the execution snapshot of the module under test are consistent.
[0067] Step S240: If yes, then the joint debugging test of the module under test is confirmed to be passed;
[0068] Step S250: If not, then if the joint debugging test of the previous module of the module under test passes, re-execute the process test cases of the module under test.
[0069] During the testing process to determine if the integration of a module under test (TBT) passes, the first step is to check if a mock snapshot of the TBT module exists. If not, it means that no mock data was generated for the TBT module. This implies that the production data of the TBT module was used for testing when the next module under test was integrated. In this case, the integration of the TBT module is considered successful. If a mock snapshot exists, it's necessary to check if the mock snapshot and the execution snapshot of the TBT module are consistent. As explained above, the execution snapshot of the TBT module contains the module's output parameters obtained from the execution test cases, while the mock snapshot contains the mocked output parameters of the TBT module. Therefore, if the mock snapshot and the execution snapshot are consistent, the integration of the TBT module is considered successful. If they are inconsistent—meaning the output parameters obtained from the execution test cases are different from the mocked output parameters—it's necessary to check if the previous module under test passed. If it failed, it's possible that the previous module had a problem, affecting the execution result of the TBT module. If successful, the test cases for the module under test are re-executed. It's important to note that this re-execution of the test cases can use the most recent upstream production data or the most recent upstream mock data. It's also important to be aware that there may be instances where test cases are executed multiple times. For example, if a snapshot of the execution is obtained using upstream mock data, it might be reused when generating data and transferring it to the module under test, potentially obtaining a new snapshot using upstream production data. Therefore, the execution snapshot used during integration testing of the module under test should be the one most recent to the present time.
[0070] Continuing with the example above, when generating an execution snapshot of A3, the process of determining whether the integration test of A3 passes first checks if a mock snapshot of A3 exists. If it doesn't exist, it means that no mock data for A3 was generated; that is, when the next module A4 in the integration test of A3 was connected, the production data of A3 was used for testing. In this case, the integration test of A3 is confirmed to have passed. If it exists, it is necessary to check whether the mock snapshot and the execution snapshot of A3 are consistent. If they are consistent, the integration test of A3 is confirmed to have passed. If they are inconsistent, if the integration test of the previous module A2 in the integration test of A3 has passed, the test cases of A3 are re-executed.
[0071] In an exemplary embodiment, the integration testing method may further include: if the mock snapshot of the module under test and the execution snapshot of the module under test are inconsistent, and the integration testing of the previous module fails, then the integration testing of the module under test is suspended until the integration testing of the previous module passes.
[0072] Step S250 explains that if the mock snapshot and the execution snapshot of the module under test are inconsistent, and the integration test of the previous module passes, the test cases of the module under test can be re-executed. Therefore, if the mock snapshot and the execution snapshot of the module under test are inconsistent, and the integration test of the previous module fails, the integration test of the module under test can be paused. After the integration test of the previous module passes, the test cases of the module under test can be re-executed. Continuing with the previous example, if the mock snapshot and the execution snapshot of A3 are inconsistent, and the integration test of the previous module A2 fails, it is necessary to wait for the integration test of A2 to pass before re-executing the test cases of A3. The reason for this is that if the mock snapshot and the execution snapshot of A3 are inconsistent, it means that the module output parameter data obtained from executing the A3 test cases is inconsistent with the mock output parameter data of A3. Therefore, it is necessary to determine whether the joint debugging test of module A2, which is the previous stage of A3, has passed. If it fails, it may be that there is a problem with module A2, which affects the execution result of module A3.
[0073] In an exemplary embodiment, after re-executing the test cases of the module under test, the integration testing method may further include: obtaining the execution result and verifying the execution result; if the verification passes, the integration testing of the module under test is determined to have passed; if the verification fails, the project test cases are re-executed. That is, the execution results are obtained by re-executing the test cases of the module under test, and then the execution results are verified, such as by comparing the execution result with the most recent execution result. If the verification passes, the integration testing of the module under test is determined to have passed; if the verification fails, the project test cases can be re-executed.
[0074] Figure 3 This is a flowchart illustrating the integration testing of a module under test, according to yet another exemplary embodiment. For example... Figure 3 As shown, joint debugging tests on the tested module may include:
[0075] Step S301: Determine whether there is a mock snapshot of the module under test. If yes, proceed to step S302; otherwise, proceed to step S309.
[0076] Step S302: Determine whether the mock snapshot of the module under test and the execution snapshot of the module under test are consistent;
[0077] Step S303: If consistent, then the joint debugging test of the module under test is confirmed to be passed;
[0078] Step S304: If there is no consistency, determine whether the joint debugging test of the module above the module under test has passed.
[0079] Step S305: If the joint debugging test of the previous module passes, re-execute the test cases of the module under test.
[0080] Step S306: If the integration test of the previous module fails, pause the integration test of the module under test until the integration test of the previous module passes, and then re-execute the test cases of the module under test.
[0081] Step S307: Obtain the execution result and verify the execution result;
[0082] Step S308: If the verification passes, the joint debugging test of the module under test is confirmed to be successful; if the verification fails, the project test cases are re-executed.
[0083] Step S309: Confirm that the joint debugging test of the module under test has passed.
[0084] Taking module A3 under test as an example, we first determine if a mock snapshot of A3 exists, i.e., whether upstream mock data for A4 was generated during the integration testing of A4. If no mock snapshot of A3 exists, we can confirm that the integration test of A3 has passed. If a mock snapshot of A3 exists, we can determine if the mock snapshot and the execution snapshot of A3 are consistent. If they are consistent, we can confirm that the integration test of A3 has passed. If they are inconsistent, we can determine if the integration test of the previous module A2 of A3 has passed. If the integration test of A2 has passed, we can re-execute the test cases for A3. If the integration test of A2 has failed, we pause the integration test of A3 until the integration test of A2 passes, and then re-execute the test cases for A3. After re-executing the test cases for A3, we can verify the execution results. If the verification passes, we can confirm that the integration test of A3 has passed. If the verification fails, we can re-execute the project test cases of the project to which A3 belongs.
[0085] In this embodiment of the disclosure, the success of the integration test of the module under test can be determined by comparing the execution snapshot and the mock snapshot. If the integration test fails, the test cases can be re-executed based on the integration test results of the previous module. This allows for analysis of different situations, enabling integration testing to be integrated into module testing, and achieving the goal of completing the integration test of the project through module integration testing.
[0086] In an exemplary embodiment, after generating upstream mock data according to the upstream interface definition and executing the test cases of the module under test using the upstream mock data, the joint debugging test method may further include: generating the correspondence between the upstream mock data and the test cases of the module under test.
[0087] If it is determined that there is no upstream production data that the module under test depends on, upstream mock data can be generated according to the upstream interface definition. The test cases for the module under test can then be executed using this mock data. A mapping between the upstream mock data and the test cases for the module under test can then be generated, specifically recorded as "mock + mock module + module under test + time + scenario". Continuing with the example above, to determine if A3 has any dependent upstream production data, upstream mock data for A3 can be generated according to the upstream interface definition. The mock module is the previous module A2 of A3, and this data is stored as "mock + A2 + A3 + specific data generation time + specific business scenario".
[0088] Furthermore, in an exemplary embodiment, before executing the test cases of the module under test using upstream production data, the joint debugging test method may further include: determining whether a correspondence exists; if so, then executing the test cases of the module under test using upstream production data if the upstream mock data and upstream production data are inconsistent; if not, then executing the test cases of the module under test using upstream production data.
[0089] Before executing test cases for the module under test using upstream production data, it's necessary to determine if a correspondence exists between the test cases and upstream mock data. If such a correspondence exists, it means that test cases have already been executed using upstream mock data. In this case, it's crucial to check if the upstream mock data and upstream production data are consistent. If they are consistent, it's unnecessary to execute test cases using upstream production data; otherwise, the test cases can be executed using upstream production data. If no upstream mock data exists, the test cases can be executed using upstream production data.
[0090] Figure 4 This is a flowchart illustrating an execution phase use case according to an exemplary embodiment. For example... Figure 4 As shown, the execution phase test case flow may include:
[0091] Step S401: Query whether there is upstream production data that the tested module depends on. If yes, proceed to step S402; otherwise, proceed to step S406.
[0092] Step S402: Determine whether there is a correspondence between the test case of the module under test and the upstream mock data. If yes, proceed to step S403; otherwise, proceed to step S404.
[0093] Step S403: Determine whether the upstream mock data is consistent with the upstream production data. If yes, proceed to step S405; otherwise, proceed to step S404.
[0094] Step S404: Execute the process test cases of the module under test using upstream production data to generate an execution snapshot of the module under test;
[0095] Step S405: Determine whether the process test cases of the module under test can be executed without using upstream production data;
[0096] Step S406: Generate upstream mock data according to the upstream interface definition, execute the test cases of the module under test using the upstream mock data, and generate an execution snapshot of the module under test.
[0097] Step S407: Generate the correspondence between upstream mock data and the test cases of the module under test.
[0098] In step S404, after obtaining the execution snapshot by executing the process test cases using the upstream production data, the correspondence between the upstream production data and the process test cases of the tested process module can also be generated.
[0099] To facilitate understanding, the specific process of the joint debugging test method provided in this embodiment will be explained using the example above. First, a joint debugging project A and its test cases are created. A includes five modules under test, A1 to A5, with data flowing from A1 to A5. Based on the created project test cases, the test cases for modules A1 to A5 are obtained. During joint debugging testing, any module from A1 to A5 can be accessed, or they can be executed in parallel. A3 will be used as an example. First, it is determined whether upstream production data for A3 exists, i.e., whether real data flows to A3. If it exists, the test cases for A3 are executed using the upstream production data to obtain an execution snapshot; if it does not exist, upstream mock data is generated according to the upstream interface definition, and the test cases for A3 are executed using the upstream mock data to obtain an execution snapshot.
[0100] In addition, during the execution of the process test cases of the module under test, if it is determined that there is upstream production data, it can be determined whether there is a correspondence between the process test cases and the upstream mock data. This is explained above through steps S401 to S07, and will not be repeated here.
[0101] After executing all test cases from A1 to A5, integration testing can be performed on A1 to A5. Let's take A3 as an example again. First, check if a mock snapshot of A3 exists, i.e., whether upstream mock data for A4 was generated during the integration testing of A4. If it doesn't exist, the integration test of A3 has passed. If it does exist, check if the mock snapshot and the execution snapshot of A3 are consistent. If they are consistent, the integration test of A3 has passed. If they are inconsistent, check if the integration test of the previous module A2 of A3 has passed. If the integration test of A2 passes, the test cases for A3 can be re-executed. If the integration test of A2 fails, pause the integration test of A3 until A2 passes, then re-execute the test cases for A3. After re-executing the test cases for A3, the execution results can be verified. If the verification passes, the integration test of A3 has passed. If the verification fails, the project test cases for the project to which A3 belongs can be re-executed. After conducting joint testing on A1 to A5, the testing of the entire joint testing scenario was completed.
[0102] The integration testing method provided in this disclosure can be implemented based on a domain model. A domain model is a visual representation of conceptual classes or real-world objects within a domain. It is also called a conceptual model, domain object model, or analysis object model. It focuses on analyzing the problem domain itself, uncovering important business domain concepts, and establishing relationships between these concepts. The core idea of using a domain model is to progressively subdivide the scope of integration testing, thereby reducing the complexity of business understanding and implementation. Through domain subdivision, the domain is divided into different subdomains, specifically into three categories based on their importance and functional attributes: core domain, general domain, and supporting domain. Each subdomain corresponds to a smaller business scope for integration testing. The main goal of using core domain, supporting domain, and general domain is to differentiate the different functional attributes and importance of different subdomains in the integration testing method, thereby allowing for different resource investment and development strategies for different subdomains.
[0103] Figure 5 This is a block diagram of a domain model-based joint debugging and testing apparatus according to an exemplary embodiment. Figure 5As shown, the domain-module-based integration testing device consists of a data acquisition layer, a data processing layer, a management layer, and an execution test case layer. The data acquisition layer can access the definitions and logs of the interfaces of each module in the integration testing project. The data processing layer can categorize the business processes of the integration testing project, inherit and extend project test cases, scenarios, and test data, and automatically recommend test cases, scenarios, and test data when adding similar business processes. The management layer can manage the project test cases, process test cases, processes, scenarios, and processes required for integration testing. The execution test case layer can perform interface, functional, comparative, and mock tests on the modules of each stage in the integration testing project, supporting mobile, web, and server-side testing; it can also evaluate the project's testing scope when recommending or supplementing test cases to support the timely and high-quality delivery of project requirements.
[0104] The domain-model-based integration testing device of this disclosure adopts Domain-Driven Design (DDD) to divide the domains, specifically including use case domains, planning domains, material domains, user domains, and project domains. Among them, the use case domain, planning domain, and material domain are core domains, the user domain is a general domain, and the project domain is a supporting domain. The planning domain corresponds to the execution use case layer, the use case domain corresponds to the data capability layer, the material domain corresponds to the data capability layer, the user domain runs throughout the domain-module-based integration testing device, and the project domain corresponds to the management capability layer. Furthermore, the data acquisition capability layer may involve multiple applications during actual integration testing, and the accessed data needs to undergo anonymization and other operations according to corresponding requirements. Therefore, it can extend the access point form to define interfaces and collect logs. This allows the establishment of a complete knowledge system for the domain-model-based integration testing device, i.e., the establishment of a complete domain model for the device.
[0105] Figure 6 This is a flowchart illustrating a domain model-based integration testing method according to an exemplary embodiment. Figure 6 As shown, the domain-based module-based integration testing method mainly includes the following steps: Step S601, using the user domain to enter the integration testing; Step S602, using the project domain to create an integration project and design all scenarios involved in the integration testing; Step S603, using the planning domain to design the integration testing phases and bind the integration testing scenarios; Step S604, using the test case domain to create automated test cases and bind them to the integration testing phases; Step S605, using the material domain to categorize the data involved in the project into the various scenarios of the project; Step S606, using the data collection function extension point to access the module interface definition and the module's key logs; Step S607, using the planning domain to execute the phase test cases. The specific execution process is as follows:
[0106] 1) If the data has not been transferred to the module under test, that is, the upstream production data that the module under test depends on cannot be found, the execution snapshot of the module is searched from the previous module through the interface definition. The interface data is mocked from the farthest module without an execution snapshot to generate upstream mock data of the module under test. The mock data is recorded in the corresponding module mock snapshot. The module test cases of the module under test are executed and the execution data is recorded in the execution snapshot of the module under test.
[0107] 2) If the data flows to the module under test, that is, the upstream production data that the module under test depends on is queried, the process test cases of the module under test are executed and the execution data is recorded in the execution snapshot of the module under test;
[0108] 3) If the test cases in a process are completed but there are problems, regression testing will be performed using the production / mock data most recent to the present time after the problems are fixed;
[0109] 4) If all test cases of the module under test are executed and pass, use the execution snapshot and mock snapshot of the module under test for joint debugging test. The specific process is as follows.
[0110] a. If only mock snapshots are available, then stage test cases can be recommended.
[0111] b. If only a snapshot is executed, it can be confirmed that the integration testing of the module under test has passed.
[0112] c. If the snapshot and the mock snapshot are consistent, it can be determined that the integration testing of the module under test has passed.
[0113] d. If the execution snapshot and the mock snapshot are inconsistent, and the integration testing of the previous module has passed, re-execute the test cases of the module under test, generate the execution result, and compare the execution result with the execution result most recent in time. If the comparison result is consistent, it can be determined that the integration testing of the module under test has passed; if the comparison result is inconsistent, re-execute the scenario test cases.
[0114] e. If the execution snapshot and the mock snapshot are inconsistent, and the integration test of the previous module fails, pause the integration test of the module under test until the integration test of the previous module passes, and then execute the test cases of the module under test.
[0115] The domain-model-based integration testing method completes project integration testing within each module's testing phase. Integration testing scenarios are fully covered in module tests, and test cases for module integration testing scenarios are automatically supplemented. Employing mock testing and comparative testing, each module can be tested at any time to achieve integration testing without waiting for dependent upstream modules to complete their tests. This allows for rapid and orderly implementation of project integration testing tasks, improving efficiency and schedule. Furthermore, the domain-model-based integration testing method uses a Domain-Driven Design (DDD) model to model the integration testing business at the domain layer, adding extension points to realize data collection and integration testing. This results in simple business configuration and strong scalability. Moreover, the domain-model-based integration testing method can be applied to the e-commerce industry; that is, the embodiments of this disclosure propose a method suitable for e-commerce projects and retail cloud integration testing with integration testing requirements.
[0116] It should be noted that the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of the present invention, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may, for example, be executed synchronously or asynchronously in multiple modules.
[0117] Figure 7 This is a block diagram of a commissioning and testing apparatus according to an exemplary embodiment. (Refer to...) Figure 7 The joint debugging and testing device 700 may include: a query module 710, a generation module 720, and a joint debugging and testing module 730.
[0118] The query module 710 can be used to: query whether there is upstream production data that the module under test depends on; the generation module 720 can be used to: if so, use the upstream production data to execute the process test cases of the module under test and generate an execution snapshot of the module under test; if not, generate upstream mock data according to the upstream interface definition, use the upstream mock data to execute the process test cases of the module under test and generate an execution snapshot of the module under test; the integration testing module 730 can be used to: obtain the mock snapshot of the module under test, and perform integration testing on the module under test based on the mock snapshot and the execution snapshot of the module under test.
[0119] In an exemplary embodiment, the integration testing module 730 can also be used to: determine whether there is a mock snapshot of the module under test; if there is no mock snapshot of the module under test, then determine that the integration testing of the module under test has passed; if there is a mock snapshot of the module under test, then determine whether the mock snapshot of the module under test and the execution snapshot of the module under test are consistent; if yes, then determine that the integration testing of the module under test has passed; if no, then if the integration testing of the previous module of the module under test has passed, re-execute the process test cases of the module under test.
[0120] In an exemplary embodiment, the joint debugging test module 730 can also be used to: if the mock snapshot of the module under test and the execution snapshot of the module under test are inconsistent, and the joint debugging test of the previous module fails, then suspend the joint debugging test of the module under test until the joint debugging test of the previous module passes.
[0121] In an exemplary embodiment, the integration testing module 730 can also be used to: obtain the execution result after re-executing the process test cases of the module under test, and verify the execution result; if the verification is successful, it is determined that the integration testing of the module under test is successful; if the verification fails, the project test cases are re-executed.
[0122] In an exemplary embodiment, the generation module 720 can also be used to: when the next stage module of the tested stage module is connected for joint debugging and testing, if there is no upstream production data that the next stage module depends on, generate upstream mock data corresponding to the next stage module, and then generate a mock snapshot of the tested stage module.
[0123] In an exemplary embodiment, the generation module 720 can also be used to: generate the correspondence between upstream mock data and the test cases of the module under test.
[0124] In an exemplary embodiment, the generation module 720 can also be used to: determine whether a correspondence exists; if so, then in the case where the upstream mock data and the upstream production data are inconsistent, execute the process test cases of the module under test using the upstream production data; if not, then execute the process test cases of the module under test using the upstream production data.
[0125] In an exemplary embodiment, the integration testing apparatus 700 may further include a creation module 740. This creation module 740 can be used to: create an integration project, obtain multiple tested component modules included in the integration project; create project use cases corresponding to the integration project, and then obtain component use cases for the multiple tested component modules.
[0126] In an exemplary embodiment, the generation module 720 can also be used to: generate execution snapshots of multiple modules under test; and the joint debugging test module 730 can also be used to: perform joint debugging tests on multiple modules under test based on the execution snapshots of multiple modules under test and the mock snapshots of multiple modules under test, so as to realize joint debugging tests in joint debugging scenarios.
[0127] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0128] Figure 8 This is a structural block diagram of a joint debugging and testing device according to an exemplary embodiment. It should be noted that the illustrated electronic device is merely an example and should not be construed as limiting the functionality or scope of the embodiments of the present invention.
[0129] The following reference Figure 8 To describe an electronic device 800 according to this embodiment of the present invention. Figure 8 The electronic device 800 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0130] like Figure 8 As shown, the electronic device 800 is manifested in the form of a general-purpose computing device. The components of the electronic device 800 may include, but are not limited to: at least one processing unit 810, at least one storage unit 820, and a bus 830 connecting different system components (including storage unit 820 and processing unit 810).
[0131] The storage unit stores program code that can be executed by the processing unit 810, causing the processing unit 810 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of the present invention. For example, the processing unit 810 can perform actions such as... Figure 1 In step S110, query whether there is upstream production data that the module under test depends on; in step S120, if yes, use the upstream production data to execute the process test cases of the module under test and generate an execution snapshot of the module under test; in step S130, if no, generate upstream mock data according to the upstream interface definition, use the upstream mock data to execute the process test cases of the module under test and generate an execution snapshot of the module under test; in step S140, obtain the mock snapshot of the module under test, and perform joint debugging tests on the module under test based on the mock snapshot and the execution snapshot of the module under test.
[0132] Storage unit 820 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 8201 and / or cache memory 8202, and may further include a read-only memory (ROM) 8203.
[0133] The storage unit 820 may also include a program / utility 8204 having a set (at least one) of program modules 8205, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0134] Bus 830 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0135] Electronic device 800 can also communicate with one or more external devices 900 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 800, and / or with any device that enables electronic device 800 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 850. Furthermore, electronic device 800 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 860. As shown, network adapter 860 communicates with other modules of electronic device 800 via bus 830. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0136] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0137] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the methods described above is stored. In some possible embodiments, various aspects of the invention may also be implemented as a program product comprising program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps of the various exemplary embodiments of the invention described in the "Exemplary Methods" section of this specification.
[0138] According to embodiments of the present invention, a program product for implementing the above-described method may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0139] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0140] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.
[0141] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0142] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0143] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0144] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.
[0145] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0146] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the appended claims.
Claims
1. A co-simulation test method, characterized in that, include: Check if there is any upstream production data that the tested module depends on; If so, the upstream production data is used to execute the process test cases of the tested process module, and an execution snapshot of the tested process module is generated; If not, upstream mock data is generated according to the upstream interface definition, and the process test cases of the module under test are executed using the upstream mock data to generate an execution snapshot of the module under test; the execution snapshot of the module under test is the execution result obtained by executing the process test cases; Determine whether a mock snapshot of the module under test exists; the mock snapshot of the module under test is the output parameter data of the module under test mocked, and the mock is simulation; If there is no mock snapshot of the module under test, then the integration test of the module under test is deemed to have passed. If a mock snapshot of the module under test exists, then determine whether the mock snapshot of the module under test and the execution snapshot of the module under test are consistent. If so, then the joint debugging test of the module under test is confirmed to have passed; If not, then if the joint debugging test of the previous module of the module under test passes, the process test cases of the module under test will be re-executed.
2. The method according to claim 1, characterized in that, The method further includes: If the mock snapshot of the module under test is inconsistent with the execution snapshot of the module under test, and the joint debugging test of the previous module fails, then the joint debugging test of the module under test will be suspended until the joint debugging test of the previous module passes.
3. The method of claim 1, wherein, After re-executing the test case of the module under test, the method further includes: Obtain the execution result and verify the execution result; If the verification passes, the joint debugging test of the module under test is confirmed to be successful; if the verification fails, the project test cases are re-executed.
4. The method of claim 1, wherein, The method further includes: When the next stage module of the tested stage module is connected for joint debugging and testing, if there is no upstream production data that the next stage module depends on, upstream mock data corresponding to the next stage module is generated, and then a mock snapshot of the tested stage module is generated.
5. The method of claim 1, wherein, After generating upstream mock data according to the upstream interface definition and executing the test cases of the module under test using the upstream mock data, the method further includes: Generate the correspondence between the upstream mock data and the test cases of the module under test.
6. The method of claim 5, wherein, Before executing the test case of the module under test using the upstream production data, the method further includes: Determine whether the aforementioned correspondence exists; If so, in the case that the upstream mock data is inconsistent with the upstream production data, the process use case of the tested process module is executed using the upstream production data; If not, then the process test cases of the tested process module are executed using the upstream production data.
7. The method of claim 1, wherein, The method further includes: Create a joint debugging project and obtain the multiple tested component modules contained in the joint debugging project; Create project use cases corresponding to the joint debugging project, and then obtain multiple use cases for the tested module.
8. The method of claim 7, wherein, The method further includes: Generate execution snapshots of multiple modules under test; Based on the execution snapshots and mock snapshots of the multiple modules under test, joint debugging tests are performed on the multiple modules under test to achieve the joint debugging test in the joint debugging scenario.
9. The method according to any one of claims 1 to 8, characterized in that, The method is implemented based on a domain model.
10. A co-timed testing device, characterized by include: The query module is used to query whether there is upstream production data that the module under test depends on. The generation module is used to, if yes, execute the process test cases of the tested process module using the upstream production data to generate an execution snapshot of the tested process module; if no, generate upstream mock data according to the upstream interface definition, execute the process test cases of the tested process module using the upstream mock data to generate an execution snapshot of the tested process module; the execution snapshot of the tested process module is the execution result obtained by executing the process test cases; The integration testing module is used to determine whether a mock snapshot of the module under test exists. The mock snapshot of the module under test is the output parameter data of the module under test that has been mocked, and the mock is a simulation. If no mock snapshot of the module under test exists, the integration testing of the module under test is determined to be successful. If a mock snapshot of the module under test exists, it is determined whether the mock snapshot of the module under test is consistent with the execution snapshot of the module under test. If yes, the integration testing of the module under test is determined to be successful. If no, if the integration testing of the previous module of the module under test has passed, the test cases of the module under test are re-executed.
11. A computer-readable storage medium having a computer program stored thereon, the program being executed by a processor to implement the joint testing method as described in any one of claims 1 to 9.
12. An electronic device, comprising: include: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the joint debugging test method as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Interface test method and device, computer equipment and storage medium
CN112363941A
Method, system and equipment for quickly simulating interface
CN112685014A
