CN113704131A - Interface function testing method and device, storage medium and equipment - Google Patents
Interface function testing method and device, storage medium and equipment Download PDFInfo
- Publication number
- CN113704131A CN113704131A CN202111037336.1A CN202111037336A CN113704131A CN 113704131 A CN113704131 A CN 113704131A CN 202111037336 A CN202111037336 A CN 202111037336A CN 113704131 A CN113704131 A CN 113704131A
- Authority
- CN
- China
- Prior art keywords
- data item
- message
- interface
- content
- information
- 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.)
- Granted
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 49
- 238000013507 mapping Methods 0.000 claims abstract description 32
- 238000000034 method Methods 0.000 claims abstract description 15
- 230000006870 function Effects 0.000 claims description 64
- 230000008569 process Effects 0.000 abstract description 8
- 238000010586 diagram Methods 0.000 description 7
- 230000003993 interaction Effects 0.000 description 3
- 238000011161 development Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000010998 test method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3696—Methods or tools to render software testable
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Human Computer Interaction (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application discloses an interface function testing method, an interface function testing device, a storage medium and equipment, which are used for analyzing an interface document of a system to be tested to obtain a mapping relation between a message data item and an interface data item. And capturing interface elements from the interface of the system to be tested, and acquiring the analysis result of the message. And associating the content of the message data item with the content of the interface data item according to the mapping relation to obtain each information item pair. And comparing the content of the message data item with the content of the interface data item to obtain a comparison result for each information item pair. And counting the number of information item pairs with different message data item contents and interface data item contents indicated by the comparison result to obtain a first numerical value. And sending prompt information to the user when the first numerical value is larger than the preset threshold value. According to the scheme, the comparison process of the content of the message data item and the content of the interface data item does not need to be manually participated, the efficiency of interface function testing can be improved, and the operation risk caused by human factors can be reduced.
Description
Technical Field
The present application relates to the field of computer software, and in particular, to a method, an apparatus, a storage medium, and a device for testing interface functions.
Background
During the testing process of the financial system, a testing scenario of formatted message data interaction with a third-party supervision authority or a client is often encountered. Aiming at the test scene of formatted message data interaction, under the ideal condition that the development progress, the test environment and the personnel organization of the two parties can be fully matched, the testers of the two parties can carry out joint debugging test, compare the data of respective systems and confirm the correctness of data interaction. In most cases, the resources to be transferred in the joint debugging test may not meet the test requirements at the initial stage of the test, and when such a situation occurs, the interface functions (including the message parsing function and the message generating function) of the system of the local system are usually tested first to ensure the successful performance of the subsequent joint debugging test.
At present, no matter the function of analyzing the message is tested, or the function of generating the message is tested, manual intervention in the testing process is needed, and the workload of manual participation is large, so that the efficiency of interface function testing is reduced.
Disclosure of Invention
The application provides an interface function testing method, an interface function testing device, a storage medium and equipment, and aims to improve the efficiency of interface function testing.
In order to achieve the above object, the present application provides the following technical solutions:
an interface function testing method comprises the following steps:
acquiring an interface document of a system to be tested, and analyzing the interface document to obtain a mapping relation between a message data item and an interface data item;
capturing interface elements from the interface of the system to be tested; the interface element comprises a plurality of interface data items and interface data item contents corresponding to each interface data item;
obtaining the analysis result of the message; the analysis result comprises a plurality of message data items and message data item contents corresponding to each message data item;
according to the mapping relation, associating the content of the message data item corresponding to each message data item with the content of the interface data item corresponding to each interface data item to obtain each information item pair; the information item pair comprises the message data item content and interface data item content associated with the message data item content;
for each information item pair, comparing the content of the message data item shown by the information item pair with the content of the interface data item shown by the information item pair to obtain a comparison result of the information item pair;
counting the number of information item pairs with different contents of the comparison result indicating message data items and interface data items to obtain a first numerical value;
sending prompt information to a user under the condition that the first numerical value is larger than a preset threshold value; and the prompt information is used for indicating that the interface function of the system to be tested has a fault.
Optionally, the obtaining an analysis result of the packet includes:
under the condition that the message received by the system to be tested is detected, obtaining the analysis result of the message; the analysis result is obtained by analyzing the message through the system to be tested;
and sending prompt information to the user when the first numerical value is larger than a preset threshold value, wherein the prompt information comprises:
sending a first prompt message to a user under the condition that the first numerical value is larger than a preset threshold value; the first prompt message is used for indicating that the function of analyzing the message of the system to be tested has a fault.
Optionally, the obtaining an analysis result of the packet includes:
under the condition that the message generated by the system to be tested is detected, analyzing the message to obtain an analysis result of the message;
and sending prompt information to the user when the first numerical value is larger than a preset threshold value, wherein the prompt information comprises:
sending a second prompt message to the user when the first numerical value is larger than a preset threshold value; and the second prompt message is used for indicating that the message generating function of the system to be tested has a fault.
Optionally, associating, according to the mapping relationship, a content of a packet data item corresponding to each packet data item with a content of an interface data item corresponding to each interface data item to obtain each information item pair, including:
generating an interface element table based on each interface data item and the interface data item content corresponding to each interface data item;
generating a message analysis table based on each message data item and the content of the message data item corresponding to each message data item;
and according to the mapping relation, associating the content of the message data item corresponding to each message data item shown in the message analysis table with the content of the interface data item corresponding to each interface data item shown in the interface element table to obtain each information item pair.
An interface function testing device, comprising:
the analysis unit is used for acquiring an interface document of the system to be tested and analyzing the interface document to obtain a mapping relation between the message data item and the interface data item;
the grabbing unit is used for grabbing interface elements from the interface of the system to be tested; the interface element comprises a plurality of interface data items and interface data item contents corresponding to each interface data item;
the acquisition unit is used for acquiring the analysis result of the message; the analysis result comprises a plurality of message data items and message data item contents corresponding to each message data item;
the association unit is used for associating the content of the message data item corresponding to each message data item with the content of the interface data item corresponding to each interface data item according to the mapping relation to obtain each information item pair; the information item pair comprises the message data item content and interface data item content associated with the message data item content;
the comparison unit is used for comparing the content of the message data item shown by the information item pair with the content of the interface data item shown by the information item pair to obtain a comparison result of the information item pair;
the statistical unit is used for counting the number of information item pairs with different contents of the comparison result indicating message data items and interface data items to obtain a first numerical value;
the prompting unit is used for sending prompting information to a user under the condition that the first numerical value is larger than a preset threshold value; and the prompt information is used for indicating that the interface function of the system to be tested has a fault.
Optionally, the obtaining unit is specifically configured to:
under the condition that the message received by the system to be tested is detected, obtaining the analysis result of the message; the analysis result is obtained by analyzing the message through the system to be tested;
the prompting unit is specifically used for sending first prompting information to a user under the condition that the first numerical value is larger than a preset threshold value; the first prompt message is used for indicating that the function of analyzing the message of the system to be tested has a fault.
Optionally, the obtaining unit is specifically configured to:
under the condition that the message generated by the system to be tested is detected, analyzing the message to obtain an analysis result of the message;
the prompting unit is specifically used for sending second prompting information to the user under the condition that the first numerical value is larger than a preset threshold value; and the second prompt message is used for indicating that the message generating function of the system to be tested has a fault.
Optionally, the alignment unit is specifically configured to:
generating an interface element table based on each interface data item and the interface data item content corresponding to each interface data item;
generating a message analysis table based on each message data item and the content of the message data item corresponding to each message data item;
and according to the mapping relation, associating the content of the message data item corresponding to each message data item shown in the message analysis table with the content of the interface data item corresponding to each interface data item shown in the interface element table to obtain each information item pair.
A computer-readable storage medium comprising a stored program, wherein the program performs the interface function testing method.
An interface function testing apparatus comprising: a processor, a memory, and a bus; the processor and the memory are connected through the bus;
the memory is used for storing programs, and the processor is used for running programs, wherein the interface function testing method is executed when the programs run.
According to the technical scheme, the interface document of the system to be tested is obtained, the interface document is analyzed, and the mapping relation between the message data item and the interface data item is obtained. And capturing interface elements from an interface of the system to be tested, and acquiring an analysis result of the message, wherein the analysis result comprises a plurality of message data items and message data item contents corresponding to each message data item. And according to the mapping relation, associating the content of the message data item corresponding to each message data item with the content of the interface data item corresponding to each interface data item to obtain each information item pair. And for each information item pair, comparing the content of the message data item shown by the information item pair with the content of the interface data item shown by the information item pair to obtain a comparison result of the information item pair. And counting the number of information item pairs with different message data item contents and interface data item contents indicated by the comparison result to obtain a first numerical value. And sending prompt information to the user when the first numerical value is larger than the preset threshold value. The prompt message is used for indicating that the interface function of the system to be tested has a fault. According to the scheme, the comparison process of the content of the message data item and the content of the interface data item does not need to be manually participated, the efficiency of interface function testing can be improved, and the operation risk caused by human factors can be effectively reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of an interface function testing method according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of another interface function testing method provided in the embodiment of the present application;
fig. 3 is a schematic diagram of another interface function testing method provided in the embodiment of the present application;
fig. 4 is a schematic structural diagram of an interface function testing apparatus according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Taking the test of the message parsing function of the system as an example, as shown in fig. 1, a schematic diagram of an interface function test method provided in the embodiment of the present application is shown, which includes the following steps:
s101: and acquiring an interface document of the system to be tested, and analyzing the interface document to obtain the mapping relation between the message data item and the interface data item.
The mapping relationship between the message data item and the interface data item can be shown in table 1.
TABLE 1
Message data item | Interface data item |
Itemname | Subject of accounting |
Transtype | Type of transaction |
Planlicid | Asset code |
Startdate | Date of start |
It should be noted that the contents shown in table 1 are only for illustration.
S102: and grabbing interface elements from the interface of the system to be tested.
The interface element comprises a plurality of interface data items and interface data item contents corresponding to each interface data item.
S103: and generating an interface element table based on the interface data items and the interface data item content corresponding to each interface data item.
The interface element table shown in the embodiment of the present application can be referred to as table 2.
TABLE 2
Interface data item | Interface data item content |
Subject of accounting | Real income fund |
Type of transaction | 99 |
Asset code | 123456 |
Date of start | 20190701 |
It should be noted that the contents shown in table 2 are only for illustration.
S104: and acquiring the analysis result of the message under the condition that the message received by the system to be tested is detected.
The analysis result is obtained by analyzing the message through the system to be tested, and the analysis result comprises a plurality of message data items and message data item contents corresponding to each message data item.
S105: and generating a message analysis table based on each message data item and the content of the message data item corresponding to each message data item.
The message parsing table shown in the embodiment of the present application may be referred to as table 3.
TABLE 3
Message data item | Content of message data item |
Itemname | Real income fund |
Transtype | 99 |
Planlicid | 123456 |
Startdate | 20190701 |
It should be noted that the contents shown in table 3 are only for illustration.
S106: and according to the mapping relation between the message data items and the interface data items, associating the content of the message data items corresponding to each message data item shown in the message analysis table with the content of the interface data items corresponding to each interface data item shown in the interface element table to obtain each information item pair.
Wherein each information item pair comprises message data item content and interface data item content associated with the message data item content.
S107: and for each information item pair, comparing the content of the message data item shown by the information item pair with the content of the interface data item shown by the information item pair to obtain a comparison result of the information item pair.
S108: and counting the number of information item pairs with different message data item contents and interface data item contents indicated by the comparison result to obtain a first numerical value.
S109: and if the first numerical value is larger than the preset threshold value, sending first prompt information to the user.
The first prompt message is used for indicating that the function of analyzing the message of the system to be tested has a fault.
In summary, the scheme shown in this embodiment does not need to manually participate in the comparison process between the content of the message data item and the content of the interface data item, so that the efficiency of the interface function test can be improved, and the operational risk caused by human factors can be effectively reduced.
Taking the test of the message generating function of the system as an example, as shown in fig. 2, a schematic diagram of another interface function testing method provided in the embodiment of the present application includes the following steps:
s201: and acquiring an interface document of the system to be tested, and analyzing the interface document to obtain the mapping relation between the message data item and the interface data item.
S202: and grabbing interface elements from the interface of the system to be tested.
The interface element comprises a plurality of interface data items and interface data item contents corresponding to each interface data item.
S203: and generating an interface element table based on the interface data items and the interface data item content corresponding to each interface data item.
S204: and under the condition that the message generated by the system to be tested is detected, analyzing the message to obtain an analysis result of the message.
The analysis result comprises a plurality of message data items and message data item contents corresponding to each message data item.
S205: and generating a message analysis table based on each message data item and the content of the message data item corresponding to each message data item.
S206: and according to the mapping relation between the message data items and the interface data items, associating the content of the message data items corresponding to each message data item shown in the message analysis table with the content of the interface data items corresponding to each interface data item shown in the interface element table to obtain each information item pair.
Wherein each information item pair comprises message data item content and interface data item content associated with the message data item content.
S207: and for each information item pair, comparing the content of the message data item shown by the information item pair with the content of the interface data item shown by the information item pair to obtain a comparison result of the information item pair.
S208: and counting the number of information item pairs with different message data item contents and interface data item contents indicated by the comparison result to obtain a first numerical value.
S209: and if the first numerical value is larger than the preset threshold value, sending second prompt information to the user.
And the second prompt message is used for indicating that the message generating function of the system to be tested has a fault.
In summary, the scheme shown in this embodiment does not need to manually participate in the comparison process between the content of the message data item and the content of the interface data item, so that the efficiency of the interface function test can be improved, and the operational risk caused by human factors can be effectively reduced.
It should be noted that the above-described embodiments are all a specific implementation manner of the interface function testing method shown in the present application. For this reason, the above-described embodiments may be summarized as the method shown in fig. 3.
S301: and acquiring an interface document of the system to be tested, and analyzing the interface document to obtain the mapping relation between the message data item and the interface data item.
S302: and grabbing interface elements from the interface of the system to be tested.
The interface element comprises a plurality of interface data items and interface data item contents corresponding to each interface data item.
S303: and obtaining the analysis result of the message.
The analysis result comprises a plurality of message data items and message data item contents corresponding to each message data item.
S304: and according to the mapping relation, associating the content of the message data item corresponding to each message data item with the content of the interface data item corresponding to each interface data item to obtain each information item pair.
Wherein the information item pair comprises the content of the message data item and the content of the interface data item associated with the content of the message data item.
S305: and for each information item pair, comparing the content of the message data item shown by the information item pair with the content of the interface data item shown by the information item pair to obtain a comparison result of the information item pair.
S306: and counting the number of information item pairs with different message data item contents and interface data item contents indicated by the comparison result to obtain a first numerical value.
S307: and sending prompt information to the user when the first numerical value is larger than the preset threshold value.
The prompt information is used for indicating that the interface function of the system to be tested has a fault.
In summary, the scheme shown in this embodiment does not need to manually participate in the comparison process between the content of the message data item and the content of the interface data item, so that the efficiency of the interface function test can be improved, and the operational risk caused by human factors can be effectively reduced.
Corresponding to the interface function testing method provided by the embodiment of the application, the embodiment of the application also provides an interface function testing device.
As shown in fig. 4, a schematic structural diagram of an interface function testing apparatus provided in the embodiment of the present application includes:
the parsing unit 100 is configured to obtain an interface document of the system to be tested, and parse the interface document to obtain a mapping relationship between the message data item and the interface data item.
The grabbing unit 200 is used for grabbing interface elements from an interface of the system to be tested; the interface element includes a plurality of interface data items, and interface data item content corresponding to each interface data item.
An obtaining unit 300, configured to obtain an analysis result of the packet; the analysis result comprises a plurality of message data items and message data item contents corresponding to each message data item.
The obtaining unit 300 is specifically configured to: under the condition that a message received by a system to be tested is detected, obtaining an analysis result of the message; and the analysis result is obtained by analyzing the message through the system to be tested.
The obtaining unit 300 is specifically configured to: and under the condition that the message generated by the system to be tested is detected, analyzing the message to obtain an analysis result of the message.
The association unit 400 is configured to associate, according to the mapping relationship, the content of the message data item corresponding to each message data item with the content of the interface data item corresponding to each interface data item, so as to obtain each information item pair; the information item pair includes message data item content and interface data item content associated with the message data item content.
The comparing unit 500 is configured to compare, for each information item pair, the content of the message data item shown in the information item pair with the content of the interface data item shown in the information item pair, so as to obtain a comparison result of the information item pair.
Wherein, the comparison unit 500 is specifically configured to: generating an interface element table based on each interface data item and the interface data item content corresponding to each interface data item; generating a message analysis table based on each message data item and the content of the message data item corresponding to each message data item; and according to the mapping relation, associating the content of the message data item corresponding to each message data item shown in the message analysis table with the content of the interface data item corresponding to each interface data item shown in the interface element table to obtain each information item pair.
The counting unit 600 is configured to count the number of information item pairs with the comparison result indicating that the content of the message data item is different from the content of the interface data item, so as to obtain a first numerical value.
The prompting unit 700 is configured to send a prompting message to the user when the first value is greater than the preset threshold; the prompt message is used for indicating that the interface function of the system to be tested has a fault.
Wherein, the prompting unit 700 is specifically configured to: sending first prompt information to a user under the condition that the first numerical value is larger than a preset threshold value; the first prompt message is used for indicating that the message analysis function of the system to be tested has a fault.
The prompt unit 700 is specifically configured to: sending a second prompt message to the user when the first value is larger than the preset threshold value; the second prompt message is used for indicating that the message generating function of the system to be tested has a fault.
In summary, the scheme shown in this embodiment does not need to manually participate in the comparison process between the content of the message data item and the content of the interface data item, so that the efficiency of the interface function test can be improved, and the operational risk caused by human factors can be effectively reduced.
The application also provides a computer readable storage medium, which comprises a stored program, wherein the program executes the interface function testing method provided by the application.
The application also provides an interface function test device, including: a processor, a memory, and a bus. The processor is connected with the memory through a bus, the memory is used for storing programs, and the processor is used for running the programs, wherein the interface function testing method provided by the application is executed when the programs run, and comprises the following steps:
acquiring an interface document of a system to be tested, and analyzing the interface document to obtain a mapping relation between a message data item and an interface data item;
capturing interface elements from the interface of the system to be tested; the interface element comprises a plurality of interface data items and interface data item contents corresponding to each interface data item;
obtaining the analysis result of the message; the analysis result comprises a plurality of message data items and message data item contents corresponding to each message data item;
according to the mapping relation, associating the content of the message data item corresponding to each message data item with the content of the interface data item corresponding to each interface data item to obtain each information item pair; the information item pair comprises the message data item content and interface data item content associated with the message data item content;
for each information item pair, comparing the content of the message data item shown by the information item pair with the content of the interface data item shown by the information item pair to obtain a comparison result of the information item pair;
counting the number of information item pairs with different contents of the comparison result indicating message data items and interface data items to obtain a first numerical value;
sending prompt information to a user under the condition that the first numerical value is larger than a preset threshold value; and the prompt information is used for indicating that the interface function of the system to be tested has a fault.
Optionally, the obtaining an analysis result of the packet includes:
under the condition that the message received by the system to be tested is detected, obtaining the analysis result of the message; the analysis result is obtained by analyzing the message through the system to be tested;
and sending prompt information to the user when the first numerical value is larger than a preset threshold value, wherein the prompt information comprises:
sending a first prompt message to a user under the condition that the first numerical value is larger than a preset threshold value; the first prompt message is used for indicating that the function of analyzing the message of the system to be tested has a fault.
Optionally, the obtaining an analysis result of the packet includes:
under the condition that the message generated by the system to be tested is detected, analyzing the message to obtain an analysis result of the message;
and sending prompt information to the user when the first numerical value is larger than a preset threshold value, wherein the prompt information comprises:
sending a second prompt message to the user when the first numerical value is larger than a preset threshold value; and the second prompt message is used for indicating that the message generating function of the system to be tested has a fault.
Optionally, associating, according to the mapping relationship, a content of a packet data item corresponding to each packet data item with a content of an interface data item corresponding to each interface data item to obtain each information item pair, including:
generating an interface element table based on each interface data item and the interface data item content corresponding to each interface data item;
generating a message analysis table based on each message data item and the content of the message data item corresponding to each message data item;
and according to the mapping relation, associating the content of the message data item corresponding to each message data item shown in the message analysis table with the content of the interface data item corresponding to each interface data item shown in the interface element table to obtain each information item pair.
The functions described in the method of the embodiment of the present application, if implemented in the form of software functional units and sold or used as independent products, may be stored in a storage medium readable by a computing device. Based on such understanding, part of the contribution to the prior art of the embodiments of the present application or part of the technical solution may be embodied in the form of a software product stored in a storage medium and including several instructions for causing a computing device (which may be a personal computer, a server, a mobile computing device or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (10)
1. An interface function testing method is characterized by comprising the following steps:
acquiring an interface document of a system to be tested, and analyzing the interface document to obtain a mapping relation between a message data item and an interface data item;
capturing interface elements from the interface of the system to be tested; the interface element comprises a plurality of interface data items and interface data item contents corresponding to each interface data item;
obtaining the analysis result of the message; the analysis result comprises a plurality of message data items and message data item contents corresponding to each message data item;
according to the mapping relation, associating the content of the message data item corresponding to each message data item with the content of the interface data item corresponding to each interface data item to obtain each information item pair; the information item pair comprises the message data item content and interface data item content associated with the message data item content;
for each information item pair, comparing the content of the message data item shown by the information item pair with the content of the interface data item shown by the information item pair to obtain a comparison result of the information item pair;
counting the number of information item pairs with different contents of the comparison result indicating message data items and interface data items to obtain a first numerical value;
sending prompt information to a user under the condition that the first numerical value is larger than a preset threshold value; and the prompt information is used for indicating that the interface function of the system to be tested has a fault.
2. The method according to claim 1, wherein the obtaining of the parsing result of the packet comprises:
under the condition that the message received by the system to be tested is detected, obtaining the analysis result of the message; the analysis result is obtained by analyzing the message through the system to be tested;
and sending prompt information to the user when the first numerical value is larger than a preset threshold value, wherein the prompt information comprises:
sending a first prompt message to a user under the condition that the first numerical value is larger than a preset threshold value; the first prompt message is used for indicating that the function of analyzing the message of the system to be tested has a fault.
3. The method according to claim 1, wherein the obtaining of the parsing result of the packet comprises:
under the condition that the message generated by the system to be tested is detected, analyzing the message to obtain an analysis result of the message;
and sending prompt information to the user when the first numerical value is larger than a preset threshold value, wherein the prompt information comprises:
sending a second prompt message to the user when the first numerical value is larger than a preset threshold value; and the second prompt message is used for indicating that the message generating function of the system to be tested has a fault.
4. The method according to claim 1, wherein the associating, according to the mapping relationship, a message data item content corresponding to each of the message data items with an interface data item content corresponding to each of the interface data items to obtain each information item pair comprises:
generating an interface element table based on each interface data item and the interface data item content corresponding to each interface data item;
generating a message analysis table based on each message data item and the content of the message data item corresponding to each message data item;
and according to the mapping relation, associating the content of the message data item corresponding to each message data item shown in the message analysis table with the content of the interface data item corresponding to each interface data item shown in the interface element table to obtain each information item pair.
5. An interface function testing apparatus, comprising:
the analysis unit is used for acquiring an interface document of the system to be tested and analyzing the interface document to obtain a mapping relation between the message data item and the interface data item;
the grabbing unit is used for grabbing interface elements from the interface of the system to be tested; the interface element comprises a plurality of interface data items and interface data item contents corresponding to each interface data item;
the acquisition unit is used for acquiring the analysis result of the message; the analysis result comprises a plurality of message data items and message data item contents corresponding to each message data item;
the association unit is used for associating the content of the message data item corresponding to each message data item with the content of the interface data item corresponding to each interface data item according to the mapping relation to obtain each information item pair; the information item pair comprises the message data item content and interface data item content associated with the message data item content;
the comparison unit is used for comparing the content of the message data item shown by the information item pair with the content of the interface data item shown by the information item pair to obtain a comparison result of the information item pair;
the statistical unit is used for counting the number of information item pairs with different contents of the comparison result indicating message data items and interface data items to obtain a first numerical value;
the prompting unit is used for sending prompting information to a user under the condition that the first numerical value is larger than a preset threshold value; and the prompt information is used for indicating that the interface function of the system to be tested has a fault.
6. The apparatus according to claim 5, wherein the obtaining unit is specifically configured to:
under the condition that the message received by the system to be tested is detected, obtaining the analysis result of the message; the analysis result is obtained by analyzing the message through the system to be tested;
the prompting unit is specifically used for sending first prompting information to a user under the condition that the first numerical value is larger than a preset threshold value; the first prompt message is used for indicating that the function of analyzing the message of the system to be tested has a fault.
7. The apparatus according to claim 5, wherein the obtaining unit is specifically configured to:
under the condition that the message generated by the system to be tested is detected, analyzing the message to obtain an analysis result of the message;
the prompting unit is specifically used for sending second prompting information to the user under the condition that the first numerical value is larger than a preset threshold value; and the second prompt message is used for indicating that the message generating function of the system to be tested has a fault.
8. The apparatus of claim 5, wherein the alignment unit is specifically configured to:
generating an interface element table based on each interface data item and the interface data item content corresponding to each interface data item;
generating a message analysis table based on each message data item and the content of the message data item corresponding to each message data item;
and according to the mapping relation, associating the content of the message data item corresponding to each message data item shown in the message analysis table with the content of the interface data item corresponding to each interface data item shown in the interface element table to obtain each information item pair.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program performs the interface function testing method of any one of claims 1 to 4.
10. An interface function test apparatus, comprising: a processor, a memory, and a bus; the processor and the memory are connected through the bus;
the memory is used for storing a program, and the processor is used for running the program, wherein the program executes the interface function testing method according to any one of claims 1 to 4 when running.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111037336.1A CN113704131B (en) | 2021-09-06 | 2021-09-06 | Interface function test method, device, storage medium and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111037336.1A CN113704131B (en) | 2021-09-06 | 2021-09-06 | Interface function test method, device, storage medium and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113704131A true CN113704131A (en) | 2021-11-26 |
CN113704131B CN113704131B (en) | 2024-04-12 |
Family
ID=78660245
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111037336.1A Active CN113704131B (en) | 2021-09-06 | 2021-09-06 | Interface function test method, device, storage medium and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113704131B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040041827A1 (en) * | 2002-08-30 | 2004-03-04 | Jorg Bischof | Non-client-specific testing of applications |
CN104202328A (en) * | 2014-09-12 | 2014-12-10 | 积成电子股份有限公司 | GOOSE/SMV (generic object oriented substation event/sampled measured value) message subscribing method, GOOSE/SMV message subscribing configuration module and GOOSE/SMV message subscribing terminal |
US10108532B1 (en) * | 2016-09-29 | 2018-10-23 | Juniper Networks, Inc. | Systems and methods for unit testing of operating system kernels from user space |
CN110554956A (en) * | 2019-07-31 | 2019-12-10 | 交控科技股份有限公司 | BDMS automatic testing method |
CN111026645A (en) * | 2019-11-20 | 2020-04-17 | 航天信息股份有限公司 | User interface automatic testing method and device, storage medium and electronic equipment |
CN112035336A (en) * | 2019-06-04 | 2020-12-04 | 北京京东尚科信息技术有限公司 | Test method, test device and readable storage medium |
CN112148254A (en) * | 2019-06-27 | 2020-12-29 | Sap欧洲公司 | Application evaluation system for achieving interface design consistency between microservices |
-
2021
- 2021-09-06 CN CN202111037336.1A patent/CN113704131B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040041827A1 (en) * | 2002-08-30 | 2004-03-04 | Jorg Bischof | Non-client-specific testing of applications |
CN104202328A (en) * | 2014-09-12 | 2014-12-10 | 积成电子股份有限公司 | GOOSE/SMV (generic object oriented substation event/sampled measured value) message subscribing method, GOOSE/SMV message subscribing configuration module and GOOSE/SMV message subscribing terminal |
US10108532B1 (en) * | 2016-09-29 | 2018-10-23 | Juniper Networks, Inc. | Systems and methods for unit testing of operating system kernels from user space |
CN112035336A (en) * | 2019-06-04 | 2020-12-04 | 北京京东尚科信息技术有限公司 | Test method, test device and readable storage medium |
CN112148254A (en) * | 2019-06-27 | 2020-12-29 | Sap欧洲公司 | Application evaluation system for achieving interface design consistency between microservices |
CN110554956A (en) * | 2019-07-31 | 2019-12-10 | 交控科技股份有限公司 | BDMS automatic testing method |
CN111026645A (en) * | 2019-11-20 | 2020-04-17 | 航天信息股份有限公司 | User interface automatic testing method and device, storage medium and electronic equipment |
Non-Patent Citations (1)
Title |
---|
张志祥 等: "通用变长协议数据描述及解析方法研究", 舰船电子工程, no. 05, 20 May 2015 (2015-05-20), pages 68 - 70 * |
Also Published As
Publication number | Publication date |
---|---|
CN113704131B (en) | 2024-04-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107908494B (en) | Abnormal event processing method and device, electronic equipment and storage medium | |
CN114185708A (en) | Data analysis method and device based on distributed link tracking and electronic equipment | |
CN109669795B (en) | Crash information processing method and device | |
WO2019019636A1 (en) | User identification method, electronic device, and computer readable storage medium | |
CN112636957A (en) | Early warning method and device based on log, server and storage medium | |
CN111045935B (en) | Automatic version auditing method, device, equipment and storage medium | |
CN106802904A (en) | Log processing method, apparatus and system | |
CN113434396A (en) | Interface test method, device, equipment, storage medium and program product | |
CN111158926B (en) | Service request analysis method, device and equipment | |
CN114595765A (en) | Data processing method and device, electronic equipment and storage medium | |
CN113282460A (en) | Distributed alarm system, method and device | |
CN113704131A (en) | Interface function testing method and device, storage medium and equipment | |
CN115983836A (en) | Data processing method and related equipment | |
CN114170741B (en) | Transaction efficiency monitoring method, ATM front-end system and self-service business control and management system | |
CN114979100B (en) | Cloud resource inspection method and related device | |
CN110795308A (en) | Server inspection method, device, equipment and storage medium | |
CN114064488A (en) | Transaction testing method, device, storage medium and equipment | |
CN114239296A (en) | Data processing method and device and electronic equipment | |
CN114238898A (en) | Credit information processing method, virtual server and related device | |
CN113961632A (en) | Message data processing method and device and electronic equipment | |
CN113568656A (en) | Configuration data processing method and device, storage medium and equipment | |
CN113411828A (en) | Method, device and equipment for sensing call quality and computer readable storage medium | |
CN114501348B (en) | Combined monitoring method, device, equipment and storage medium for users suffering from fraud | |
CN115858324B (en) | AI-based IT equipment fault processing method, apparatus, equipment and medium | |
WO2024125173A1 (en) | Network element fault processing method and apparatus, and storage medium and electronic apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |