Information comparison method, apparatus, device, medium, and product
By concatenating the identifiers of the lowest-level list of the multi-level result list with those of the upper-level list in the interface test, and directly comparing them with the assertion list, the problem of high computational complexity in the existing technology is solved, and efficient data comparison and test accuracy are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA CONSTRUCTION BANK
- Filing Date
- 2023-09-14
- Publication Date
- 2026-08-04
AI Technical Summary
Existing technologies exhibit exponentially increasing computational complexity when testing lists returned by APIs, resulting in low efficiency in comparing assertion data and returned data, especially in scenarios involving deep list comparisons where time consumption is severe.
By obtaining the lowest-level list from the multi-level result list as the target list, and concatenating its identifier with the identifier of the parent list to obtain the target identifier, the target identifier is directly compared with the assertion list, avoiding multi-level loop comparisons.
This significantly improves the efficiency of comparing assertion data and returned data, reduces the consumption of computing resources, and improves the accuracy and efficiency of testing.
Smart Images

Figure CN117033390B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of functional testing technology, and in particular to an information comparison method, apparatus, equipment, medium, and product. Background Technology
[0002] As financial services become increasingly complex, the functional requirements for financial services are also rising, leading to a greater amount of information that services need to provide. When using API testing tools to test these services, the amount of information returned by the corresponding APIs increases, and the hierarchy of the returned information lists gradually deepens. When testing the lists in the API return results, it becomes necessary to process and compare assertion data with the returned data at each level.
[0003] In existing comparison methods, after obtaining the data returned by the interface, the testing tool compares the entities in the returned list with the entities of the set assertions in a loop according to their unique identifiers. As the depth of the returned list increases, the computation time complexity also increases exponentially. In the case of comparison scenarios with deep lists, the comparison is very time-consuming, resulting in low efficiency in comparing assertion data and returned data. Summary of the Invention
[0004] This application provides an information comparison method, apparatus, equipment, medium, and product that can improve the comparison efficiency of assertion data and returned data.
[0005] In a first aspect, embodiments of this application provide an information comparison method, the method comprising:
[0006] Obtain a multi-level result list received by the interface testing tool, wherein the multi-level result list includes a first list at multiple levels;
[0007] The first list at the bottom level of the multi-level result list is determined as the target list to be compared;
[0008] The first identifier of the target list is concatenated with the second identifier of the parent list of the target list to obtain the target identifier corresponding to the target list;
[0009] The target identifier data of the target list is compared with the first data of the preset assertion list to obtain the comparison result. The first data is the assertion data in the assertion list that corresponds to the multi-level result list.
[0010] Secondly, this application provides an information comparison device, which includes:
[0011] The acquisition module is used to acquire a multi-level result list received by the interface testing tool, wherein the multi-level result list includes a first list at multiple levels;
[0012] The determination module is used to determine the first list at the bottom level of the multi-level result list as the target list to be compared;
[0013] The splicing module is used to splice the first identifier of the target list with the second identifier of the parent list of the target list to obtain the target identifier corresponding to the target list;
[0014] The comparison module is used to compare the target identifier data of the target list with the first data of the preset assertion list to obtain the comparison result. The first data is the assertion data in the assertion list that corresponds to the multi-level result list.
[0015] Thirdly, embodiments of this application provide an electronic device, which includes: a processor and a memory storing computer program instructions;
[0016] When the processor executes computer program instructions, it implements the information comparison method as described in any of the embodiments of the first aspect.
[0017] Fourthly, embodiments of this application provide a computer storage medium storing computer program instructions, which, when executed by a processor, implement the information comparison method as described in any of the embodiments of the first aspect.
[0018] Fifthly, embodiments of this application provide a computer program product in which instructions are executed by the processor of an electronic device, causing the electronic device to perform an information comparison method as described in any of the embodiments of the first aspect above.
[0019] The information comparison method, apparatus, device, medium, and product in this application embodiment include the following methods: acquiring a multi-level result list received by an interface testing tool, the multi-level result list including multiple levels of first lists; determining the lowest level first list in the multi-level result list as the target list to be compared; concatenating a first identifier of the target list with a second identifier of the target list's parent list to obtain a target identifier corresponding to the target list; and comparing the target identifier data of the target list with first data of a preset assertion list to obtain a comparison result, wherein the first data is assertion data in the assertion list corresponding to the multi-level result list. In this embodiment, by concatenating the identifiers of the target list and the parent list of the target list in the multi-level result list and then comparing them with the first data in the assertion list, it is not necessary to iteratively compare multiple levels of parent lists in the multi-level result list; only iterative comparison between the target list and the assertion list is required, which greatly saves computing resources and improves the comparison efficiency between assertion data and returned data. Attached Figure Description
[0020] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a flowchart illustrating an information comparison method provided in one embodiment of this application;
[0022] Figure 2 This is a schematic diagram of the structure of an information comparison device provided in an embodiment of this application;
[0023] Figure 3 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0024] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0025] Furthermore, the acquisition, storage, use, and processing of data in this application's technical solution all comply with relevant national laws and regulations.
[0026] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.
[0027] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the term "comprising" or any other variations thereof is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0028] To address the problems of the prior art, embodiments of this application provide an information comparison method, apparatus, device, medium, and product. The information comparison method provided in this application embodiment will be described first below.
[0029] Figure 1 A flowchart illustrating an embodiment of the information comparison method provided in this application is shown. Figure 1 As shown, the method may specifically include the following steps:
[0030] Step 101: Obtain the multi-level result list received by the interface testing tool, wherein the multi-level result list includes a first list at multiple levels;
[0031] The application scenario of this invention can be functional testing of financial services, such as loan services. The interface testing tool is used to perform functional testing on the loan service interface. After testing the loan service function, the interface testing tool receives a multi-level result list, which corresponds to multiple first lists at different levels. The data in the lists exists in the form of messages. For example, a loan service may have a loan contract, each loan contract may have multiple credit loans, and each credit loan may have multiple loan results. Each level is returned by the interface testing tool in the form of a list, forming the multi-level result list.
[0032] Step 102: Determine the first list at the bottom level of the multi-level result list as the target list to be compared;
[0033] In this embodiment, the first list is the loan results in the above embodiment. When comparing, the first list at the bottom of the multi-level result list needs to be compared.
[0034] Step 103: Concatenate the first identifier of the target list with the second identifier of the parent list of the target list to obtain the target identifier corresponding to the target list;
[0035] In this embodiment, each level of the multi-level result list has a corresponding identifier, which can be composed of various characters, such as numbers, letters, or combinations of numbers and letters; this embodiment does not impose any limitations. The identifiers corresponding to each level of the list may be the same. The aforementioned parent list can be all parent lists of the target list in the multi-level list. Referring to the above embodiment, the parent list is the credit loan and loan contract, and its corresponding identifier is the second identifier, while the identifier corresponding to the target list is the first identifier.
[0036] In one embodiment, concatenating the first identifier of the target list with the second identifier of the parent list of the target list to obtain the target identifier corresponding to the target list includes:
[0037] If the target list has multiple parent lists, the third identifiers of the multiple parent lists are concatenated to obtain the second identifier;
[0038] The first identifier and the second identifier of the target list are concatenated to obtain the target identifier corresponding to the target list.
[0039] In this embodiment, when there are multiple parent lists, when concatenating the first and second identifiers, the third identifiers of the multiple parent lists can be concatenated first to obtain the third identifier, and then the first and third identifiers can be concatenated to obtain the target identifier. However, when there is only one parent list, the second identifier can be directly concatenated with the first identifier to obtain the target identifier. The concatenation can be done by stringing the identifiers together end-to-end. Alternatively, the two identifiers can be encoded to generate a new target identifier.
[0040] In this embodiment, by concatenating the first identifier and the second identifier, the target list at the bottom level can be accurately located in the multi-level result list. This allows the comparison of the target list to be directly performed without skipping the loop comparison of the upper-level list during the subsequent comparison process, thereby reducing the loop time and significantly improving the comparison efficiency.
[0041] Step 104: Compare the target identifier data of the target list with the first data of the preset assertion list to obtain the comparison result. The first data is the assertion data in the assertion list that corresponds to the multi-level result list.
[0042] In this embodiment, each level of the target list in the multi-level result list stores the data generated by the test, which corresponds one-to-one with the target identifier in the target list, i.e., the target identifier data. The assertion list stores preset expected data, which can be edited in advance by the staff. The expected data is the correct data, i.e., the first data.
[0043] In this embodiment, the target identification data needs to be compared with the first data to determine whether the target identification data is the data expected by the staff, i.e., the correct data.
[0044] In this embodiment, the information comparison method includes: obtaining a multi-level result list received by the interface testing tool, wherein the multi-level result list includes multiple levels of first lists; determining the first list at the lowest level of the multi-level result list as the target list to be compared; concatenating the first identifier of the target list with the second identifier of the parent list of the target list to obtain the target identifier corresponding to the target list; comparing the target identifier data of the target list with the first data of a preset assertion list to obtain a comparison result, wherein the first data is the assertion data in the assertion list corresponding to the multi-level result list. In this embodiment, by concatenating the identifiers of the target list and the parent list of the target list in the multi-level result list and then comparing them with the first data in the assertion list, it is not necessary to iteratively compare multiple parent lists in the multi-level result list; only iterative comparison between the target list and the assertion list is required, which greatly saves computing resources and improves the comparison efficiency between assertion data and returned data.
[0045] In one embodiment of this application, comparing the target identifier data of the target list with the first data of the preset assertion list to obtain the comparison result includes:
[0046] Based on the pre-acquired mapping relationship between the target identifier and the storage path, a second list corresponding to the target list is determined;
[0047] The target identifier data of the target list is compared with the first data of the second list to obtain the comparison result.
[0048] In this embodiment, the assertion list includes multiple levels of second lists and corresponding storage paths. The second lists correspond to lists in the multi-level result list. For example, the multi-level result list includes list 1, list 2, and list 3, while the assertion list includes list 4, list 5, and list 6. List 1 corresponds to list 4, list 2 corresponds to list 5, and list 3 corresponds to list 6. Each list in the assertion list has a corresponding storage path. The mapping relationship between storage paths and identifiers can be used to determine the correspondence between the multi-level result list and each list in the assertion list.
[0049] In one example, if the storage path for list 4 is A, the storage path for list 5 is B, the identifier for list 1 is a, and the identifier for list 2 is b, then A corresponds to a, and B corresponds to b. This correspondence can be pre-set by the tester when creating the assertion list.
[0050] In the multi-level result list and assertion list, each list stores corresponding data in the form of messages. After determining the correspondence between each list in the multi-level result list and assertion list, the data of the two are directly compared to obtain the comparison result.
[0051] Specifically, in one embodiment of this application, comparing the target identifier data of the target list with the first data of the second list to obtain a comparison result includes:
[0052] The target identifier data and the first data are split into a first template and a first variable data corresponding to the target identifier data, and a second template and a second variable data corresponding to the first data.
[0053] The first template and the second template are compared, and the first variable data and the second variable data are compared to obtain the comparison results.
[0054] In this embodiment, the data in the list may include template data and variable data. Template data refers to a fixed-format template for the data, including a first template and a second template. Variable data refers to specific information that changes during the testing process, including first variable data and second variable data. If the target identifier data and the first data are the same, then the first template and the second template are the same, and the first variable data and the second variable data are also the same.
[0055] If the first template and the second template are the same, and the first variable data and the second variable data are also the same, then the comparison result is the same; if the first template and the second template are different, and the first variable data and the second variable data are also different, then the comparison result is different; if the first template and the second template are different, and the first variable data and the second variable data are the same, then the comparison result is different; if the first template and the second template are the same, but the first variable data and the second variable data are different, then the comparison result is different.
[0056] In this embodiment, by determining the second list corresponding to the target list, and finally comparing the data in the two lists, accurate data comparison can be achieved, improving the accuracy of the comparison and thus improving the efficiency of the comparison.
[0057] In one embodiment of this application, after comparing the target identifier data of the target list with the first data of the preset assertion list to obtain the comparison result, the method further includes:
[0058] If the comparison result shows that the target identification data and the first data are different, the degree of difference between the target identification data and the first data is obtained;
[0059] If the difference is greater than a preset threshold, an analysis report of the comparison results is generated, and the analysis report includes the reasons for the difference.
[0060] In this embodiment, the aforementioned degree of difference refers to the degree of difference between the target identifier data and the first data. The degree of difference between the two can be determined by comparing each character in the target identifier data and the first data.
[0061] The aforementioned preset threshold can be 1% or 2%, etc., and this embodiment does not impose any limitation. The aforementioned cause can be template-related or variable data-related. Template-related causes can be due to comparison with a template, while variable data-related causes can be due to comparison with variable data.
[0062] In this embodiment, by outputting an analysis report of the comparison results, modifications can be made to the functional tests to ensure the correctness of the tests and improve testing efficiency.
[0063] Figure 2 A schematic diagram of the information comparison device provided in one embodiment of this application is shown. For ease of explanation, only the parts related to the embodiment of this application are shown.
[0064] Reference Figure 2 The information comparison device 200 may include:
[0065] The acquisition module 201 is used to acquire a multi-level result list received by the interface testing tool, wherein the multi-level result list includes a first list of multiple levels;
[0066] The determining module 202 is used to determine the first list at the bottom level of the multi-level result list as the target list to be compared;
[0067] The splicing module 203 is used to splice the first identifier of the target list with the second identifier of the parent list of the target list to obtain the target identifier corresponding to the target list;
[0068] The comparison module 204 is used to compare the target identifier data of the target list with the first data of the preset assertion list to obtain the comparison result. The first data is the assertion data in the assertion list that corresponds to the multi-level result list.
[0069] Optionally, the splicing module 203 includes:
[0070] The first splicing submodule is used to splice the third identifiers of the multiple parent lists to obtain the second identifier when the target list has multiple parent lists;
[0071] The second splicing submodule is used to splice the first identifier and the second identifier of the target list to obtain the target identifier corresponding to the target list.
[0072] Optionally, the comparison module 204 includes:
[0073] The determination submodule is used to determine a second list corresponding to the target list based on the pre-acquired mapping relationship between the target identifier and the storage path;
[0074] The comparison submodule is used to compare the target identifier data of the target list with the first data of the second list to obtain the comparison result.
[0075] Optionally, the comparison submodule includes:
[0076] The splitting unit is used to split the target identifier data and the first data respectively to obtain a first template and a first variable data corresponding to the target identifier data, and a second template and a second variable data corresponding to the first data;
[0077] The comparison unit is used to compare the first template and the second template, and to compare the first variable data and the second variable data to obtain the comparison result.
[0078] Optionally, the information comparison device 200 further includes;
[0079] The acquisition module is used to acquire the degree of difference between the target identification data and the first data when the comparison result is that the target identification data and the first data are different;
[0080] The generation module is used to generate an analysis report of the comparison results when the difference is greater than a preset threshold. The analysis report includes the reasons for the difference.
[0081] The information comparison device 200 provided in this application embodiment can implement the various processes implemented in the aforementioned method embodiments, and will not be described again here to avoid repetition.
[0082] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0083] Figure 3 A schematic diagram of the hardware structure of the electronic device provided in an embodiment of this application is shown.
[0084] The device may include a processor 301 and a memory 302 storing program instructions.
[0085] When processor 301 executes the program, it implements the steps in any of the above method embodiments.
[0086] For example, the program can be divided into one or more modules / units, one or more of which are stored in memory 302 and executed by processor 301 to complete this application. The one or more modules / units can be a series of program instruction segments capable of performing a specific function, which describe the execution process of the program in the device.
[0087] Specifically, the processor 301 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0088] Memory 302 may include mass storage for data or instructions. For example, and not limitingly, memory 302 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 302 may include removable or non-removable (or fixed) media. Where appropriate, memory 302 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 302 is non-volatile solid-state memory.
[0089] Memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Therefore, typically, memory includes one or more tangible (non-transitory) readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the methods according to one aspect of this disclosure.
[0090] The processor 301 implements any of the methods described above by reading and executing program instructions stored in the memory 302.
[0091] In one example, the electronic device may also include a communication interface 303 and a bus 310. The processor 301, memory 302, and communication interface 303 are connected via the bus 310 and communicate with each other.
[0092] The communication interface 303 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0093] Bus 310 includes hardware, software, or both, that couples components of an online data traffic metering device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 310 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.
[0094] Furthermore, in conjunction with the methods in the above embodiments, this application embodiment can provide a storage medium for implementation. This storage medium stores program instructions; when these program instructions are executed by a processor, they implement any of the methods in the above embodiments.
[0095] This application also provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled. The processor is used to run programs or instructions to implement the various processes of the above method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.
[0096] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0097] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above method embodiments and achieve the same technical effects. To avoid repetition, it will not be described again here.
[0098] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0099] The functional modules shown in the above block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on machine-readable media or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable media" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer grids such as the Internet, intranets, etc.
[0100] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0101] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to create a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0102] The above are merely specific embodiments of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. An information comparison method, characterized in that, The method includes: Obtain a multi-level result list received by the interface testing tool, wherein the multi-level result list includes a first list at multiple levels; The first list at the bottom level of the multi-level result list is determined as the target list to be compared; The first identifier of the target list is concatenated with the second identifier of the parent list of the target list to obtain the target identifier corresponding to the target list; the concatenation is the first identifier and the second identifier being concatenated end to end. The target identifier data of the target list is compared with the first data of the preset assertion list to obtain the comparison result. The first data is the assertion data in the assertion list that corresponds to the multi-level result list. The assertion list includes a second list at multiple levels and a storage path corresponding to the second list; The comparison of the target identifier data of the target list with the first data of the preset assertion list to obtain the comparison result includes: Based on the pre-acquired mapping relationship between the target identifier and the storage path, a second list corresponding to the target list is determined; The target identifier data of the target list is compared with the first data of the second list to obtain the comparison result.
2. The information comparison method as described in claim 1, characterized in that, The step of concatenating the first identifier of the target list with the second identifier of the parent list of the target list to obtain the target identifier corresponding to the target list includes: If the target list has multiple parent lists, the third identifiers of the multiple parent lists are concatenated to obtain the second identifier; The first identifier and the second identifier of the target list are concatenated to obtain the target identifier corresponding to the target list.
3. The information comparison method as described in claim 1, characterized in that, The step of comparing the target identifier data of the target list with the first data of the second list to obtain the comparison result includes: The target identifier data and the first data are split into a first template and a first variable data corresponding to the target identifier data, and a second template and a second variable data corresponding to the first data. The first template and the second template are compared, and the first variable data and the second variable data are compared to obtain the comparison results.
4. The information comparison method as described in claim 1, characterized in that, After comparing the target identifier data of the target list with the first data of the preset assertion list to obtain the comparison result, the method further includes: If the comparison result shows that the target identification data and the first data are different, the degree of difference between the target identification data and the first data is obtained; If the difference is greater than a preset threshold, an analysis report of the comparison results is generated, and the analysis report includes the reasons for the difference.
5. An information comparison device, characterized in that, The device includes: The acquisition module is used to acquire a multi-level result list received by the interface testing tool, wherein the multi-level result list includes a first list at multiple levels; The determination module is used to determine the first list at the bottom level of the multi-level result list as the target list to be compared; The splicing module is used to splice the first identifier of the target list with the second identifier of the parent list of the target list to obtain the target identifier corresponding to the target list; the splicing is to concatenate the first identifier and the second identifier end to end; The comparison module is used to compare the target identifier data of the target list with the first data of the preset assertion list to obtain the comparison result. The first data is the assertion data in the assertion list that corresponds to the multi-level result list. The assertion list includes a second list at multiple levels and a storage path corresponding to the second list; The determination submodule is used to determine a second list corresponding to the target list based on the pre-acquired mapping relationship between the target identifier and the storage path; The comparison submodule is used to compare the target identifier data of the target list with the first data of the second list to obtain the comparison result.
6. The information comparison device as described in claim 5, characterized in that, The splicing module includes: The first splicing submodule is used to splice the third identifiers of the multiple parent lists to obtain the second identifier when the target list has multiple parent lists; The second splicing submodule is used to splice the first identifier and the second identifier of the target list to obtain the target identifier corresponding to the target list.
7. An electronic device, characterized in that, The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the information comparison method as described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the information comparison method as described in any one of claims 1-5.
9. A computer program product, characterized in that, When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device performs the information comparison method as described in any one of claims 1-5.