CA3129150C - Interface message test method and device, computer equipment and storage medium - Google Patents

Interface message test method and device, computer equipment and storage medium Download PDF

Info

Publication number
CA3129150C
CA3129150C CA3129150A CA3129150A CA3129150C CA 3129150 C CA3129150 C CA 3129150C CA 3129150 A CA3129150 A CA 3129150A CA 3129150 A CA3129150 A CA 3129150A CA 3129150 C CA3129150 C CA 3129150C
Authority
CA
Canada
Prior art keywords
interface message
node
target
interface
benchmark
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CA3129150A
Other languages
French (fr)
Other versions
CA3129150A1 (en
Inventor
Yang Sun
Tingting GUO
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
10353744 Canada Ltd
Original Assignee
10353744 Canada Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 10353744 Canada Ltd filed Critical 10353744 Canada Ltd
Publication of CA3129150A1 publication Critical patent/CA3129150A1/en
Application granted granted Critical
Publication of CA3129150C publication Critical patent/CA3129150C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention discloses to a message conversion method, apparatus, computer device, and storage medium. The method comprises: obtaining actual interface message, the actual interface message carries the current interface identity; obtaining target benchmark interface message according to the current interface identity; determining differential node set according to the actual interface message and the target benchmark interface message; and determining interface message test result according to node value corresponding to the differential node in the differential node set, the interface message test result is used to determine the correctness of the actual interface message. This method can test the interface message comprehensively and improve accuracy of interface message test.

Description

INTERFACE MESSAGE TEST METHOD AND DEVICE, COMPUTER EQUIPMENT AND
STORAGE MEDIUM
Field [0001] The present disclosure relates to computer technology field, particularly to an interface message test method, apparatus, computer device, and storage medium.
Background
[0002] At present, an interface test is usually performed to fully match the received interface message.
The test succeeds only when the field name and the correspondingly field value are the same, this test method can easily miss the case of the empty filed value or the nonexistent field and lead to the low accuracy of the interface message test.
Invention Content
[0003] Based on this, it is necessary to provide a method, apparatus, computer device, and storage medium to tackle the above-mentioned technical problems, wherein the method can test the interface message comprehensively and improve accuracy of interface message test.
[0004] An interface message test method comprises:
[0005] Obtaining actual interface message, the actual interface message carries the current interface identity;
[0006] Obtaining target benchmark interface message according to the current interface identity;

Date recue/date received 2021-10-27
[0007] Determining differential node set according to the actual interface message and the target benchmark interface message;
[0008] Determining interface message test result according to node value corresponding to the differential node in the differential node set, the interface message test result is used to determine the correctness of the actual interface message.
[0009] In an implementation, the interface message test method also comprises:
obtaining candidate benchmark interface message set, the candidate benchmark interface message set includes at least one candidate benchmark interface message; obtaining candidate interface identity corresponding to each candidate interface; establishing association relation between the candidate benchmark interface message and the correspondingly candidate interface identity; obtaining the correspondingly target benchmark interface message according to the current interface identity, comprising:
obtaining the correspondingly target benchmark interface message according to the association relation and the current interface identity.
[0010] In an implementation, determining differential node set according to the actual interface message and the target benchmark interface message, comprising: traversing actual node name in the actual interface message; traversing benchmark node name in the target benchmark interface message; determining differential node and forming differential node set, wherein the differential node is the node with different actual node name from the benchmark node name.
[0011] In an implementation, determining interface message test result according to node value corresponding to the differential node in the differential node set, comprising: removing the differential node with empty node value from the differential node set, obtaining a new differential node set; if differential nodes in the new differential node set are inconsistent, determining the test result of interface message as failure test result of interface message.

Date recue/date received 2021-10-27
[0012] In an implementation, the interface message test method also comprises:
if differential nodes in the new differential node set are consistent, determining the target node set according to the actual interface message and the target benchmark interface message; if target nodes in the target node set are consistent, determining the test result of interface message as successful test result of interface message.
[0013] In an implementation, determining the target node set according to the actual interface message and the target benchmark interface message, comprising: traversing actual node name in the actual interface message; traversing benchmark node name in the target benchmark interface message; determining target node and forming target node set, wherein the target node is the node with the same actual node name as the benchmark node name.
[0014] In an implementation, when target nodes in the target node set are consistent, comprising: if node names corresponding to the target nodes in the target node set are the same and node values corresponding to the target nodes are the same, determining of the target nodes in the target node set are consistent; if the target nodes include plural target child nodes, the method also comprises: if the number of the target child nodes corresponding to the target node in the actual interface message is the same as the number of the target child nodes corresponding to the target node in the benchmark interface message, obtaining the target child node names and target child node values corresponding to the target child nodes in the actual interface message and the target benchmark interface message; if the target child node names are the same and the target child node values are the same, determining of the target nodes in the target node set are consistent.
[0015] An interface message test apparatus comprises:
[0016] An actual interface message obtaining module for obtaining actual interface message, the actual interface message carries the current interface identity;
[0017] A benchmark interface message obtaining module for obtaining target benchmark interface Date recue/date received 2021-10-27 message according to the current interface identity;
[0018] A differential node set determining module for determining differential node set according to the actual interface message and the target benchmark interface message;
[0019] An interface message test result determining module for determining interface message test result according to node value corresponding to the differential node in the differential node set, the interface message test result is used to determine the correctness of the actual interface message.
[0020] A computer device, including a memory, a processor and a computer program stored in the memory and ran on the processor configured to achieve following steps when the processor executes the computer program:
[0021] Obtaining actual interface message, the actual interface message carries the current interface identity;
[0022] Obtaining target benchmark interface message according to the current interface identity;
[0023] Determining differential node set according to the actual interface message and the target benchmark interface message;
[0024] Determining interface message test result according to node value corresponding to the differential node in the differential node set, the interface message test result is used to determine the correctness of the actual interface message.
[0025] A computer readable storage medium stored with a computer program configured to achieve the following steps when the processor executes the computer program:

Date recue/date received 2021-10-27
[0026] Obtaining actual interface message, the actual interface message carries the current interface identity;
[0027] Obtaining target benchmark interface message according to the current interface identity;
[0028] Determining differential node set according to the actual interface message and the target benchmark interface message;
[0029] Determining interface message test result according to node value corresponding to the differential node in the differential node set, the interface message test result is used to determine the correctness of the actual interface message.
[0030] The above-mentioned interface message test method, apparatus, computer device and storage medium, obtaining actual interface message, the actual interface message carries the current interface identity; obtaining target benchmark interface message according to the current interface identity;
determining differential node set according to the actual interface message and the target benchmark interface message; determining interface message test result according to node value corresponding to the differential node in the differential node set, the interface message test result is used to determine the correctness of the actual interface message. Obtaining differential node set by comparing the actual interface message and correspondingly target benchmark interface message, obtaining test result of interface message according to the node value corresponding to the differential node in the differential node set, which will not miss the case of empty node value or nonexistent node, test the interface message comprehensively and improve accuracy of interface message test.
Drawing Description Date recue/date received 2021-10-27
[0031] Figure 1 is an application environment diagram of an interface message test method in an implementation;
[0032] Figure 2 is a process diagram of an interface message test method in an implementation;
[0033] Figure 3 is a process diagram of an interface message test method in an implementation;
[0034] Figure 4 is a process diagram of the determining step of differential node set in an implementation;
[0035] Figure 5 is a process diagram of the determining step of interface message test result an implementation;
[0036] Figure 6 is a process diagram of an interface message test method in an implementation;
[0037] Figure 7 is a process diagram of the determining step of target node set an implementation;
[0038] Figure 8 is a process diagram of the target node processing step of the target node set in an implementation;
[0039] Figure 9 is a structural diagram of an interface test apparatus in an implementation;
[0040] Figure 10 is an internal structure of a computer device in an implementation;
[0041] Figure 11 is an internal structure of a computer device in an implementation.
Specific implementation methods Date recue/date received 2021-10-27
[0042] In order to make clearer application purposes, technical solutions, and advantages, the present disclosure is further explained in detail with a particular embodiment thereof, and with reference to the drawings. It shall be appreciated that these descriptions are only intended to be illustrative, but not to limit the scope of the disclosure thereto.
[0043] The interface message test method provided by the present application can be applied in the application environment as shown in Figure 1. Wherein, terminal 102 communicates with server 104 through the network. Among them, the terminal 102 can be used but not limit to a variety of personal computers, laptops, smart phones, tablets and portable wearable devices, the server 104 can be achieved by an independent server or a server cluster composed of plural servers.
[0044] Specifically, the terminal 120 sends the actual interface message to the server 104 by the interface corresponding to the current interface identity, the server 104 obtains the actual interface message, the actual interface message carries the current interface identity, obtaining target benchmark interface message according to the current interface identity, determining differential node set according to the actual interface message and the target benchmark interface message, determining interface message test result according to node value corresponding to the differential node in the differential node set, the interface message test result is used to determine the correctness of the actual interface message.
Furthermore, the interface message test result can be returned to terminal 102 for the terminal user to view.
[0045] In another implementation, the terminal 102 obtains the actual interface message, the actual interface message carries the current interface identity, obtaining target benchmark interface message according to the current interface identity, determining differential node set according to the actual interface message and the target benchmark interface message, determining interface message test result according to node value corresponding to the differential node in the differential node set, the interface message test result is used to determine the correctness of the actual interface message.

Date recue/date received 2021-10-27
[0046] In an implementation, as shown in Figure 2, an interface message test method is provided and illustrated by the terminal or server of the application in Figure 1, consisting of the following steps:
[0047] Step 202: obtaining the actual interface message, the actual interface message carries the current interface identity.
[0048] Wherein, the actual interface message refers to the interface message obtained through the current interface, the current interface corresponds to the current interface identity, which is used to uniquely identify the current interface, different interface corresponds to different interface identity.
[0049] Wherein, interface API (Application Programming Interface) is pre-defined functions which provides application and developer with the ability to access a set of routines based on a piece of software or hardware without having to access the source code or understanding the details of inner workflows. An interface message is message data obtained through the interface, the message is the data unit exchanged and transmitted in the network, in other words, a data block sent by a site in one time. Among them, the message contains to be sent complete data information, the length of each message is very different, the number of messages is unlimited and variable. Specifically, obtaining the actual interface message by calling the current interface corresponding to the current interface identity, which carries the current interface identity.
[0050] Step 204: obtaining target benchmark interface message according to the current interface identity.
[0051] The target benchmark interface message refers to the correct interface message corresponding to the current interface identity, which can be used to check the correctness of the actual interface message.
Wherein, the benchmark interface message corresponding to the different interface identities can be different or the same, specifically can be determined based on service requirements, actual application scenarios, or product requirements.

Date recue/date received 2021-10-27
[0052] Specifically, after obtaining the actual interface message, obtaining the correspondingly target benchmark interface message according to the current interface identity carried in the actual interface message. Specifically, obtaining candidate interface identity corresponding to each candidate benchmark interface message, determining the candidate benchmark interface message corresponding to the same candidate interface identity as the target benchmark interface message corresponding to the current interface identity.
[0053] Step 206, determining differential node set according to the actual interface message and the target benchmark interface message.
[0054] Among them, this differential node set is composed of at least one differential node, and the differential node refers to the different node between the actual interface message and the target benchmark interface message, the differential node can be the node with different field name between the actual interface message and the target benchmark interface message, also can be the node with different field value between the actual interface message and the target benchmark interface message, or can be the lost node of the actual interface message comparing to the target benchmark interface message, or can be the extra node of the actual interface message comparing to the targe benchmark interface message. All these nodes can be used as differential nodes to form a differential node set.
[0055] Specifically, after obtaining the actual interface message and the target benchmark interface message, traversing the actual node in the actual interface message, traversing the benchmark node in the target benchmark interface message, determining the differential node according to the actual node name and the benchmark node name, specifically, determining the node with different node name between the actual node name and the benchmark node name as the differential node. Or, after obtaining the actual interface message and the target benchmark interface message, comparing the actual interface message with the target benchmark interface message, determining the lost nodes or the extra nodes of the actual interface Date recue/date received 2021-10-27 message comparing to the target benchmark interface message as differential nodes, to obtain the differential node set.
[0056] Step 208, determining interface message test result according to node value corresponding to the differential node in the differential node set, the interface message test result is used to determine the correctness of the actual interface message.
[0057] Wherein, the differential node set includes the differential node in the actual interface message and the differential node in the target benchmark interface message, the differential node includes node name and the correspondingly node value, determining the interface message test result according to the differential node's node name and its correspondingly node value. The interface message test result is used to determine the correctness of the actual interface message. The interface message test result includes the success and failure of the test result. If the interface message test result succeeds, the received actual interface message is correct and the test succeeds, if the interface message test result fails, the received actual interface message is faulty and the actual interface message needs to be verified and corrected.
[0058] Specifically, removing the differential node with empty node value from the differential node set, obtaining a new differential node set, determining interface message test result according to the new differential node set, if the differential nodes in the new differential node set are inconsistent, determining the interface message test result as failure test result.
[0059] Otherwise, if the differential nodes in the new differential node set are consistent, determining the target node set according to the actual interface message and the target benchmark interface message, if the targe nodes in the target node set are consistent, determining the interface message test result as successful test result. Wherein, the target node in the target node set refers to the node with the same node name in the actual interface message and the target benchmark interface message. If the node name of the target node is the same as its correspondingly node value, which means that the target nodes in the target node set are Date recue/date received 2021-10-27 consistent.
[0060] In the above-mentioned interface message test method, obtaining target benchmark interface message according to the current interface identity; determining differential node set according to the actual interface message and the target benchmark interface message; determining interface message test result according to node value corresponding to the differential node in the differential node set, the interface message test result is used to determine the correctness of the actual interface message. Obtaining differential node set by comparing the actual interface message and correspondingly target benchmark interface message, obtaining test result of interface message according to the node value corresponding to the differential node in the differential node set, which will not miss the case of empty node value or nonexistent node, test the interface message comprehensively and improve accuracy of interface message test.
[0061] In an implementation, as shown in Figure 3, the interface message test method also includes:
[0062] Step 302, obtaining candidate benchmark interface message set, the candidate benchmark interface message set includes at least one candidate benchmark interface message.
[0063] Step 304, obtaining candidate interface identity corresponding to each candidate interface.
[0064] Step 306, establishing association relation between the candidate benchmark interface message and the correspondingly candidate interface identity.
[0065] Step 308, obtaining the correspondingly target benchmark interface message according to the association relation and the current interface identity.
[0066] Wherein, the benchmark interface message corresponding to the different interface identities can Date recue/date received 2021-10-27 be different or the same, specifically can be determined based on service requirements, actual application scenarios, or product requirements. The association between the candidate interface identity and the candidate benchmark interface message can be established in advance based on service requirements, actual application scenarios, or product requirements. Specifically, obtaining candidate benchmark interface message set, the candidate benchmark interface message set includes at least one candidate benchmark interface message, the candidate interface identity corresponding to each candidate benchmark interface message can be determined based on service requirements, actual application scenarios, or product requirements, different candidate benchmark interface message can correspond to different candidate interface identity, and also correspond to the same candidate interface identity, which can be determined according to the actual requirements.
[0067] Furthermore, after determining the candidate interface identity corresponding to each candidate benchmark interface message, establishing association relation between the candidate benchmark interface message and the correspondingly candidate interface identity, when receiving the actual interface message, obtaining the target benchmark interface message matched with the current interface identity according to the association relation and the current interface identity carried in the actual interface message. Specifically, obtaining the candidate interface identity corresponding to each candidate benchmark interface message, determining the candidate interface message corresponding to the candidate identity with the same identity as the current interface identity to be the target benchmark interface message corresponding to the current interface identity.
[0068] In an implementation, as shown in Figure 4, determining differential node set according to the actual interface message and the target benchmark interface message, comprising:
[0069] Step 402, traversing actual node name in the actual interface message.
[0070] Step 404, traversing benchmark node name in the target benchmark interface message.

Date recue/date received 2021-10-27
[0071] Step 406, determining differential node and forming differential node set, wherein the differential node is the node with different actual node name from the benchmark node name.
[0072] Among them, this differential node set is composed of at least one differential node, and the differential node refers to the different node between the actual interface message and the target benchmark interface message, the differential node can be the node with different field name between the actual interface message and the target benchmark interface message, also can be the node with different field value between the actual interface message and the target benchmark interface message, or can be the lost node of the actual interface message comparing to the target benchmark interface message, or can be the extra node of the actual interface message comparing to the targe benchmark interface message. All these nodes can be used as differential nodes to form a differential node set.
[0073] Specifically, after obtaining the actual interface message and the target benchmark interface message, traversing all actual nodes in the actual interface message, traversing the benchmark node in the target benchmark interface message, determining the differential node according to the actual node name and benchmark node name, specifically, determining the node with different actual node name and benchmark node name as the differential node. Or, after obtaining the actual interface message and the target benchmark interface message, comparing the actual interface message with the target benchmark interface message, determining the lost nodes and extra nodes of the actual interface message comparing to the target benchmark interface message as the differential nodes, and then obtaining a differential node set.
[0074] For example, the target benchmark interface message:
[0075] {
"testl" : "1", "test3" :

Date recue/date received 2021-10-27
[0076] Wherein, the actual interface message:
[0077] {
"testl" : "1", "test2" :
}
[0078] Specifically, determining the nodes with different node names between the actual node name and the benchmark node name as the differential nodes, then the differential nodes are: test3 in the target benchmark interface message and test2 in the actual interface message.
[0079] In an implementation, as shown in Figure 5, determining the interface message test result according to the node value corresponding to the differential node in the differential node set, comprising:
[0080] Step 502, removing the differential node with empty node value from the differential node set, obtaining a new differential node set.
[0081] Step 504, if differential nodes in the new differential node set are inconsistent, determining the test result of interface message as failure test result of interface message.
[0082] Specifically, after obtaining the differential node set, determining the interface message test result according to the node value corresponding to the differential node in the differential node set. Specifically, removing the differential node with empty node value from the differential node set, obtaining a new differential node set.

Date recue/date received 2021-10-27
[0083] For example, the target benchmark interface message:
[0084] {
"testl" : "1", "test3" :
}
[0085] Wherein, the actual interface message:
[0086] {
"testl" : "1", "test2" :
[0087] Specifically, determining the node with different node name between the actual node and the benchmark node as the differential node, the differential node set includes:
test3 in the target benchmark interface message and test2 in the actual interface message. Wherein, the node values of test3 and test2 are empty, therefore, removing the test3 and test2 from the differential node set, obtaining a new differential node set, the new differential node set does not have differential node.
[0088] Furthermore, after obtaining the new differential node set, determining the interface message test result according to the differential nodes in the new differential node set, if the differential nodes in the new differential node set are inconsistent, determining the interface message test result as failure test result.
Wherein, the inconsistency of the differential nodes in the new differential node set includes different node names and values of the differential nodes in the new differential node set, then determining as inconsistency. The inconsistency of the differential nodes in the new different node set indicates that the actual interface message and the target benchmark interface message are different, then the actual interface Date recue/date received 2021-10-27 message exists a problem, and the interface message test result is failure.
Among them, in another implementation, a switch can be set to control whether the differential node with empty node value needs to be removed from the differential node set, specifically can be determined according to business requirements, product requirements or application scenarios, by default, the switch is generally adopted if needs to remove the differential node with empty node value from the differential node set.
[0089] In an implementation, as shown in Figure 6, the interface message test method also includes:
[0090] Step 602, if differential nodes in the new differential node set are consistent, determining the target node set according to the actual interface message and the target benchmark interface message.
[0091] Step 604, if target nodes in the target node set are consistent, determining the test result of interface message as successful test result of interface message.
[0092] Wherein, if differential nodes in the new differential node set are consistent, determining the target node set according to the actual interface message and the target benchmark interface message; if target nodes in the target node set are consistent, determining the test result of interface message as successful test result of interface message. Among them, the target node in the target node set refers to the node with the same node name between the actual interface message and the benchmark interface message. If the node name of the target node and its correspondingly node value are all the same, which means that the target nodes in the target node set are consistent.
[0093] Among them, the target node in the target node set can be specifically comparing the actual interface message and the target benchmark interface message, determining the node with the same node name and node value as the target node, in other words, after determining the differential node between the actual interface message and the target benchmark interface message, the remaining nodes can all be as the target nodes.

Date recue/date received 2021-10-27
[0094] Among them, the consistency of the target node in the target node set can be, the node names of the target node and its correspondingly node values are the same, determining the interface message test result as successful test result, indicating that there is no difference between the actual interface message and the target benchmark interface message, then the actual interface message does not exist problem, and the interface test result is successful test result.
[0095] For example, the target benchmark interface message:
[0096] {
"testl" : "1", "test3" :
[0097] Wherein, the actual interface message:
[0098] {
"testl" : "1", "test2" :
[0099] Specifically, determining the node with different node name between the actual node and the benchmark node as the differential node, the differential node set includes:
test3 in the target benchmark interface message and test2 in the actual interface message, the target node is: testl, in the actual interface message and the target benchmark interface message, the node values corresponding to the target node testl are all 1, then determining the interface message test result is successful test result.

Date recue/date received 2021-10-27
[0100] In an implementation, as shown in Figure 7, determining the target node set according to the actual interface message and the target benchmark interface message, comprising:
[0101] Step 702, traversing actual node name in the actual interface message.
[0102] Step 704, traversing benchmark node name in the target benchmark interface message.
[0103] Step 706, determining target node and forming target node set, wherein the target node is the node with the same actual node name as the benchmark node name.
[0104] Wherein, the target node in the target node set refers to the node with the same node names between the actual interface message and the target benchmark interface message. If the node names of the target nodes and correspondingly node values are the same, indicating that the target nodes in the target node set are consistent.
[0105] Among them, determining the target node can specifically be traversing actual node name in the actual interface message, traversing benchmark node name in the target benchmark interface message, determining target node and forming target node set, wherein the target node is the node with the same actual node name as the benchmark node name. In other words, comparing the actual interface message with the target benchmark interface message, determining the nodes with the same node names between the actual interface message and the target benchmark interface message as the target nodes. In another implementation, after determining the differential node by the actual interface message and the target benchmark interface message, the remaining nodes can all be the target nodes.
[0106] For example, the target benchmark interface message:
[0107] {

Date recue/date received 2021-10-27 "testl" : "1", "test3" :
[0108] Wherein, the actual interface message:
[0109] {
"testl" : "1", "test2" :
[0110] Specifically, determining the node with different node name between the actual node and the benchmark node as the differential node, the differential node set includes:
test3 in the target benchmark interface message and test2 in the actual interface message, the target node is: testl.
[0111] In an implementation, as shown in Figure 8, when target nodes in the target node set are consistent, comprising:
[0112] Step 802, if node names corresponding to the target nodes in the target node set are the same and node values corresponding to the target nodes are the same, determining of the target nodes in the target node set are consistent.
[0113] Step 804, if the target nodes include plural target child nodes, when the number of the target child nodes corresponding to the target node in the actual interface message is the same as the number of the target child nodes corresponding to the target node in the benchmark interface message, obtaining the target child node names and target child node values corresponding to the target child nodes in the actual interface message and the target benchmark interface message.

Date recue/date received 2021-10-27
[0114] Step 806, if the target child node names are the same and the target child node values are the same, determining of the target nodes in the target node set are consistent.
[0115] Wherein, if the node names corresponding to the target nodes are the same and the node values corresponding to the target nodes are the same, indicating that there is no difference between the actual interface message and the target benchmark interface message, determining of the target nodes in the target node set are consistent. Specifically, comparing the actual interface message with the target benchmark interface message, determining the nodes with the same node names between the actual interface message and the target benchmark interface message as the target nodes, if the node values corresponding to the target nodes in the actual interface message and the node values corresponding to the target benchmark interface message are the same, determining of the target nodes in the target node set are consistent.
[0116] Among them, if the target nodes include plural target child nodes, according to whether the number of the target child nodes in the target node is consistent in the actual interface message and the target benchmark interface message, if the number of the target child nodes corresponding to the target node in the actual interface message is the same as the number of the target child nodes corresponding to the target node in the target benchmark interface message, obtaining the target child nodes names and the target child nodes values corresponding to the target child nodes in the actual interface message and the target benchmark interface message, if the target child nodes names are the same and the target child nodes values are the same, determining of the target nodes in the target not set are consistent.
[0117] Wherein, if the number of the target child nodes corresponding to the target node in the actual interface message is not the same as the number of the target child nodes corresponding to the target node in the target benchmark interface message, then directly determining of the interface message test result is failure test result.
Date recue/date received 2021-10-27
[0118] For example, the target benchmark interface message:
[0119] {
"testl" : "1", "test2" : [{
"test3" : "1", {
"test3": "2",
[0120] 1
[0121] Wherein, the actual interface message:
[0122] {
"testi" : "1", "test2" : [{
"test3" : "3", {
"test3": "2", }, {
"test3": "1",
[0123] Wherein, if the target node test2 contains plural target child nodes, the number of the target child nodes corresponding to the target node in the actual interface message is bigger than the number of the Date recue/date received 2021-10-27 target child nodes corresponding to the target node in the target benchmark interface message, in other words, the number of the target child nodes corresponding to the target node in the actual interface message is not the same as the number of the target child nodes corresponding to the target node in the target benchmark interface message, then directly determining of the interface message test result is failure test result.
[0124] Wherein, if the number of the target child nodes corresponding to the target node in the actual interface message is the same as the number of the target child nodes corresponding to the target node in the target benchmark interface message, obtaining the target child nodes names and the target child nodes values corresponding to the target child nodes in the actual interface message and the target benchmark interface message, if the target child nodes names are the same and the target child nodes values are the same, determining of the target nodes in the target not set are consistent.
Otherwise, if the target child nodes names are the same and the target child nodes values are not the same, determining of the interface message test result is failure test result. Among them, in another implementation, a switch can be set to control whether perform sequence detection between each target child node, specifically can be set according to business requirements, product requirements or application scenarios.
[0125] In a specific implementation, an interface message test method is provided with following specific steps:
[0126] 1. Obtaining candidate benchmark interface message set, the candidate benchmark interface message set includes at least one candidate benchmark interface message.
[0127] 2. Obtaining candidate interface identity corresponding to each candidate interface.
[0128] 3. Establishing association relation between the candidate benchmark interface message and the correspondingly candidate interface identity.

Date recue/date received 2021-10-27
[0129] 4. Obtaining actual interface message, the actual interface message carries the current interface identity.
[0130] 5. Obtaining target benchmark interface message according to the association relation and the current interface identity.
[0131] 6. Determining differential node set according to the actual interface message and the target benchmark interface message.
[0132] 6-1. Traversing actual node name in the actual interface message.
[0133] 6-2. Traversing benchmark node name in the target benchmark interface message.
[0134] 6-3. Determining differential node and forming differential node set, wherein the differential node is the node with different actual node name from the benchmark node name.
[0135] 7. Determining interface message test result according to node value corresponding to the differential node in the differential node set, the interface test result is used to determine the correctness of the actual interface message.
[0136] 7-1. Removing the differential node with empty node value from the differential node set, obtaining a new differential node set.
[0137] 7-2. If differential nodes in the new differential node set are inconsistent, determining the test result of interface message as failure test result of interface message.

Date recue/date received 2021-10-27
[0138] 7-3. If differential nodes in the new differential node set are consistent, determining the target node set according to the actual interface message and the target benchmark interface message.
[0139] 7-3-1. Traversing actual node name in the actual interface message.
[0140] 7-3-2. Traversing benchmark node name in the target benchmark interface message.
[0141] 7-3-3. Determining target node and forming target node set, wherein the target node is the node with the same actual node name as the benchmark node name.
[0142] 7-4. If target nodes in the target node set are consistent, determining the test result of interface message as successful test result of interface message.
[0143] 7-4-1. If node names corresponding to the target nodes in the target node set are the same and node values corresponding to the target nodes are the same, determining of the target nodes in the target node set are consistent.
[0144] 7-4-1. If the number of the target child nodes corresponding to the target node in the actual interface message is the same as the number of the target child nodes corresponding to the target node in the benchmark interface message, obtaining the target child node names and target child node values corresponding to the target child nodes in the actual interface message and the target benchmark interface message.
[0145] 7-4-2. If the target child node names are the same and the target child node values are the same, determining of the target nodes in the target node set are consistent.
[0146] It should be understood that although the above-mentioned steps in the flowchart are shown in Date recue/date received 2021-10-27 sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly instruction in this article, there is no strict order in which these steps can be performed, and they can be performed in any other orders. In addition, at least parts of the appended drawings in the steps can include more sub steps or multiple stages, these sub steps or stages are not necessarily completed at the same time but can be executed in different time, the execution order of these sub steps or stages is also not necessarily in sequence order but can be performed alternately with the other steps or sub steps of other steps or at least one part of the other stages.
[0147] In an implementation, as shown in Figure 9, an interface message test apparatus 900 is provided, comprising: actual interface message obtaining module 902, benchmark interface message obtaining module 904, differential node set determining module 906 and interface message test result determining module 908, wherein:
[0148] An actual interface message obtaining module 902 for obtaining actual interface message, the actual interface message carries the current interface identity.
[0149] A benchmark interface message obtaining module 904 for obtaining target benchmark interface message according to the current interface identity.
[0150] A differential node set determining module 906 for determining differential node set according to the actual interface message and the target benchmark interface message.
[0151] An interface message test result determining module 908 for determining interface message test result according to node value corresponding to the differential node in the differential node set, the interface message test result is used to determine the correctness of the actual interface message.
[0152] In an implementation, an interface message test apparatus 900 is also used for obtaining candidate Date recue/date received 2021-10-27 benchmark interface message set, the candidate benchmark interface message set includes at least one candidate benchmark interface message, obtaining candidate interface identity corresponding to each candidate interface, establishing association relation between the candidate benchmark interface message and the correspondingly candidate interface identity.
[0153] In the present implementation, the benchmark interface message obtaining module 904 is also used for obtaining correspondingly target benchmark interface message according to the association relation and the current interface identity.
[0154] In an implementation, the differential node set determining module 906 is also used for traversing actual node name in the actual interface message, traversing benchmark node name in the target benchmark interface message, determining target node and forming target node set, wherein the target node is the node with the same actual node name as the benchmark node name.
[0155] In an implementation, the interface message test result determining module 908 is also used for removing the differential node with empty node value from the differential node set, obtaining a new differential node set, if differential nodes in the new differential node set are inconsistent, detennining the test result of interface message as failure test result of interface message.
[0156] In an implementation, the interface message test apparatus 900 is also used when differential nodes in the new differential node set are consistent, determining the target node set according to the actual interface message and the target benchmark interface message, if target nodes in the target node set are consistent, determining the test result of interface message as successful test result of interface message.
[0157] In an implementation, the interface message test apparatus 900 is also used for traversing actual node name in the actual interface message, traversing benchmark node name in the target benchmark interface message, determining target node and forming target node set, wherein the target node is the node Date recue/date received 2021-10-27 with the same actual node name as the benchmark node name.
[0158] In an implementation, the interface message test apparatus 900 is also used when node names corresponding to the target nodes in the target node set are the same and node values corresponding to the target nodes are the same, determining of the target nodes in the target node set are consistent.
[0159] In an implementation, if the target node include plural target child nodes, the interface message test apparatus 900 is also used when the number of the target child nodes corresponding to the target node in the actual interface message is the same as the number of the target child nodes corresponding to the target node in the benchmark interface message, obtaining the target child node names and target child node values corresponding to the target child nodes in the actual interface message and the target benchmark interface message, if the target child node names are the same and the target child node values are the same, determining of the target nodes in the target node set are consistent.
[0160] For the specific limitation of the interface message test apparatus can refer to the above-mentioned the interface message test method, which will not be repeated here. Each module of the above data cache apparatus can be achieved fully or partly by software, hardware, and their combinations. The above modules can be embedded in the processor or independent of the processor in computer device and can store in the memory of computer device in form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0161] In an implementation, a computer device is provided to be a server and whose internal structure diagram is shown in Figure 10. The computer device includes a processor, a memory, a network interface, and a database connected through a system bus. The processor of the computer device is configured to provide calculation and control capabilities. The memory of computer device includes non-volatile storage medium and internal memory. The memory of non-volatile storage medium has operation system, computer programs and database. The internal memory provides an environment for the operation system and Date recue/date received 2021-10-27 computer program running in a non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection.
The computer program is executed by the processor to implement an interface message test method.
[0162] In an implementation, a computer device is provided to be a server and whose internal structure diagram is shown in Figure 11. The computer device includes a processor, a memory, a network interface, and a database connected through a system bus. The processor of the computer device is configured to provide calculation and control capabilities. The memory of computer device includes non-volatile storage medium and internal memory. The memory of non-volatile storage medium has operation system, computer programs and database. The internal memory provides an environment for the operation system and computer program running in a non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection.
The computer program is executed by the processor to implement an interface message test method. The computer device's display monitor can be LCD monitor or electronic ink display monitor, the input apparatus of the computer device can be the touch layer on the display monitor, also can be button, trackball, or touchpad, and can be the external keyboard, touchpad, or mouse, etc.
[0163] The skilled in the art can understand that the structure shown in Figure 10 and Figure 11 is only partial structural diagram related this application solution and not constitute limitation to the computer device applied on the current application solution, the specific computer device can include more or less components than what is shown in the figure, or combinations of some components or different components to what is shown in the figure.
[0164] In an implementation, the processor performs the following steps when executing the computer program: obtaining actual interface message, the actual interface message carries the current interface identity; obtaining target benchmark interface message according to the current interface identity;
determining differential node set according to the actual interface message and the target benchmark Date recue/date received 2021-10-27 interface message; determining interface message test result according to node value corresponding to the differential node in the differential node set, the interface message test result is used to determine the correctness of the actual interface message.
[0165] In an implementation, the processor performs the following steps when executing the computer program: obtaining candidate benchmark interface message set, the candidate benchmark interface message set includes at least one candidate benchmark interface message; obtaining candidate interface identity corresponding to each candidate interface; establishing association relation between the candidate benchmark interface message and the correspondingly candidate interface identity; obtaining the correspondingly target benchmark interface message according to the current interface identity, comprising:
obtaining the correspondingly target benchmark interface message according to the association relation and the current interface identity.
[0166] In an implementation, the processor performs the following steps when executing the computer program: traversing actual node name in the actual interface message;
traversing benchmark node name in the target benchmark interface message; determining differential node and forming differential node set, wherein the differential node is the node with different actual node name from the benchmark node name.
[01671 In an implementation, the processor performs the following steps when executing the computer program: removing the differential node with empty node value from the differential node set, obtaining a new differential node set; if differential nodes in the new differential node set are inconsistent, determining the test result of interface message as failure test result of interface message.
[0168] In an implementation, the processor performs the following steps when executing the computer program: if differential nodes in the new differential node set are consistent, determining the target node set according to the actual interface message and the target benchmark interface message; if target nodes in the target node set are consistent, determining the test result of interface message as successful test result Date recue/date received 2021-10-27 of interface message.
[0169] In an implementation, the processor performs the following steps when executing the computer program: traversing actual node name in the actual interface message;
traversing benchmark node name in the target benchmark interface message; determining target node and forming target node set, wherein the target node is the node with the same actual node name as the benchmark node name.
[0170] In an implementation, the processor performs the following steps when executing the computer program: if node names corresponding to the target nodes in the target node set are the same and node values corresponding to the target nodes are the same, determining of the target nodes in the target node set are consistent; if the target nodes include plural target child nodes, the method also comprises: if the number of the target child nodes corresponding to the target node in the actual interface message is the same as the number of the target child nodes corresponding to the target node in the benchmark interface message, obtaining the target child node names and target child node values corresponding to the target child nodes in the actual interface message and the target benchmark interface message; if the target child node names are the same and the target child node values are the same, determining of the target nodes in the target node set are consistent.
[0171] In an implementation, a computer readable storage medium stored with a computer program configured to achieve the following steps when the processor executes the computer program: obtaining actual interface message, the actual interface message carries the current interface identity; obtaining target benchmark interface message according to the current interface identity;
detelinining differential node set according to the actual interface message and the target benchmark interface message; determining interface message test result according to node value corresponding to the differential node in the differential node set, the interface message test result is used to determine the correctness of the actual interface message.
[0172] In an implementation, the processor performs the following steps when executing the computer Date recue/date received 2021-10-27 program: obtaining candidate benchmark interface message set, the candidate benchmark interface message set includes at least one candidate benchmark interface message; obtaining candidate interface identity corresponding to each candidate interface; establishing association relation between the candidate benchmark interface message and the correspondingly candidate interface identity; obtaining the correspondingly target benchmark interface message according to the current interface identity, comprising:
obtaining the correspondingly target benchmark interface message according to the association relation and the current interface identity.
[0173] In an implementation, the processor performs the following steps when executing the computer program: traversing actual node name in the actual interface message;
traversing benchmark node name in the target benchmark interface message; determining differential node and forming differential node set, wherein the differential node is the node with different actual node name from the benchmark node name.
[0174] In an implementation, the processor performs the following steps when executing the computer program: removing the differential node with empty node value from the differential node set, obtaining a new differential node set; if differential nodes in the new differential node set are inconsistent, determining the test result of interface message as failure test result of interface message.
[0175] In an implementation, the processor performs the following steps when executing the computer program: if differential nodes in the new differential node set are consistent, determining the target node set according to the actual interface message and the target benchmark interface message; if target nodes in the target node set are consistent, determining the test result of interface message as successful test result of interface message.
[0176] In an implementation, the processor performs the following steps when executing the computer program: traversing actual node name in the actual interface message;
traversing benchmark node name in the target benchmaric interface message; determining target node and forming target node set, wherein the Date recue/date received 2021-10-27 target node is the node with the same actual node name as the benchmark node name.
[0177] In an implementation, the processor performs the following steps when executing the computer program: if node names corresponding to the target nodes in the target node set are the same and node values corresponding to the target nodes are the same, determining of the target nodes in the target node set are consistent; if the target nodes include plural target child nodes, the method also comprises: if the number of the target child nodes corresponding to the target node in the actual interface message is the same as the number of the target child nodes corresponding to the target node in the benchmark interface message, obtaining the target child node names and target child node values corresponding to the target child nodes in the actual interface message and the target benchmark interface message; if the target child node names are the same and the target child node values are the same, determining of the target nodes in the target node set are consistent.
[0178] The skilled in the art can understand that all or partial of procedures from the above-mentioned methods can be performed by computer program instructions through related hardware, the mentioned computer program can be stored in a non-volatile material computer readable storage medium, this computer can include various implementation procedures from the abovementioned methods when execution. Any reference to the memory, the storage, the database, or the other media used in each implementation provided in current application can include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), programable ROM (PROM), electrically programmable ROM (EPRPMD), electrically erasable programmable ROM (EEPROM) or flash memory.
Volatile memory can include random access memory (RAM) or external cache memory. As an instruction but not limited to, RAM is available in many forms such as static RAM (SRAM), dynamic RAM
(DRAMD), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SRAM
(ESDRAM), synchronal link (Synchlink) DRAM (SLDRAM), memory bus (Rambus), direct RAM
(RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM
(RDRAM), etc.

Date recue/date received 2021-10-27 [0179] The technical features of the above-mentioned implementations can be randomly combined, for concisely statement, not all possible combinations of technical features in the abovementioned implementations are described. However, if there are no conflicts in the combinations of these technical features, it shall be within the scope of this descriptions.
[0180] The above-mentioned implementations are only several implementations in this disclosure and the description is more specific and detailed but cannot be understood as the limitation of the scope of the invention patent. Evidently those ordinary skilled in the art can make various modifications and variations to the disclosure without departing from the spirit and scope of the disclosure. Therefore, the appended claims are intended to be construed as encompassing the described embodiment and all the modifications and variations coming into the scope of the disclosure.

Date recue/date received 2021-10-27

Claims (272)

Claims:
1. An apparatus comprising:
an actual interface message obtaining module configured to obtain the actual interface message, wherein the actual interface message carries current interface identity;
a benchmark interface message obtaining module configured to obtain target benchmark interface message according to the current interface identity;
a differential node set determining module configured to determine differential node set according to the actual interface message and the target benchmark interface message;
an interface message test result determining module configured to determine interface message test result according to node value corresponding to differential node in the differential node set, wherein the interface message test result determines correctness of the actual interface message;
the benchmark interface message obtaining module further configured to obtain candidate benchmark interface message set, wherein the candidate benchmark interface message set includes a candidate benchmark interface message;
the actual interface message obtaining module further configured to obtain candidate interface identity corresponding to each candidate interface; and the interface message test result determining module further configured to establish association relation between the candidate benchmark interface message and the candidate interface identity.
2. The apparatus of claim 1, wherein the benchmark interface message obtaining module further configured to:

Date Recue/Date Received 2023-12-18 obtain the target benchmark interface message according to the association relation and the current interface identity.
3. The apparatus of claim 2, wherein the differential node set determining module further configured to:
traverse actual node name in the actual interface message;
traverse benchmark node name in the target benchmark interface message; and determine the differential node and forming the differential node set, wherein the differential node is node with different actual node name from the benchmark node name.
4. The apparatus of claim 3, wherein the interface message test result determining module further configured to:
remove the differential node with empty node value from the differential node set;
obtain a new differential node set; and wherein the differential node in the new differential node set is inconsistent, determine the interface message test result as failure test result of interface message.
5. The apparatus of claim 4, further comprises:
wherein the differential node in the new differential node set is consistent, determining target node set according to the actual interface message and the target benchmark interface message; and wherein target nodes in the target node set are consistent, determining the interface message test result as successful test result of the interface message.
6. The apparatus of claim 5, wherein determining the target node set according to the actual interface message and the target benchmark interface message, comprises:
Date Recue/Date Received 2023-12-18 traversing actual node name in the actual interface message;
traversing benchmark node name in the target benchmark interface message; and determining the target node and forming the target node set, wherein the target node is a node with same actual node name as the benchmark node name.
7. The apparatus of claim 6, wherein the target nodes in the target node set are consistent, comprises:
wherein the node names corresponding to the target nodes in the target node set are same and the node values corresponding to the target nodes are same, determining of the target nodes in the target node set are consistent.
8. The apparatus of claim 7, further comprises:
wherein number of target child nodes corresponding to the target node in the actual interface message is same as the number of the target child nodes corresponding to the target node in benchmark interface message, obtaining target child node names and target child node values corresponding to the target child nodes in the actual interface message and the target benchmark interface message; and wherein the target child node names are same and the target child node values are same, determining of the target nodes in the target node set are consistent.
9. The apparatus of claim 8, wherein each module is achieved fully or partly by machine-executable code, hardware, and their combinations.
10. The apparatus of claim 9, wherein each module is embedded in a processor or independent of the processor in computer device and stores in a memory of the computer device in form of the machine-executable code.
11. The apparatus of claim 10, wherein a terminal communicates with a server through a network.

Date Recue/Date Received 2023-12-18
12. The apparatus of claim 11, wherein the terminal includes personal computers, laptops, smart phones, tablets and portable wearable devices.
13. The apparatus of claim 12, wherein the server includes an independent server or a server cluster composed of plural servers.
14. The apparatus of claim 13, wherein the actual interface message refers to the interface message obtained through current interface, wherein the current interface corresponds to the current interface identity, which uniquely identifies the current interface.
15. The apparatus of claim 14, wherein different interface corresponds to a different interface identity.
16. The apparatus of claim 15, wherein interface application programming interface (API) is pre-defined functions which provides application and developer with ability to access a set of routines based on a piece of the machine-executable code or hardware without having to access source code or understanding details of inner workflows.
17. The apparatus of claim 16, wherein the interface message is message data obtained through application programming interface.
18. The apparatus of claim 17, wherein the interface message is data unit exchanged and transmitted in the network, wherein a data block sent by a site in one time.
19. The apparatus of claim 18, wherein the interface message contains complete data information, wherein length of each message is very different, wherein number of interface messages is unlimited and variable.
20. The apparatus of claim 19, wherein obtaining the actual interface message by calling the current interface corresponding to the current interface identity, which carries the current interface identity.

Date Recue/Date Received 2023-12-18
21. The apparatus of claim 20, wherein the target benchmark interface message refers to correct interface message corresponding to the current interface identity, checks the correctness of the actual interface message.
22. The apparatus of claim 21, wherein the benchmark interface message corresponding to the different interface identity are different or same, are determined based on service requirements, actual application scenarios, or product requirements.
23. The apparatus of claim 22, wherein the differential node set is composed of the differential node, and the differential node refers to the differennal node between the actual interface message and the target benchmark interface message.
24. The apparatus of claim 23, wherein the differential node is the node with different field name between the actual interface message and the target benchmark interface message.
25. The apparatus of claim 24, wherein the differential node is the node with different field value between the actual interface message and the target benchmark interface message.
26. The apparatus of claim 25, wherein the differential node is a lost node of the actual interface message comparing to the target benchmark interface message.
27. The apparatus of claim 26, wherein the differential node is an extra node of the actual interface message comparing to the target benchmark interface message.
28. The apparatus of claim 27, wherein all differential nodes are differential nodes to form the differential node set.
29. The apparatus of claim 28, wherein the interface message test result includes success and failure of test result.
30. The apparatus of claim 29, wherein the interface message test result succeeds, received actual interface message is correct and test succeeds.

Date Recue/Date Received 2023-12-18
31. The apparatus of claim 30, wherein the interface message test result fails, received actual interface message is faulty and the actual interface message needs to be verified and corrected.
32. The apparatus of claim 31, wherein association between the candidate interface identity and the candidate benchmark interface message is established in advance based on the service requirements, the actual application scenarios, or the product requirements.
33. The apparatus of claim 32, wherein obtaining the candidate benchmark interface message set, the candidate benchmark interface message set includes the candidate benchmark interface message, wherein the candidate interface identity corresponding to the candidate benchmark interface message are determined based on the service requirements, the actual application scenarios, or the product requirements, wherein different candidate benchmark interface message corresponds to a different candidate interface identity, and corresponds to a same candidate interface identity, which is determined according to actual requirements.
34. The apparatus of claim 33, wherein a switch controls whether the differential node with the empty node value are removed from the differential node set, determined according to business requirements, the product requirements or the actual application scenarios.
35. The apparatus of claim 34, wherein the switch is adopted to remove the differential node with the empty node value from the differential node set.
36. A method comprising:
obtaining actual interface message, wherein the actual interface message carries current interface identity;
obtaining target benchmark interface message according to the current interface identity;

Date Recue/Date Received 2023-12-18 determining differential node set according to the actual interface message and the target benchmark interface message;
determining interface message test result according to node value corresponding to differential node in the differential node set, wherein the interface message test result determines correctness of the actual interface message;
obtaining candidate benchmark interface message set, wherein the candidate benchmark interface message set includes a candidate benchmark interface message;
obtaining candidate interface identity corresponding to each candidate interface; and establishing association relation between the candidate benchmark interface message and the candidate interface identity.
37. The method of claim 36, wherein obtaining the target benchmark interface message according to the current interface identity, comprises:
obtaining the target benchmark interface message according to the association relation and the current interface identity.
38. The method of claim 37, wherein determining the differential node set according to the actual interface message and the target benchmark interface message, comprises:
traversing actual node name in the actual interface message;
traversing benchmark node name in the target benchmark interface message; and determining the differential node and forming the differential node set, wherein the differential node is node with different actual node name from the benchmark node name.
Date Recue/Date Received 2023-12-18
39. The method of claim 38, wherein determining the interface message test result according to the node value corresponding to the differential node in the differential node set, comprises:
removing the differential node with empty node value from the differential node set;
obtaining a new differential node set; and wherein the differential node in the new differential node set is inconsistent, determining the interface message test result as failure test result of interface message.
40. The method of claim 39, further comprises:
wherein the differential node in the new differential node set is consistent, determining target node set according to the actual interface message and the target benchmark interface message; and wherein target nodes in the target node set are consistent, determining the interface message test result as successful test result of the interface message.
41. The method of claim 40, wherein determining the target node set according to the actual interface message and the target benchmark interface message, comprises:
traversing actual node name in the actual interface message;
traversing benchmark node name in the target benchmark interface message; and determining the target node and fo filling the target node set, wherein the target node is a node with same actual node name as the benchmark node name.
42. The method of claim 41, wherein the target nodes in the target node set are consistent, comprises:

Date Recue/Date Received 2023-12-18 wherein node names corresponding to the target nodes in the target node set are same and the node values corresponding to the target nodes are same, determining of the target nodes in the target node set are consistent.
43. The method of claim 42, further comprises:
wherein number of target child nodes corresponding to the target node in the actual interface message is same as the number of the target child nodes corresponding to the target node in benchmark interface message, obtaining target child node names and target child node values corresponding to the target child nodes in the actual interface message and the target benchmark interface message; and wherein the target child node names are same and the target child node values are same, determining of the target nodes in the target node set are consistent.
44. The method of claim 43, wherein a terminal communicates with a server through a network.
45. The method of claim 44, wherein the terminal includes personal computers, laptops, smart phones, tablets and portable wearable devices.
46. The method of claim 45, wherein the server includes an independent server or a server cluster composed of plural servers.
47. The method of claim 46, wherein the actual interface message refers to the interface message obtained through current interface, wherein the current interface corresponds to the current interface identity, which uniquely identifies the current interface.
48. The method of claim 47, wherein different interface corresponds to a different interface identity.

Date Recue/Date Received 2023-12-18
49. The method of claim 48, wherein interface application programming interface (API) is pre-defined functions which provides application and developer with ability to access a set of routines based on a piece of machine-executable code or hardware without having to access source code or understanding details of inner workflows.
50. The method of claim 49, wherein the interface message is message data obtained through application programming interface.
51. The method of claim 50, wherein the interface message is data unit exchanged and transmitted in the network, wherein a data block sent by a site in one time.
52. The method of claim 51, wherein the interface message contains complete data information, wherein length of each message is very different, wherein number of interface messages is unlimited and variable.
53. The method of claim 52, wherein obtaining the actual interface message by calling the current interface corresponding to the current interface identity, which carries the current interface identity.
54. The method of claim 53, wherein the target benchmark interface message refers to correct interface message corresponding to the current interface identity, checks the correctness of the actual interface message.
55. The method of claim 54, wherein the benchmark interface message corresponding to the different interface identity are different or same, are determined based on service requirements, actual application scenarios, or product requirements.
56. The method of claim 55, wherein the differential node set is composed of the differential node, and the differential node refers to the differential node between the actual interface message and the target benchmark interface message.
57. The method of claim 56, wherein the differential node is the node with different field name between the actual interface message and the target benchmark interface message.

Date Recue/Date Received 2023-12-18
58. The method of claim 57, wherein the differential node is the node with different field value between the actual interface message and the target benchmark interface message.
59. The method of claim 58, wherein the differential node is a lost node of the actual interface message comparing to the target benchmark interface message.
60. The method of claim 59, wherein the differential node is an extra node of the actual interface message comparing to the target benchmark interface message.
61. The method of claim 60, wherein all differential nodes are differential nodes to form the differential node set.
62. The method of claim 61, wherein the interface message test result includes success and failure of test result.
63. The method of claim 62, wherein the interface message test result succeeds, received actual interface message is correct and test succeeds.
64. The method of claim 63, wherein the interface message test result fails, received actual interface message is faulty and the actual interface message needs to be verified and corrected.
65. The method of claim 64, wherein association between the candidate interface identity and the candidate benchmark interface message is established in advance based on the service requirements, the actual application scenarios, or the product requirements.

Date Recue/Date Received 2023-12-18
66. The method of claim 65, wherein obtaining the candidate benchmark interface message set, the candidate benchmark interface message set includes the candidate benchmark interface message, wherein the candidate interface identity corresponding to the candidate benchmark interface message are determined based on the service requirements, the actual application scenarios, or the product requirements, wherein different candidate benchmark interface message corresponds to a different candidate interface identity, and corresponds to a same candidate interface identity, which is determined according to actual requirements.
67. The method of claim 66, wherein a switch controls whether the differential node with the empty node value are removed from the differential node set, determined according to business requirements, the product requirements or the actual application scenarios.
68. The method of claim 67, wherein the switch is adopted to remove the differential node with the empty node value ftom the differential node set.
69. A computer device comprising:
a memory including a nonvolatile storage medium and an internal memory, wherein an operating system, machine-executable code, and databases are stored in the nonvolatile storage medium, wherein the internal memory provides operation environment for execution of the operating system and the machine-executable code stored in the nonvolatile storage medium;
a network interface communicates with an external terminal through a network connection;
the database connected by system bus;
a processor configured to provide calculation and control capabilities;
the machine-executable code on the processor configured to:
Date Recue/Date Received 2023-12-18 obtain actual interface message, wherein the actual interface message carries current interface identity;
obtain target benchmark interface message according to the current interface identity;
determine differential node set according to the actual interface message and the target benchmark interface message;
determine interface message test result according to node value corresponding to differential node in the differential node set, wherein the interface message test result determines correctness of the actual interface message;
obtain candidate benchmark interface message set, wherein the candidate benchmark interface message set includes a candidate benchmark interface message;
obtain candidate interface identity corresponding to each candidate interface; and establish association relation between the candidate benchmark interface message and the candidate interface identity.
70. The device of claim 69, wherein obtaining the target benchmark interface message according to the current interface identity, comprises:
obtaining the taxget benchmark interface message according to the association relation and the current interface identity.
71. The device of claim 70, wherein determining the differential node set according to the actual interface message and the target benchmark interface message, comprises:
traversing actual node name in the actual interface message;

Date Recue/Date Received 2023-12-18 traversing benchmark node name in the target benchmark interface message; and determining the differential node and forming the differential node set, wherein the differential node is node with different actual node name from the benchmark node name.
72. The device of claim 71, wherein determining the interface message test result according to the node value corresponding to the differential node in the differential node set, comprises:
removing the differential node with empty node value from the differential node set;
obtaining a new differential node set; and wherein the differential node in the new differential node set is inconsistent, determining the interface message test result as failure test result of interface message.
73. The device of claim 72, further comprises:
wherein the differential node in the new differential node set is consistent, determining target node set according to the actual interface message and the target benchmark interface message; and wherein target nodes in the target node set are consistent, determining the interface message test result as successful test result of the interface message.
74. The device of claim 73, wherein determining the target node set according to the actual interface message and the target benchmark interface message, comprises:
1Taversing actual node name in the actual interface message;
traversing benchmark node name in the target benchmark interface message; and Date Recue/Date Received 2023-12-18 determining the target node and forming the target node set, wherein the target node is a node with same actual node name as the benchmark node name.
75. The device of claim 74, wherein the target nodes in the target node set are consistent, comprises:
wherein node names corresponding to the target nodes in the target node set are same and the node values corresponding to the target nodes are same, determining of the target nodes in the target node set are consistent.
76. The device of claim 75, further comprises:
wherein number of target child nodes corresponding to the target node in the actual interface message is same as the number of the target child nodes corresponding to the target node in benchmark interface message, obtaining target child node names and target child node values corresponding to the target child nodes in the actual interface message and the target benchmark interface message; and wherein the target child node names are same and the target child node values are same, determining of the target nodes in the target node set are consistent.
77. The device of claim 76, wherein a terminal communicates with a server through a network.
78. The device of claim 77, wherein the terminal includes personal computers, laptops, smart phones, tablets and portable wearable devices.
79. The device of claim 78, wherein the server includes an independent server or a server cluster composed of plural servers.
80. The device of c1aim79, wherein the actual interface message refers to the interface message obtained through current interface, wherein the current interface corresponds to the current interface identity, which uniquely identifies the current interface.

Date Recue/Date Received 2023-12-18
81. The device of claim 80, wherein different interface corresponds to a different interface identity.
82. The device of claim 81, wherein interface application programming interface (API) is pre-defined functions which provides application and developer with ability to access a set of routines based on a piece of the machine-executable code or hardware without having to access source code or understanding details of inner workflows.
83. The device of claim 82, wherein the interface message is message data obtained through application programming interface.
84. The device of claim 83, wherein the interface message is data unit exchanged and transmitted in the network, wherein a data block sent by a site in one time.
85. The device of claim 84, wherein the interface message contains complete data information, wherein length of each message is very different, wherein number of interface messages is unlimited and variable.
86. The device of claim 85, wherein obtaining the actual interface message by calling the current interface corresponding to the current interface identity, which carries the current interface identity.
87. The device of claim 86, wherein the target benchmark interface message refers to correct interface message corresponding to the current interface identity, checks the correctness of the actual interface message.
88. The device of claim 87, wherein the benchmark interface message corresponding to the different interface identity are different or same, are determined based on service requirements, actual application scenarios, or product requirements.
89. The device of claim 88, wherein the differential node set is composed of the differential node, and the differential node refers to the differential node between the actual interface message and the target benchmark interface message.

Date Recue/Date Received 2023-12-18
90. The device of claim 89, wherein the differential node is the node with different field name between the actual interface message and the target benchmark interface message.
91. The device of claim 90, wherein the differential node is the node with different field value between the actual interface message and the target benchmark interface message.
92. The device of claim 91, wherein the differential node is a lost node of the actual interface message comparing to the target benchmark interface message.
93. The device of claim 92, wherein the differential node is an extra node of the actual interface message comparing to the target benchmark interface message.
94. The device of claim 93, wherein all differential nodes are differential nodes to form the differential node set.
95. The device of claim 94, wherein the interface message test result includes success and failure of test result.
96. The device of claim 95, wherein the interface message test result succeeds, received actual interface message is correct and test succeeds.
97. The device of claim 96, wherein the interface message test result fails, received actual interface message is faulty and the actual interface message needs to be verified and corrected.
98. The device of claim 97, wherein association between the candidate interface identity and the candidate benchmark interface message is established in advance based on the service requirements, the actual application scenarios, or the product requirements.
Date Recue/Date Received 2023-12-18
99. The device of claim 98, wherein obtaining the candidate benchmark interface message set, the candidate benchmark interface message set includes the candidate benchmark interface message, wherein the candidate interface identity corresponding to the candidate benchmark interface message are determined based on the service requirements, the actual application scenarios, or the product requirements, wherein different candidate benchmark interface message corresponds to a different candidate interface identity, and corresponds to a same candidate interface identity, which is determined according to actual requirements.
100. The device of claim 99, wherein a switch controls whether the differential node with the empty node value are removed from the differential node set, determined according to business requirements, the product requirements or the actual application scenarios.
101. The device of claim 100, wherein the switch is adopted to remove the differential node with the empty node value ftom the differential node set.
102. A computer readable physical memory having stored thereon a computer-executable instructions when executed by a computer, the computer is configured to:
obtain actual interface message, wherein the actual interface message carries current interface identity;
obtain target benchmark interface message according to the current interface identity;
determine differential node set according to the actual interface message and the target benchmark interface message; ;
determine interface message test result according to node value corresponding to differential node in the differential node set, wherein the interface message test result determines correctness of the actual interface message;
Obtain candidate benchmark interface message set, wherein the candidate benchmark interface message set includes a candidate benchmark interface message;

Date Recue/Date Received 2023-12-18 obtain candidate interface identity corresponding to each candidate interface;
and establish association relation between the candidate benchmark interface message and the candidate interface identity.
103. The memory of claim 102, wherein obtaining the target benchmark interface message according to the current interface identity, comprises:
obtaining the target benchmark interface message according to the association relation and the current interface identity.
104. The memory of claim 103, wherein determining the differential node set according to the actual interface message and the target benchmark interface message, comprises:
traversing actual node name in the actual interface message;
traversing benchmark node name in the target benchmark interface message; and determining the differential node and forming the differential node set, wherein the differential node is node with different actual node name from the benchmark node name.
105. The memory of claim 104, wherein determining the interface message test result according to the node value corresponding to the differential node in the differential node set, comprises:
removing the differential node with empty node value from the differential node set;
obtaining a new differential node set; and wherein the differential node in the new differential node set is inconsistent, determining the interface message test result as failure test result of interface message.
106. The memory of claim 105, further comprises:

Date Recue/Date Received 2023-12-18 wherein the differential nodes in the new differential node set are consistent, determining target node set according to the actual interface message and the target benchmark interface message; and wherein target nodes in the target node set are consistent, determining the interface message test result as successful test result of the interface message.
107. The memory of claim 106, wherein determining the target node set according to the actual interface message and the target benchmark interface message, comprises:
traversing actual node name in the actual interface message;
traversing benchmark node name in the target benchmark interface message; and determining the target node and forming the target node set, wherein the target node is a node with same actual node name as the benchmark node name.
108. The memory of claim 107, wherein the target nodes in the target node set are consistent, comprises:
wherein node names corresponding to the target nodes in the target node set are same and the node values corresponding to the target nodes are same, determining of the target nodes in the target node set are consistent.
109. The memory of claim 108, further comprises:
wherein number of target child nodes corresponding to the target node in the actual interface message is same as the number of the target child nodes corresponding to the target node in benchmark interface message, obtaining target child node names and target child node values corresponding to the target child nodes in the actual interface message and the target benchmark interface message; and wherein the target child node names are same and the target child node values are same, determining of the target nodes in the target node set are consistent.

Date Recue/Date Received 2023-12-18
110. The memory of claim 109, wherein a terminal communicates with a server through a network.
111. The memory of claim 110, wherein the terminal includes personal computers, laptops, smart phones, tablets and portable wearable devices.
112. The memory of claim 111, wherein the server includes an independent server or a server cluster composed of plural servers.
113. The memory of claim 112, wherein the actual interface message refers to the interface message obtained through current interface, wherein the current interface corresponds to the current interface identity, which uniquely identifies the current interface.
114. The memory of claim 113, wherein different interface corresponds to a different interface identity.
115. The memory of claim 114, wherein interface application programming interface (API) is pre-defined functions which provides application and developer with ability to access a set of routines based on a piece of machine-executable code or hardware without having to access source code or understanding details of inner workflows.
116. The memory of claim 115, wherein the interface message is message data obtained through application programming interface.
117. The memory of claim 116, wherein the interface message is data unit exchanged and transmitted in the network, wherein a data block sent by a site in one time.
118. The memory of claim 117, wherein the interface message contains complete data information, wherein length of each message is very different, wherein number of interface messages is unlimited and variable.
119. The memory of claim 118, wherein obtaining the actual interface message by calling the current interface corresponding to the current interface identity, which carries the current interface identity.

Date Recue/Date Received 2023-12-18
120. The memory of claim 119, wherein the target benchmark interface message refers to correct interface message corresponding to the current interface identity, checks the correctness of the actual interface message.
121. The memory of claim 120, wherein the benchmark interface message corresponding to the different interface identity are different or same, are determined based on service requirements, actual application scenarios, or product requirements.
122. The memory of claim 121, wherein the differential node set is composed of the differential node, and the differential node refers to the differential node between the actual interface message and the target benchmark interface message.
123. The memory of claim 122, wherein the differential node is the node with different field name between the actual interface message and the target benchmark interface message.
124. The memory of claim 123, wherein the differential node is the node with different field value between the actual interface message and the target benchmark interface message.
125. The memory of claim 124, wherein the differential node is a lost node of the actual interface message comparing to the target benchmark interface message.
126. The memory of claim 125, wherein the differential node is an extra node of the actual interface message comparing to the target benchmark interface message.
127. The memory of claim 126, wherein all differential nodes are differential nodes to form the differential node set.
128. The memory of claim 127, wherein the interface message test result includes success and failure of test result.
129. The memory of claim 128, wherein the interface message test result succeeds, received actual interface message is correct and test succeeds.
Date Recue/Date Received 2023-12-18
130. The memory of claim 129, wherein the interface message test result fails, the received actual interface message is faulty and the actual interface message needs to be verified and corrected.
131. The memory of claim 130, wherein association between the candidate interface identity and the candidate benchmark interface message is established in advance based on the service requirements, the actual application scenarios, or the product requirements.
132. The memory of claim 131, wherein obtaining the candidate benchmark interface message set, the candidate benchmark interface message set includes the candidate benchmark interface message, wherein the candidate interface identity corresponding to the candidate benchmark interface message are determined based on the service requirements, the actual application scenarios, or the product requirements, wherein different candidate benchmark interface message corresponds to a different candidate interface identity, and corresponds to a same candidate interface identity, which is determined according to actual requirements.
133. The memory of claim 132, wherein a switch controls whether the differential node with the empty node value are removed from the differential node set, determined according to business requirements, the product requirements or the actual application scenarios.
134. The memory of claim 133, wherein the switch is adopted to remove the differential node with the empty node value from the differential node set.
135. An apparatus comprising:
a differential node set determining module configured to determine differential node set according to an actual interface message and a target benchmark interface message;

Date Recue/Date Received 2023-12-18 an interface message test result determining module configured to determine interface message test result according to node value corresponding to differential node in the differential node set, wherein the interface message test result determines correctness of the actual interface message;
An actual interface message obtaining module configured to obtain the actual interface message, wherein the actual interface message carries current interface identity;
a benchmark interface message obtaining module configured to obtain the target benchmark interface message according to the current interface identity;
the benchmark interface message obtaining module further configured to obtain candidate benchmark interface message set, wherein the candidate benchmark interface message set includes a candidate benchmark interface message; and the actual interface message obtaining module further configured to obtain candidate interface identity corresponding to each candidate interface.
136. The apparatus of claim 135, further comprises:
establishing association relation between the candidate benchmark interface message and correspondingly candidate interface identity.
137. The apparatus of claim 136, wherein the benchmark interface message obtaining module further configured to:
obtain the target benchmark interface message according to the association relation and the current interface identity.
138. The apparatus of claim 137, wherein the differential node set determining module further configured to:

Date Recue/Date Received 2023-12-18 traverse actual node name in the actual interface message;
traverse benchmark node name in the target benchmark interface message; and determine the differential node and forming the differential node set, wherein the differential node is node with different actual node name from the benchmark node name.
139. The apparatus of claim 138, wherein the interface message test result determining module further configured to:
remove the differential node with empty node value from the differential node set;
obtain a new differential node set; and wherein the differential node in the new differential node set is inconsistent, determine the interface message test result as failure test result of interface message.
140. The apparatus of claim 139, further comprises:
wherein the differential node in the new differential node set is consistent, determining target node set according to the actual interface message and the target benchmark interface message; and wherein target nodes in the target node set are consistent, determining the interface message test result as successful test result of the interface message.
141. The apparatus of claim 140, wherein determining the target node set according to the actual interface message and the target benchmark interface message, comprises:
traversing actual node name in the actual interface message;
traversing benchmark node name in the target benchmark interface message; and Date Recue/Date Received 2023-12-18 determining the target node and forming the target node set, wherein the target node is a node with same actual node name as the benchmark node name.
142. The apparatus of claim 141, wherein the target nodes in the target node set are consistent, comprises:
wherein node names corresponding to the target nodes in the target node set are same and the node values corresponding to the target nodes are same, determining of the target nodes in the target node set are consistent.
143. The apparatus of claim 142, further comprises:
wherein number of target child nodes corresponding to the target node in the actual interface message is same as the number of the target child nodes corresponding to the target node in benchmark interface message, obtaining target child node names and target child node values corresponding to the target child nodes in the actual interface message and the target benchmark interface message; and wherein the target child node names are same and the target child node values are same, determining of the target nodes in the target node set are consistent.
144. The apparatus of claim 143, wherein each module is achieved fully or partly by machine-executable code, hardware, and their combinations.
145. The apparatus of claim 144, wherein each module is embedded in a processor or independent of the processor in computer device and stores in a memory of the computer device in fonn of the machine-executable code.
146. The apparatus of claim 145, wherein a terminal communicates with a server through a network.
147. The apparatus of claim 146, wherein the terminal includes personal computers, laptops, smart phones, tablets and portable wearable devices.

Date Recue/Date Received 2023-12-18
148. The apparatus of claim 147, wherein the server includes an independent server or a server cluster composed of plural servers.
149. The apparatus of claim 148, wherein the actual interface message refers to the interface message obtained through current interface, wherein the current interface corresponds to the current interface identity, which uniquely identifies the current interface.
150. The apparatus of claim 149, wherein different interface corresponds to a different interface identity.
151. The apparatus of claim 150, wherein interface application programming interface (API) is pre-defined functions which provides application and developer with ability to access a set of routines based on a piece of the machine-executable code or hardware without having to access source code or understanding details of inner workflows.
152. The apparatus of claim 151, wherein the interface message is message data obtained through application programming interface.
153. The apparatus of claim 152, wherein the interface message is data unit exchanged and transmitted in the network, wherein a data block sent by a site in one time.
154. The apparatus of claim 153, wherein the interface message contains complete data information, wherein length of each message is very different, wherein number of interface messages is unlimited and variable.
155. The apparatus of claim 154, wherein obtaining the actual interface message by calling the current interface corresponding to the current interface identity, which carries the current interface identity.
156. The apparatus of claim 155, wherein the target benchmark interface message refers to correct interface message corresponding to the current interface identity, checks the correctness of the actual interface message.
Date Recue/Date Received 2023-12-18
157. The apparatus of claim 156, wherein the benchmark interface message corresponding to the different interface identity are different or same, are determined based on service requirements, actual application scenarios, or product requirements.
158. The apparatus of claim 157, wherein the differential node set is composed of the differential node, and the differential node refers to the differential node between the actual interface message and the target benchmark interface message.
159. The apparatus of claim 158, wherein the differential node is the node with different field name between the actual interface message and the target benchmark interface message.
160. The apparatus of claim 159, wherein the differential node is the node with different field value between the actual interface message and the target benchmark interface message.
161. The apparatus of claim 160, wherein the differential node is a lost node of the actual interface message comparing to the target benchmark interface message.
162. The apparatus of claim 161, wherein the differential node is an extra node of the actual interface message comparing to the target benchmark interface message.
163. The apparatus of claim 162, wherein all differential nodes are differential nodes to foun the differential node set.
164. The apparatus of claim 163, wherein the interface message test result includes success and failure of test result.
165. The apparatus of claim 164, wherein the interface message test result succeeds, received actual interface message is correct and test succeeds.
166. The apparatus of claim 165, wherein the interface message test result fails, the received actual interface message is faulty and the actual interface message needs to be verified and corrected.

Date Recue/Date Received 2023-12-18
167. The apparatus of claim 166, wherein association between the candidate interface identity and the candidate benchmark interface message is established in advance based on the service requirements, the actual application scenarios, or the product requirements.
168. The apparatus of claim 167 wherein obtaining the candidate benchmark interface message set, the candidate benchmark interface message set includes the candidate benchmark interface message, wherein the candidate interface identity corresponding to the candidate benchmark interface message are determined based on the service requirements, the actual application scenarios, or the product requirements, wherein different candidate benchmark interface message corresponds to a different candidate interface identity, and corresponds to a same candidate interface identity, which is determined according to actual requirements.
169. The apparatus of claim 168, wherein a switch controls whether the differential node with the empty node value are removed ftom the differential node set, determined according to business requirements, the product requirements or the actual application scenarios.
170. The apparatus of claim 169, wherein the switch is adopted to remove the differential node with the empty node value from the differential node set.
171. A method comprising:
determining differential node set according to an actual interface message and a target benchmark interface message; and determining interface message test result according to node value corresponding to differential node in the differential node set, wherein the interface message test result determines correctness of the actual interface message;
Obtaining the actual interface message, wherein the actual interface message carries current interface identity;

Date Recue/Date Received 2023-12-18 obtaining the target benchmark interface message according to the current interface identity;
obtaining candidate benchmark interface message set, wherein the candidate benchmark interface message set includes a candidate benchmark interface message;
and obtaining candidate interface identity corresponding to each candidate interface.
172. The method of claim 171, further comprises:
establishing association relation between the candidate benchmark interface message and correspondingly candidate interface identity.
173. The method of claim 172, wherein obtaining the target benchmark interface message according to the current interface identity, comprises:
obtaining the target benchmark interface message according to the association relation and the current interface identity.
174. The method of claim 173, wherein determining the differential node set according to the actual interface message and the target benchmark interface message, comprises:
traversing actual node name in the actual interface message;
traversing benchmark node name in the target benchmark interface message; and determining the differential node and forming the differential node set, wherein the differential node is node with different actual node name from the benchmark node name.
175. The method of claim 174, wherein determining the interface message test result according to the node value corresponding to the differential node in the differential node set, comprises:

Date Recue/Date Received 2023-12-18 removing the differential node with empty node value from the differential node set;
obtaining a new differential node set; and wherein the differential node in the new differential node set is inconsistent, determining the interface message test result as failure test result of interface message.
176. The method of claim 175, further comprises:
wherein the differential node in the new differential node set is consistent, determining target node set according to the actual interface message and the target benchmark interface message; and wherein target nodes in the target node set are consistent, determining the interface message test result as successful test result of the interface message.
177. The method of claim 176, wherein determining the target node set according to the actual interface message and the target benchmark interface message, comprises:
traversing actual node name in the actual interface message;
traversing benchmark node name in the target benchmark interface message; and determining the target node and forming the target node set, wherein the target node is a node with same actual node name as the benchmark node name.
178. The method of claim 177, wherein the target nodes in the target node set are consistent, comprises:
wherein node names corresponding to the target nodes in the target node set are same and the node values corresponding to the target nodes are same, determining of the target nodes in the target node set are consistent.
179. The method of claim 178, further comprises:

Date Recue/Date Received 2023-12-18 wherein number of target child nodes corresponding to the target node in the actual interface message is same as the number of the target child nodes corresponding to the target node in benchmark interface message, obtaining target child node names and target child node values corresponding to the target child nodes in the actual interface message and the target benchmark interface message; and wherein the target child node names are same and the target child node values are same, determining of the target nodes in the target node set are consistent.
180. The method of claim 179, wherein a terminal communicates with a server through a network.
181. The method of claim 180, wherein the terminal includes personal computers, laptops, smart phones, tablets and portable wearable devices.
182. The method of claim 181, wherein the server includes an independent server or a server cluster composed of plural servers.
183. The method of claim 182, wherein the actual interface message refers to the interface message obtained through current interface, wherein the current interface corresponds to the current interface identity, which uniquely identifies the current interface.
184. The method of claim 183, wherein different interface corresponds to a different interface identity.
185. The method of claim 184, wherein interface application programming interface (API) is pre-defined functions which provides application and developer with ability to access a set of routines based on a piece of machine-executable code or hardware without having to access source code or understanding details of inner workflows.
186. The method of claim 185, wherein the interface message is message data obtained through application programming interface.
Date Recue/Date Received 2023-12-18
187. The method of claim 186, wherein the interface message is data unit exchanged and transmitted in the network, wherein a data block sent by a site in one time.
188. The method of claim 187, wherein the interface message contains complete data information, wherein length of each message is very different, wherein number of interface messages is unlimited and variable.
189. The method of claim 188, wherein obtaining the actual interface message by calling the current interface corresponding to the current interface identity, which canies the current interface identity.
190. The method of claim 189, wherein the target benchmark interface message refers to correct interface message corresponding to the current interface identity, checks the correctness of the actual interface message.
191. The method of claim 190, wherein the benchmark interface message corresponding to the different interface identity are different or same, are determined based on service requirements, actual application scenarios, or product requirements.
192. The method of claim 191, wherein the differential node set is composed of the differential node, and the differential node refers to the differential node between the actual interface message and the target benchmark interface message.
193. The method of claim 192, wherein the differential node is the node with different field name between the actual interface message and the target benchmark interface message.
194. The method of claim 193, wherein the differential node is the node with different field value between the actual interface message and the target benchmark interface message.
195. The method of claim 194, wherein the differential node is a lost node of the actual interface message comparing to the target benchmark interface message.
196. The method of claim 195, wherein the differential node is an extra node of the actual interface message comparing to the target benchmark interface message.

Date Recue/Date Received 2023-12-18
197. The method of claim 196, wherein all differential nodes are differential nodes to form the differential node set.
198. The method of claim 197, wherein the interface message test result includes success and failure of test result.
199. The method of claim 198, wherein the interface message test result succeeds, received actual interface message is correct and test succeeds.
200. The method of claim 199, wherein the interface message test result fails, the received actual interface message is faulty and the actual interface message needs to be verified and corrected.
201. The method of claim 200, wherein association between the candidate interface identity and the candidate benchmark interface message is established in advance based on the service requirements, the actual application scenarios, or the product requirements.
202. The method of claim 201, wherein obtaining the candidate benchmark interface message set, the candidate benchmark interface message set includes the candidate benchmark interface message, wherein the candidate interface identity corresponding to the candidate benchmark interface message are determined based on the service requirements, the actual application scenarios, or the product requirements, wherein different candidate benchmark interface message corresponds to a different candidate interface identity, and corresponds to a same candidate interface identity, which is determined according to actual requirements.
203. The method of claim 202, wherein a switch controls whether the differential node with the empty node value are removed from the differential node set, determined according to business requirements, the product requirements or the actual application scenarios.
204. The method of claim 203, wherein the switch is adopted to remove the differential node with the empty node value from the differential node set.

Date Recue/Date Received 2023-12-18
205. A computer device comprising:
a memory including a nonvolatile storage medium and an internal memory, wherein an operating system, machine-executable code, and databases are stored in the nonvolatile storage medium, wherein the internal memory provides operation environment for execution of the operating system and the co machine-executable code stored in the nonvolatile storage medium;
a network Interface communicates with an external terminal through a network connection;
the database connected by system bus;
a processor configured to provide calculation and control capabilities;
the machine-executable code on the processor configured to:
determine differential node set according to an actual interface message and a target benchmark interface message; and determine interface message test result according to node value corresponding to differential node in the differential node set, wherein the interface message test result determines correctness of the actual interface message;
obtain the actual interface message, wherein the actual interface message carries current interface identity;
obtain the target benchmark interface message according to the current interface identity;

Date Recue/Date Received 2023-12-18 obtain candidate benchmark interface message set, wherein the candidate benchmark interface message set includes a candidate benchmark interface message; and obtain candidate interface identity corresponding to each candidate interface.
206. The device of claim 205, further comprises:
establishing association relation between the candidate benchmark interface message and correspondingly candidate interface identity.
207. The device of claim 206, wherein obtaining the target benchmark interface message according to the current interface identity, comprises:
obtaining the target benchmark interface message according to the association relation and the current interface identity.
208. The device of claim 207, wherein determining the differential node set according to the actual interface message and the target benchmark interface message, comprises:
traversing actual node name in the actual interface message;
traversing benchmark node name in the target benchmark interface message; and determining the differential node and forming the differential node set, wherein the differential node is node with different actual node name from the benchmark node name.
209. The device of claim 208, wherein determining the interface message test result according to the node value corresponding to the differential node in the differential node set, comprises:
removing the differential node with empty node value from the differential node set;

Date Recue/Date Received 2023-12-18 obtaining a new differential node set; and wherein the differential node in the new differential node set is inconsistent, determining the interface message test result as failure test result of interface message.
210. The device of claim 209, further comprises:
wherein the differential node in the new differential node set is consistent, determining target node set according to the actual interface message and the target benchmark interface message; and wherein target nodes in the target node set are consistent, determining the interface message test result as successful test result of the interface message.
211. The device of claim 210, wherein determining the target node set according to the actual interface message and the target benchmark interface message, comprises:
traversing actual node name in the actual interface message;
traversing benchmark node name in the target benchmark interface message; and determining the target node and forming the target node set, wherein the target node is a node with same actual node name as the benchmark node name.
212. The device of claim 211, wherein the target nodes in the target node set are consistent, comprises:
wherein node names corresponding to the target nodes in the target node set are same and the node values corresponding to the target nodes are same, determining of the target nodes in the target node set are consistent.
213. The device of claim 212, further comprises:
Date Recue/Date Received 2023-12-18 wherein number of target child nodes corresponding to the target node in the actual interface message is same as the number of the target child nodes corresponding to the target node in benchmark interface message, obtaining target child node names and target child node values corresponding to the target child nodes in the actual interface message and the target benchmark interface message; and wherein the target child node names are same and the target child node values are same, determining of the target nodes in the target node set are consistent.
214. The device of claim 213, wherein a terminal communicates with a server through a network.
215. The device of claim 214, wherein the terminal includes personal computers, laptops, smart phones, tablets and portable wearable devices.
216. The device of claim 215, wherein the server includes an independent server or a server cluster composed of plural servers.
217. The device of claim 216, wherein the actual interface message refers to the interface message obtained through current interface, wherein the current interface corresponds to the current interface identity, which uniquely identifies the current interface.
218. The device of claim 217, wherein different interface corresponds to a different interface identity.
219. The device of claim 218, wherein interface application programming interface (API) is pre-defined functions which provides application and developer with ability to access a set of routines based on a piece of the machine-executable code or hardware without having to access source code or understanding details of inner workflows.
220. The device of claim 219, wherein the interface message is message data obtained through application programming interface.

Date Recue/Date Received 2023-12-18
221. The device of claim 220, wherein the interface message is data unit exchanged and transmitted in the network, wherein a data block sent by a site in one time.
222. The device of claim 221, wherein the interface message contains complete data information, wherein length of each message is very different, wherein number of interface messages is unlimited and variable.
223. The device of claim 222, wherein obtaining the actual interface message by calling the current interface corresponding to the current interface identity, which canies the current interface identity.
224. The device of claim 223, wherein the target benchmark interface message refers to correct interface message corresponding to the current interface identity, checks the correctness of the actual interface message.
225. The device of claim 224, wherein the benchmark interface message corresponding to the different interface identity are different or same, are determined based on service requirements, actual application scenarios, or product requirements.
226. The device of claim 225, wherein the differential node set is composed of the differential node, and the differential node refers to the differential node between the actual interface message and the target benchmark interface message.
227. The device of claim 226, wherein the differential node is the node with different field name between the actual interface message and the target benchmark interface message.
228. The device of claim 227, wherein the differential node is the node with different field value between the actual interface message and the target benchmark interface message.
229. The device of claim 228, wherein the differential node is a lost node of the actual interface message comparing to the target benchmark interface message.
230. The device of claim 229, wherein the differential node is an extra node of the actual interface message comparing to the target benchmark interface message.

Date Recue/Date Received 2023-12-18
231. The device of claim 230, wherein all differential nodes are differential nodes to form the differential node set.
232. The device of claim 231, wherein the interface message test result includes success and failure of test result.
233. The device of claim 232, wherein the interface message test result succeeds, received actual interface message is correct and test succeeds.
234. The device of claim 233, wherein the interface message test result fails, the received actual interface message is faulty and the actual interface message needs to be verified and corrected.
235. The device of claim 234, wherein association between the candidate interface identity and the candidate benchmark interface message is established in advance based on the service requirements, the actual application scenarios, or the product requirements.
236. The device of claim 235, wherein obtaining the candidate benchmark interface message set, the candidate benchmark interface message set includes the candidate benchmark interface message, wherein the candidate interface identity corresponding to the candidate benchmark interface message are determined based on the service requirements, the actual application scenarios, or the product requirements, wherein different candidate benchmark interface message corresponds to a different candidate interface identity, and corresponds to a same candidate interface identity, which is determined according to actual requirements.
237. The device of claim 236, wherein a switch controls whether the differential node with the empty node value are removed from the differential node set, determined according to business requirements, the product requirements or the actual application scenarios.
238. The device of claim 237, wherein the switch is adopted to remove the differential node with the empty node value from the differential node set.

Date Recue/Date Received 2023-12-18
239. A computer readable physical memory having stored thereon a computer-executable instructions when executed by a computer, the computer is configured to:
determine differential node set according to an actual interface message and a target benchmark interface message;
determine interface message test result according to node value corresponding to differential node in the differential node set, wherein the interface message test result determines correctness of the actual interface message;
obtaining the actual interface message, wherein the actual interface message carries current interface identity;
obtaining the target benchmark interface message according to the current interface identity;
obtain candidate benchmark interface message set, wherein the candidate benchmark interface message set includes a candidate benchmark interface message; and obtain candidate interface identity corresponding to each candidate interface.
240. The memory of claim 239, further comprises:
establishing association relation between the candidate benchmark interface message and correspondingly candidate interface identity.
241. The memory of claim 240, wherein obtaining the target benchmark interface message according to the current interface identity, comprises:
obtaining the target benchmark interface message according to the association relation and the current interface identity.
242. The memory of claim 241, wherein determining the differential node set according to the actual interface message and the target benchmark interface message, comprises:

Date Recue/Date Received 2023-12-18 traversing actual node name in the actual interface message;
traversing benchmark node name in the target benchmark interface message; and determining the differential node and forming the differential node set, wherein the differential node is node with different actual node name from the benchmark node name.
243. The memory of claim 242, wherein determining the interface message test result according to the node value corresponding to the differential node in the differential node set, comprises:
removing the differential node with empty node value from the differential node set;
obtaining a new differential node set; and wherein the differential node in the new differential node set is inconsistent, determining the interface message test result as failure test result of interface message.
244. The memory of claim 243, further comprises:
wherein the differential node in the new differential node set is consistent, determining target node set according to the actual interface message and the target benchmark interface message; and wherein target nodes in the target node set are consistent, determining the interface message test result as successful test result of the interface message.
245. The memory of claim 244, wherein determining the target node set according to the actual interface message and the target benchmark interface message, comprises:
traversing actual node name in the actual interface message;
traversing benchmark node name in the target benchmark interface message; and Date Recue/Date Received 2023-12-18 determining the target node and forming the target node set, wherein the target node is a node with same actual node name as the benchmark node name.
246. The memory of claim 245, wherein the target nodes in the target node set are consistent, comprises:
wherein node names corresponding to the target nodes in the target node set are same and the node values corresponding to the target nodes are same, determining of the target nodes in the target node set are consistent.
247. The memory of claim 246, further comprises:
wherein number of target child nodes corresponding to the target node in the actual interface message is same as the number of the target child nodes corresponding to the target node in benchmark interface message, obtaining target child node names and target child node values corresponding to the target child nodes in the actual interface message and the target benchmark interface message; and wherein the target child node names are same and the target child node values are same, determining of the target nodes in the target node set are consistent.
248. The memory of claim 247, wherein a terminal communicates with a server through a network.
249. The memory of claim 248, wherein the terminal includes personal computers, laptops, smart phones, tablets and portable wearable devices.
250. The memory of claim 249, wherein the server includes an independent server or a server cluster composed of plural servers.
251. The memory of claim 250, wherein the actual interface message refers to the interface message obtained through current interface, wherein the current interface corresponds to the current interface identity, which uniquely identifies the current interface.

Date Recue/Date Received 2023-12-18
252. The memory of claim 251, wherein different interface corresponds to a different interface identity.
253. The memory of claim 252, wherein interface application programming interface (API) is pre-defined functions which provides application and developer with ability to access a set of routines based on a piece of machine-executable code or hardware without having to access source code or understanding details of inner workflows.
254. The memory of claim 253, wherein the interface message is message data obtained through application programming interface.
255. The memory of claim 254, wherein the interface message is data unit exchanged and transmitted in the network, wherein a data block sent by a site in one time.
256. The memory of claim 255, wherein the interface message contains complete data information, wherein length of each message is very different, wherein number of interface messages is unlimited and variable.
257. The memory of claim 256, wherein obtaining the actual interface message by calling the current interface corresponding to the current interface identity, which carries the current interface identity.
258. The memory of claim 257, wherein the target benchmark interface message refers to correct interface message corresponding to the current interface identity, checks the correctness of the actual interface message.
259. The memory of claim 258, wherein the benchmark interface message corresponding to the different interface identity are different or same, are determined based on service requirements, actual application scenarios, or product requirements.
260. The memory of claim 259, wherein the differential node set is composed of the differential node, and the differential node refers to the differential node between the actual interface message and the target benchmark interface message.

Date Recue/Date Received 2023-12-18
261. The memory of claim 260, wherein the differential node is the node with different field name between the actual interface message and the target benchmark interface message.
262. The memory of claim 261, wherein the differential node is the node with different field value between the actual interface message and the target benchmark interface message.
263. The memory of claim 262, wherein the differential node is a lost node of the actual interface message comparing to the target benchmark interface message.
264. The memory of claim 263, wherein the differential node is an extra node of the actual interface message comparing to the target benchmark interface message.
265. The memory of claim 264, wherein all differential nodes are differential nodes to form the differential node set.
266. The memory of claim 265, wherein the interface message test result includes success and failure of test result.
267. The memory of claim 266, wherein the interface message test result succeeds, received actual interface message is correct and test succeeds.
268. The memory of claim 267, wherein the interface message test result fails, the received actual interface message is faulty and the actual interface message needs to be verified and corrected.
269. The memory of claim 268, wherein association between the candidate interface identity and the candidate benchmark interface message is established in advance based on the service requirements, the actual application scenarios, or the product requirements.

Date Recue/Date Received 2023-12-18
270. The memory of claim 269, wherein obtaining the candidate benchmark interface message set, the candidate benchmark interface message set includes the candidate benchmark interface message, wherein the candidate interface identity corresponding to the candidate benchmark interface message are determined based on the service requirements, the actual application scenarios, or the product requirements, wherein different candidate benchmark interface message corresponds to a different candidate interface identity, and corresponds to a same candidate interface identity, which is determined according to actual requirements.
271. The memory of claim 270, wherein a switch controls whether the differential node with the empty node value are removed from the differential node set, determined according to business requirements, the product requirements or the actual application scenarios.
272. The memory of claim 271, wherein the switch is adopted to remove the differential node with the empty node value ftom the differential node set.

Date Recue/Date Received 2023-12-18
CA3129150A 2020-08-31 2021-08-27 Interface message test method and device, computer equipment and storage medium Active CA3129150C (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010895798.6 2020-08-31
CN202010895798.6A CN112165406B (en) 2020-08-31 2020-08-31 Interface message testing method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CA3129150A1 CA3129150A1 (en) 2022-02-28
CA3129150C true CA3129150C (en) 2024-02-27

Family

ID=73857306

Family Applications (1)

Application Number Title Priority Date Filing Date
CA3129150A Active CA3129150C (en) 2020-08-31 2021-08-27 Interface message test method and device, computer equipment and storage medium

Country Status (2)

Country Link
CN (1) CN112165406B (en)
CA (1) CA3129150C (en)

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4467147A (en) * 1982-07-16 1984-08-21 At&T Bell Laboratories Switching network for interactive access and testing of subscriber loops
IT1264602B1 (en) * 1993-06-15 1996-10-04 Sits Soc It Telecom Siemens TELEPHONE SIGNALING PROCESSOR GENERATED BY TAX MEASUREMENTS FOR DIGITAL MOBILE RADIO SYSTEMS
CN101335648A (en) * 2008-07-25 2008-12-31 中兴通讯股份有限公司 Automatic converting method for packets of different interfaces and apparatus thereof
CN103023720B (en) * 2012-12-04 2016-03-09 迈普通信技术股份有限公司 A kind of system and method testing Wide Area Network interface performance
US20180167303A1 (en) * 2016-12-09 2018-06-14 Cyara Solutions Pty Ltd Case-based automated email testing
CN107453784A (en) * 2017-07-25 2017-12-08 南方电网科学研究院有限责任公司 Communication interface sensitivity test method and system
CN110399293B (en) * 2019-06-21 2024-05-03 平安科技(深圳)有限公司 System test method, device, computer equipment and storage medium
CN110399932A (en) * 2019-07-31 2019-11-01 中国工商银行股份有限公司 Soft Clause in Letter of Credit recognition methods and device
CN110806973A (en) * 2019-10-11 2020-02-18 苏宁云计算有限公司 Automatic generation method and device of interface message
CN111026645B (en) * 2019-11-20 2023-11-28 航天信息股份有限公司 User interface automatic test method and device, storage medium and electronic equipment
CN111159049B (en) * 2019-12-31 2023-11-17 中国银行股份有限公司 Automatic interface testing method and system
CN111177005B (en) * 2019-12-31 2024-04-16 中国银行股份有限公司 Service application testing method, device, server and storage medium

Also Published As

Publication number Publication date
CN112165406A (en) 2021-01-01
CA3129150A1 (en) 2022-02-28
CN112165406B (en) 2022-09-20

Similar Documents

Publication Publication Date Title
CN109474578B (en) Message checking method, device, computer equipment and storage medium
CN108304553B (en) Data migration method and device, computer equipment and storage medium
CN110569035A (en) Code compiling method, device, equipment and storage medium of software development project
CN108848142B (en) Message pushing method and device, computer equipment and storage medium
CN110781070B (en) Big data test verification method and device, computer equipment and storage medium
CN113326181A (en) Fuzzy test method, device and storage medium for stateful network protocol
CN106843947B (en) Method and device for processing code defects
US20150186195A1 (en) Method of analysis application object which computer-executable, server performing the same and storage media storing the same
CN109542962B (en) Data processing method, data processing device, computer equipment and storage medium
CN112817935A (en) Data processing method, device and equipment based on field type and storage medium
US12089143B2 (en) Network search method and apparatus, device and storage medium
CN108762787B (en) Software repairing method, device, computer equipment and storage medium
CN109086077A (en) A kind of operation method and device of application program
CN111522881B (en) Service data processing method, device, server and storage medium
CA3129150C (en) Interface message test method and device, computer equipment and storage medium
CN112463783A (en) Index data monitoring method and device, computer equipment and storage medium
CN112612706A (en) Automated testing method, computer device and storage medium
CN114546705B (en) Operation response method, operation response device, electronic apparatus, and storage medium
CN110019262B (en) Data updating method and device
CN110704218B (en) Data processing method, data processing device, computer equipment and storage medium
CN110334905B (en) Project fault display method, device, computer equipment and storage medium
CN111124814A (en) SOC memory access monitoring method and device and computer equipment
CN116719791A (en) Information processing method, device, electronic equipment and storage medium
CN112860564A (en) Code detection method, server, user terminal, computer device and storage medium
CN111209187B (en) Service request processing method, device, computer equipment and storage medium

Legal Events

Date Code Title Description
EEER Examination request

Effective date: 20220916

EEER Examination request

Effective date: 20220916

EEER Examination request

Effective date: 20220916

EEER Examination request

Effective date: 20220916

EEER Examination request

Effective date: 20220916

EEER Examination request

Effective date: 20220916

EEER Examination request

Effective date: 20220916

EEER Examination request

Effective date: 20220916

EEER Examination request

Effective date: 20220916

EEER Examination request

Effective date: 20220916

EEER Examination request

Effective date: 20220916

EEER Examination request

Effective date: 20220916

EEER Examination request

Effective date: 20220916