Interface testing method and device, electronic equipment and storage medium

By obtaining target communication methods and mapping files, the test cases are automatically determined, the problem of low efficiency of existing interface testing is solved, the interface testing is automated and efficiency improvement is achieved, and the software development needs of rapid iteration is met.

CN119127679APending Publication Date: 2024-12-13CHINA FAW CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411138554.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The existing interface testing methods are low in testing efficiency, which makes it difficult to detect and repair interface problems in a timely manner after software changes, and cannot meet the software development needs of rapid iteration.

Method used

By obtaining the description file of the target communication method and the mapping file of the interface to be tested, the test cases are automatically determined, and the interface test is automatically carried out to reduce manual participation and improve the testing efficiency.

Benefits of technology

The interface testing is automated, which significantly reduces the test cycle, increases the probability of problem discovery, reduces labor costs, and simplifies the interface testing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127679A_ABST
    Figure CN119127679A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an interface testing method and device, electronic equipment and a storage medium. The method comprises the steps that a description file of a target communication mode and a mapping file of a to-be-tested interface are obtained, and the to-be-tested interface is an interface adopting the target communication mode for communication; determining initial use case data according to the description file, and determining target use case data according to the initial use case data and the mapping file; determining a test case according to the target case data, and testing the to-be-tested interface according to the test case to obtain a test result of the to-be-tested interface. According to the technical scheme of the embodiment of the invention, the test efficiency of the interface test is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of interface testing, and in particular to an interface testing method, device, electronic equipment and storage medium. Background Art

[0002] After the software is changed, the software interface needs to be tested to avoid abnormal software usage caused by changes in the interface when the software is changed.

[0003] However, the current interface testing method has low testing efficiency and needs to be solved urgently. Summary of the invention

[0004] The embodiments of the present invention provide an interface testing method, device, electronic equipment and storage medium, which improve the testing efficiency of the interface testing.

[0005] According to one aspect of the present invention, there is provided an interface testing method, which may include:

[0006] Obtain a description file of the target communication method and a mapping file of the interface to be tested, wherein the interface to be tested is an interface that communicates using the target communication method;

[0007] Determine the initial use case data based on the description file, and determine the target use case data based on the initial use case data and the mapping file;

[0008] According to the target use case data, the test case is determined, and according to the test case, the interface to be tested is tested to obtain the test result of the interface to be tested.

[0009] According to another aspect of the present invention, there is provided an interface testing device, which may include:

[0010] A mapping file acquisition module, used to acquire a description file of a target communication method and a mapping file of an interface to be tested, wherein the interface to be tested is an interface that communicates using the target communication method;

[0011] A target use case data determination module is used to determine the initial use case data according to the description file, and determine the target use case data according to the initial use case data and the mapping file;

[0012] The test result obtaining module is used to determine the test case according to the target case data, and to test the interface to be tested according to the test case to obtain the test result of the interface to be tested.

[0013] According to another aspect of the present invention, there is provided an electronic device, which may include:

[0014] at least one processor; and

[0015] a memory communicatively connected to at least one processor; wherein,

[0016] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by at least one processor so that the at least one processor implements the interface testing method provided by any embodiment of the present invention when executing the computer program.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, on which computer instructions are stored. The computer instructions are used to enable a processor to implement the interface testing method provided by any embodiment of the present invention when executed.

[0018] The technical solution of the embodiment of the present invention obtains a description file of the target communication method and a mapping file of the interface to be tested, wherein the interface to be tested is an interface that communicates using the target communication method, so as to automatically determine the test case through the description file and the mapping file; determine the initial use case data according to the description file, and determine the target use case data according to the initial use case data and the mapping file, and the target use case data can be automatically determined through the description file and the mapping file; determine the test case according to the target use case data, and test the interface to be tested according to the test case to obtain the test result of the interface to be tested, and the interface to be tested can be automatically tested through the test case. The above technical solution can automatically determine the test case through the description file and the mapping file, and then automatically test the interface to be tested according to the test case, without the need for manual participation in the interface test, thus avoiding a large amount of time consumption in the interface test process caused by manual participation in the interface test, thereby improving the test efficiency of the interface test.

[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0021] Figure 1 is a flow chart of an interface testing method provided according to an embodiment of the present invention;

[0022] Figure 2 is a structural diagram of a desktop automated testing environment in an interface testing method provided according to an embodiment of the present invention;

[0023] Figure 3 is a flow chart of another interface testing method provided according to an embodiment of the present invention;

[0024] Figure 4 A flowchart of determining initial use case data in another interface testing method provided according to an embodiment of the present invention;

[0025] Figure 5 is a flow chart of another interface testing method provided according to an embodiment of the present invention;

[0026] Figure 6 is a flowchart of determining target use case data in another interface testing method provided by an embodiment of the present invention;

[0027] Figure 7 is a flowchart of an optional example of another interface testing method provided in an embodiment of the present invention;

[0028] Figure 8 is a structural block diagram of an interface testing device provided according to an embodiment of the present invention;

[0029] Fig. 9 It is a structural schematic diagram of an electronic device for implementing the interface testing method of an embodiment of the present invention. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. The situations of "target", "original", etc. are similar and will not be repeated here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0032] Before introducing the embodiments of the present invention, an exemplary description is given of the implementation process of the solution currently adopted for interface testing and the reasons why the problem of low testing efficiency exists, so as to better understand why the solution proposed in the embodiments of the present invention improves the testing efficiency of interface testing.

[0033] For example, the current interface testing method mainly relies on a hardware-in-the-loop simulation system to manually identify the input and output properties of signals and the signal value or signal range, manually build test cases, and then perform interface testing based on the test cases. The above-mentioned interface testing is relaxed, and there are difficulties such as a long test case development cycle, a long test case execution time, and difficulty in summarizing test reports. Therefore, the current interface testing method has low testing efficiency.

[0034] In addition, since the description file of the target communication method may change, and the interface name of the interface to be tested changes after the software corresponding to the interface to be tested is changed, the developed test cases need to be optimized, modified and executed on different versions of the software, which will consume a lot of time. In the context of rapid iterative software development, the testing cycle is too long and it is difficult to complete the interface testing in a timely and effective manner and to discover problems with the interface to be tested in a timely manner, making it difficult to meet the testing requirements of the interface in the controller on the vehicle. Therefore, the current interface testing method has low testing efficiency.

[0035] In view of this, the embodiment of the present invention automatically determines the test case through the description file and the mapping file, and then automatically tests the interface to be tested according to the test case, without the need for manual participation in the interface test, thus avoiding the large amount of time consumption in the interface test process caused by manual participation in the interface test, thereby improving the test efficiency of the interface test. This will be explained in detail below.

[0036] Figure 1 1 is a flow chart of an interface testing method provided in an embodiment of the present invention. This embodiment is applicable to the case of interface testing. The method can be executed by an interface testing device provided in an embodiment of the present invention, the device can be implemented by software and / or hardware, the device can be integrated in an electronic device, and the electronic device can be various user terminals or servers.

[0037] See also Figure 1 The method of the embodiment of the present invention specifically includes the following steps:

[0038] S110, obtaining a description file of a target communication method and a mapping file of an interface to be tested, wherein the interface to be tested is an interface that communicates using the target communication method.

[0039] Among them, the target communication mode is the communication mode adopted by the interface to be tested; the target communication mode can be, for example, Local Interconnect Network (LIN) communication or Controller Area Network (CAN) communication, etc. The description file is a file that describes the target communication mode. For example, when the target communication mode is Local Interconnect Network communication, the description file is a Layer Definition File (LDF) of LIN. The interface to be tested is the interface to be tested. The mapping file is a file that can reflect the information of the software or program corresponding to the interface to be tested. The mapping file can, for example, include the mapping file (MapFile) of the software or program corresponding to the interface to be tested.

[0040] It can be understood that the interface to be tested can be the interface of the software or program in the controller that communicates using the target communication method, that is, the target communication method can also be understood as the communication method used by devices such as controllers that are installed with the software or program corresponding to the interface to be tested.

[0041] S120. Determine initial use case data according to the description file, and determine target use case data according to the initial use case data and the mapping file.

[0042] The initial use case data is the data related to the use case determined according to the description file. The target test case is the data related to the test case that can be determined. The test case is a test case used to test the interface to be tested; the test case can exist in the form of a script.

[0043] It is understandable that since the description file is a description file of the target communication method, it cannot reflect the properties related to the interface to be tested itself. Therefore, the initial use case data determined according to the description file is not comprehensive enough to determine the test case based on the initial use case data. Based on this, the initial use case data can be completed according to the mapping file to obtain the target use case data that can determine the complete test case.

[0044] In the embodiment of the present invention, the step of determining the initial use case data according to the description file, and / or the step of determining the target use case data according to the initial use case data and the mapping file, can be encapsulated into a python library to provide a function and implemented by developing a python script. In the embodiment of the present invention, the implementation method of determining the initial use case data according to the description file, and the method of determining the target use case data according to the initial use case data and the mapping file are not specifically limited.

[0045] In the embodiment of the present invention, for example, the description file can be parsed, and according to the interface to be tested, the signal name and signal value of the signal that can characterize the signal that can be used when the interface to be tested adopts the target communication method for data interaction can be determined from the parsed data, and the initial use case data can be determined according to the signal name and signal value of the signal that can be used. In the embodiment of the present invention, the method of determining the initial use case data according to the description file is not specifically limited.

[0046] In the embodiment of the present invention, for example, the mapping file can be parsed to obtain the signal names of the signals related to the signals that can be used when the interface to be tested uses the target communication method for data interaction, and the initial use case data is supplemented according to the obtained signal names of the related signals to obtain the target use case data. In the embodiment of the present invention, the method of determining the target use case data according to the initial use case data and the mapping file is not specifically limited.

[0047] S130. Determine a test case according to the target use case data, and test the interface to be tested according to the test case to obtain a test result of the interface to be tested.

[0048] Among them, the test result is the result obtained by testing the interface to be tested; the test result may include, for example, the comparison result of the expected result output value and the actual output signal value of the interface to be tested, and / or, the overall test result summary of the interface to be tested, etc.

[0049] In an embodiment of the present invention, the number of test cases may be at least one. For example, the target use case data is data in the form of a table. For each row of table data in the target use case data, a test case may be determined based on the table data to obtain at least one test case.

[0050] In an embodiment of the present invention, the target use case data may include, for example, input attributes and output attributes of the interface to be tested, the input attributes may include, for example, the signal name of the signal input to the interface to be tested and the input signal value, and the output attributes may include, for example, the signal name of the signal output from the interface to be tested and the output signal value; the target use case data may be parsed to obtain the input attributes and output attributes, and the input attributes and output attributes may be used as the input and output signal sources of the Component Abstract Programming Language (CAPL) script, the input signal value may be used as the signal value of the signal input to the interface to be tested in the test case, and the output signal value may be written as the expected result output value of the signal output from the interface to be tested into the expected result check in the test case to obtain the test case. In an embodiment of the present invention, there is no specific limitation on the method of determining the test case according to the target use case data.

[0051] In an embodiment of the present invention, for example, an automated use case generation tool can be developed, which can convert target use case data into test cases in script form. During the script conversion process, the content and scope of the converted test cases can be selected according to the user's wishes, including the signal value selection method and / or taking part of the signal under the same transmission message to generate a test script, etc.

[0052] In the embodiments of the present invention, see Figure 2 For example, a desktop automated test environment may be configured, the desktop automated test environment including a program-controlled power supply, a host computer, a communication device corresponding to the target communication mode, and a controller under test with software corresponding to the interface to be tested installed, wherein a test software environment may be configured in the host computer, and a test script may be configured in the test software environment, which may be used to perform the signal receiving and sending instructions required for the test process and to generate a test report, etc.; the communication device may include a communication tool of the target communication mode for signal forwarding. Test cases are automatically executed in batches in the host computer of the desktop automated test environment to test the interface to be tested. After the test cases are executed, the generated test results including a test report and test statistics may be obtained and viewed. In the embodiment of the present invention, there is no specific limitation on the method of testing the interface to be tested according to the test case and obtaining the test result of the interface to be tested.

[0053] In an embodiment of the present invention, the interface to be tested can be tested according to the test case obtained by adopting the above steps to obtain the test result of the interface to be tested, which effectively reduces the test cycle and improves the probability of finding problems in the interface to be tested, ensures the quality of software in the context of rapid iteration, and greatly reduces the labor cost and the threshold for interface testing in controllers such as the Primary Domain Controller (PDC). In addition, the interface testing method can be effectively extended to interface testing in other fields, greatly improving the efficiency of interface testing. The scheme of the above embodiment of the present invention is simple to operate and quick to execute, which can greatly liberate manpower and improve the efficiency of interface testing.

[0054] The technical solution of the embodiment of the present invention obtains a description file of the target communication method and a mapping file of the interface to be tested, wherein the interface to be tested is an interface that communicates using the target communication method, so as to automatically determine the test case through the description file and the mapping file; determine the initial use case data according to the description file, and determine the target use case data according to the initial use case data and the mapping file, and the target use case data can be automatically determined through the description file and the mapping file; determine the test case according to the target use case data, and test the interface to be tested according to the test case to obtain the test result of the interface to be tested, and the interface to be tested can be automatically tested through the test case. The above technical solution can automatically determine the test case through the description file and the mapping file, and then automatically test the interface to be tested according to the test case, without the need for manual participation in the interface test, thus avoiding a large amount of time consumption in the interface test process caused by manual participation in the interface test, thereby improving the test efficiency of the interface test.

[0055] An optional technical solution is to determine the test case according to the target use case data, including: filtering the target use case data according to preset use case filtering rules to obtain filtered use case data; and determining the test case according to the filtered use case data.

[0056] The use case screening rule is a rule for screening target use case data. The screened use case data is data obtained by screening the target use case data.

[0057] It is understandable that when there are many signal values ​​that can be used when interacting with the interface to be tested using the target communication method, if the interface to be tested is tested using a test case corresponding to each usable signal value, it may result in a large amount of unnecessary resource consumption, thereby reducing the test efficiency of the interface to be tested. Therefore, the target case data can be screened to reduce the number of test cases, thereby improving the test efficiency of the interface to be tested.

[0058] In the embodiment of the present invention, considering that the target use case data may include at least one pair of signal names with a corresponding relationship, each pair of signal names with a corresponding relationship includes at least one pair of input signal values ​​and output signal values ​​with a corresponding relationship, and the input signal values ​​and the output signal values ​​are the same, the same input signal values ​​and output signal values ​​can be referred to as target signal values. Considering the above situation, the use case screening rules can be set according to the actual test requirements, and the use case screening rules can, for example, include screening the maximum target signal value and / or the minimum target signal value corresponding to each pair of signal names with a corresponding relationship in the target use case data, and the use case screening rules can also, for example, include screening all enumerated target signal values ​​corresponding to each pair of signal names with a corresponding relationship in the target use case data, and the use case screening rules can also, for example, include randomly screening a preset number or a preset proportion of target signal values ​​corresponding to each pair of signal names with a corresponding relationship in the target use case data, and the use case screening rules can also, for example, include a user-selected specified target signal value, and so on. In the embodiment of the present invention, the specific content of the use case screening rules, and the method of screening the target use case data according to the preset use case screening rules to obtain the screened use case data are not specifically limited.

[0059] In the embodiment of the present invention, for example, the screening case data is data in the form of a table, and for each row of table data in the screening case data, a test case can be determined according to the table data. In the embodiment of the present invention, the method of determining the test case according to the screening case data is not specifically limited.

[0060] In the embodiment of the present invention, by screening the target use case data according to preset use case screening rules and then determining the test cases, the number of test cases can be reduced, thereby improving the test efficiency of the interface to be tested.

[0061] Figure 3 It is a flow chart of another interface testing method provided in an embodiment of the present invention. This embodiment is optimized based on the above-mentioned technical solutions. In this embodiment, optionally, according to the description file, the initial use case data is determined, including: according to the description file, determining the message receiving and sending attributes of the transmission message corresponding to the interface to be tested, wherein the transmission message is transmitted using the target communication method; according to the description file and the message receiving and sending attributes, determining the initial use case data. Among them, the explanations of the terms that are the same or corresponding to the above-mentioned embodiments are not repeated here.

[0062] See also Figure 3 The method of this embodiment may specifically include the following steps:

[0063] S210: Obtain a description file of a target communication method and a mapping file of an interface to be tested, wherein the interface to be tested is an interface that communicates using the target communication method.

[0064] S220. Determine, according to the description file, a message receiving and sending attribute of a transmission message corresponding to the interface to be tested, wherein the transmission message is transmitted in a target communication mode.

[0065] The transmission message is a message corresponding to the interface to be tested and transmitted in the target communication mode. The message sending and receiving attribute is an attribute that indicates whether the transmission message is sent to the interface to be tested or received from the interface to be tested.

[0066] In an embodiment of the present invention, for example, the description file can be parsed by a script or the like to determine the master-slave node attribute of the transmission message corresponding to the interface to be tested, the master-slave node attribute being the attribute that characterizes whether the transmission message is a message sent as a master node or a message received as a slave node; the message transceiver attribute can be determined according to the master-slave node attribute, or the message transceiver attribute can be determined according to the master-slave node attribute and the interface to be tested. In an embodiment of the present invention, the method of determining the message transceiver attribute of the transmission message corresponding to the interface to be tested according to the description file is not specifically limited.

[0067] For example, see Figure 4 , parse the description file to determine the master-slave node attributes of the transmission message corresponding to the interface to be tested; determine whether the transmission message is a message sent as a master node based on the master-slave node attributes; in the case where the transmission message is a message sent as a master node, parse the transmission message to determine at least one transmission signal under the transmission message; determine the transmission signal identifier and transmission signal data and other attributes corresponding to at least one transmission signal; set the message transceiver attribute of at least one transmission signal as input; determine the initial use case data based on the transmission signal identifier and transmission signal data corresponding to at least one transmission signal, as well as the message transceiver attribute; in the case where the transmission message is a message received as a slave node, parse the transmission message to determine at least one transmission signal under the transmission message; determine the transmission signal identifier and transmission signal data and other attributes corresponding to at least one transmission signal; set the message transceiver attribute of at least one transmission signal as output; determine the initial use case data based on the transmission signal identifier and transmission signal data corresponding to at least one transmission signal, as well as the message transceiver attribute.

[0068] S230. Determine initial use case data according to the description file and message sending and receiving attributes.

[0069] It is understandable that, since the message transceiving attribute can characterize whether the transmission message is a message sent or received by the interface to be tested, the message transceiving attribute can be used to determine whether the signal parsed from the description file is a signal sent or received by the interface to be tested, thereby facilitating the subsequent determination of accurate test cases. Therefore, the initial use case data can be determined based on the description file and the message transceiving attribute. In the embodiment of the present invention, the method of determining the initial use case data based on the description file and the message transceiving attribute is not specifically limited.

[0070] S240: Determine target use case data according to the initial use case data and the mapping file.

[0071] S250. Determine a test case according to the target use case data, and test the interface to be tested according to the test case to obtain a test result of the interface to be tested.

[0072] The technical solution of the embodiment of the present invention determines the message transceiving attributes with high accuracy of the transmission message corresponding to the interface to be tested according to the description file, wherein the transmission message is transmitted using the target communication mode; and determines the initial use case data with high accuracy according to the description file and the message transceiving attributes. The above technical solution determines the initial use case data with high accuracy by determining the message transceiving attributes.

[0073] An optional technical solution determines the initial use case data based on a description file and message sending and receiving attributes, including: parsing the description file to determine the transmission signal identifier and transmission signal data corresponding to at least one transmission signal under the transmission message; determining the initial use case data based on the transmission signal identifier and transmission signal data corresponding to at least one transmission signal, as well as the message sending and receiving attributes.

[0074] The transmission signal is a signal that can be used in a transmission message. The transmission signal identifier is an identifier of the transmission signal, such as a signal name of the transmission signal. The transmission signal data is data consisting of a signal value or a signal range that can be used by the transmission signal.

[0075] It can be understood that to determine the test case, it is necessary to determine the signal value of the input signal of the interface to be tested and the expected result output value used by the test case to test the interface to be tested, and the description file may include the transmission signal that can be used in the transmission message when communicating using the target communication method and the signal value of the transmission signal that can be used. Therefore, the description file can be parsed to determine the transmission signal identifier and transmission signal data corresponding to at least one transmission signal under the transmission message, so as to determine the test case based on the transmission signal identifier and transmission signal data corresponding to at least one transmission signal.

[0076] In the embodiment of the present invention, for example, a parsing tool such as a script for the description file can be developed, and the description file can be parsed by the parsing tool to parse the transmission message and disassemble the transmission message into different test lines to disassemble the transmission signal identifier and transmission signal data corresponding to at least one transmission signal under the transmission message; for another example, the description file can be parsed to determine the signal definition of at least one transmission signal under the transmission message, and the transmission signal identifier and transmission signal data corresponding to at least one transmission signal under the transmission message can be determined according to the signal definition; etc. In the embodiment of the present invention, the method of parsing the description file to determine the transmission signal identifier and transmission signal data corresponding to at least one transmission signal under the transmission message is not specifically limited.

[0077] In an embodiment of the present invention, for example, referring to Table 1, the transmission signal identifier and transmission signal data corresponding to at least one transmission signal can be respectively filled into the table consisting of the initial use case data according to the message transceiving attribute to obtain the initial use case data, that is, the transmission signal identifier and transmission signal data of the transmission signal under the message transceiving attribute characterizing that the transmission message is a transmission message sent to the interface to be tested are respectively filled into the table consisting of the initial use case data as the input signal name and the input signal value, and the transmission signal identifier and transmission signal data of the transmission signal under the message transceiving attribute characterizing that the transmission message is a transmission message received from the interface to be tested are respectively filled into the table consisting of the initial use case data as the output signal name and the output signal value. In an embodiment of the present invention, there is no specific limitation on the method of determining the initial use case data according to the transmission signal identifier and transmission signal data corresponding to at least one transmission signal, and according to the message transceiving attribute.

[0078] Table 1 Table of initial use case data

[0079] Input signal name Input signal value Output signal name Output signal value Signal 1 0 Signal 1 1 Signal 2 0 Signal 2 1

[0080] In an embodiment of the present invention, by parsing the description file, the transmission signal identifier and transmission signal data respectively corresponding to at least one transmission signal under the transmission message are determined, and the initial use case data is determined based on the transmission signal identifier and transmission signal data respectively corresponding to at least one transmission signal, as well as the message sending and receiving attributes, so that the initial use case data that is more convenient for determining the test case can be obtained.

[0081] Another optional technical solution, the interface testing method, also includes: parsing the description file to obtain the message transmission properties of the transmission message; determining the initial use case data based on the description file and the message sending and receiving properties, including: determining the initial use case data based on the message transmission properties, the description file and the message sending and receiving properties.

[0082] The message transmission attribute is an attribute that characterizes the transmission mode of the transmitted message.

[0083] In the embodiment of the present invention, the manner of parsing the description file to obtain the message transmission attribute of the transmission message is not specifically limited.

[0084] In an embodiment of the present invention, for example, the initial use case data can be presented in a table; the description file is parsed to determine the transmission signal identifier and transmission signal data corresponding to at least one transmission signal under the transmission message; the transmission signal identifier and transmission signal data corresponding to at least one transmission signal are filled in the table composed of the initial use case data according to the message transceiver attributes, and the message transmission attributes are also written into the table to obtain the initial use case data. In an embodiment of the present invention, there is no specific limitation on the method of determining the initial use case data according to the message transmission attributes, the description file, and the message transceiver attributes.

[0085] Optionally, the message transmission attribute includes at least one of a transmission period, a transmission mode, and a message identifier of the transmission message, so that the test of the interface to be tested is more closely aligned with the actual message transmission process, thereby improving the accuracy of the test of the interface to be tested. Among them, the transmission period is the period of transmission of the transmission message. The transmission mode is the mode of transmission of the transmission message, such as wireless transmission or wired transmission, and another example is the target communication mode, etc. In the embodiment of the present invention, the classification method of the transmission mode is not specifically limited. The message identifier is the identifier of the transmission message.

[0086] In an embodiment of the present invention, the description file can be parsed to obtain the message transmission properties of the transmitted message, and then the initial use case data can be determined based on the message transmission properties, the description file, and the message sending and receiving properties, so that the initial use case data obtained can be used to determine a test case that can characterize the message transmission properties, so that the interface to be tested can be tested according to the test case and the message transmission properties, so that the test of the interface to be tested is more in line with the actual message transmission process, thereby improving the accuracy of the test of the interface to be tested.

[0087] Figure 5It is a flowchart of another interface testing method provided in an embodiment of the present invention. This embodiment is optimized based on the above-mentioned technical solutions. In this embodiment, optionally, according to the initial use case data and the mapping file, the target use case data is determined, including: determining the retrieval signal identifier and the first signal data corresponding to at least one retrieval signal respectively from the initial use case data; for each retrieval signal in at least one retrieval signal, according to the retrieval signal identifier of the retrieval signal, searching in the mapping file to obtain the interface signal identifier of the interface signal corresponding to the retrieval signal; according to the first signal data of the retrieval signal, determining the second signal data of the interface signal, and determining the signal use case data according to the retrieval signal identifier, the first signal data, the interface signal identifier and the second signal data; according to the signal use case data corresponding to at least one retrieval signal, determining the target use case data. Among them, the explanations of the terms that are the same or corresponding to the above-mentioned embodiments are not repeated here.

[0088] See also Figure 5 The method of this embodiment may specifically include the following steps:

[0089] S310, obtaining a description file of a target communication method and a mapping file of an interface to be tested, wherein the interface to be tested is an interface that communicates using the target communication method.

[0090] S320. Determine initial use case data according to the description file.

[0091] S330. Determine, from the initial use case data, a retrieval signal identifier and first signal data respectively corresponding to at least one retrieval signal.

[0092] Among them, the retrieval signal is a signal related to the interface to be tested that can be used for communication using the target communication method, and can also be understood as a signal that can be used in a transmission message; the retrieval signal and the transmission signal can represent the same signal. The retrieval signal identifier is the identifier of the retrieval signal, and the retrieval signal identifier is, for example, the signal name of the retrieval signal. The first signal data is data related to the retrieval signal; the first signal data may include, for example, a signal value or signal range that the retrieval signal can use and a first input-output attribute. The first input-output attribute is an attribute that represents whether the retrieval signal is input to the interface to be tested or output from the interface to be tested.

[0093] In an embodiment of the present invention, the initial use case data may be, for example, a table filled with a transmission signal identifier and transmission signal data respectively corresponding to at least one transmission signal. For each transmission signal of at least one transmission signal in the initial use case data, the transmission signal may be used as a retrieval signal, and the transmission signal identifier may be used as a retrieval signal identifier of the retrieval signal. The first input and output attributes of the retrieval signal may be determined according to the message receiving and sending attributes of the transmission message corresponding to the transmission signal, and the transmission signal data and the first input and output attributes may be used as the first signal data of the retrieval signal. In an embodiment of the present invention, there is no specific limitation on the method of determining the retrieval signal identifier and the first signal data respectively corresponding to at least one retrieval signal from the initial use case data.

[0094] S340. For each search signal in the at least one search signal, search in the mapping file according to the search signal identifier of the search signal to obtain the interface signal identifier of the interface signal corresponding to the search signal.

[0095] The interface signal is a signal that can be used by the interface to be tested corresponding to the search signal. The interface signal identifier is an identifier of the interface signal, and the interface signal identifier is, for example, a signal name of the interface signal.

[0096] It is understandable that the mapping file may record the alternative signals that can be used by the interface to be tested. When setting the alternative signal identifier of the alternative signal, the field related to the search signal identifier of the search signal corresponding to the alternative signal may be set in the alternative signal identifier. Therefore, the search signal identifier may be used as a search condition to search in the mapping file, and the alternative signal identifier including the field related to the search signal identifier in the alternative signal identifier corresponding to each alternative signal is used as the interface signal identifier, and the alternative signal corresponding to the interface signal identifier is used as the interface signal. In the embodiment of the present invention, there is no specific limitation on the method of searching in the mapping file according to the search signal identifier of the search signal to obtain the interface signal identifier of the interface signal corresponding to the search signal.

[0097] It should be noted that there may be a situation where the interface signal identifier of the interface signal corresponding to the retrieval signal cannot be obtained when searching in the mapping file. When the interface signal identifier of the interface signal corresponding to the retrieval signal is not obtained, the address-signal correspondence relationship can be obtained, and the address-signal correspondence relationship can include the correspondence between each retrieval signal and each signal address; based on the retrieval signal, the signal address that has an address-signal correspondence relationship with the retrieval signal can be determined, the signal under the signal address can be used as the interface signal, and the interface signal identifier of the interface signal can be determined.

[0098] S350. Determine the second signal data of the interface signal according to the first signal data of the retrieval signal, and determine the signal use case data according to the retrieval signal identifier, the first signal data, the interface signal identifier and the second signal data.

[0099] In the embodiment of the present invention, the method for determining the second signal data of the interface signal according to the first signal data of the retrieval signal is not specifically limited.

[0100] In the embodiment of the present invention, the signal use case data is determined based on the retrieval signal identifier, the first signal data, the interface signal identifier, and the second signal data, which can also be understood as determining the signal use case data based on the initial use case data, the interface signal identifier, and the second signal data. In the embodiment of the present invention, the method of determining the signal use case data based on the retrieval signal identifier, the first signal data, the interface signal identifier, and the second signal data is not specifically limited.

[0101] S360. Determine target use case data according to the signal use case data corresponding to at least one retrieval signal.

[0102] In the embodiment of the present invention, for example, the initial use case data may be supplemented according to the signal use case data corresponding to at least one search signal to obtain the target use case data. In the embodiment of the present invention, the method of determining the target use case data according to the signal use case data corresponding to at least one search signal is not specifically limited.

[0103] Exemplarily, for example, referring to Table 1 for the initial use case data, two retrieval signals may be determined to be signal 1 and signal 2, the retrieval signal identifier "signal 1" corresponding to signal 1 is determined, the signal values ​​in the first signal data corresponding to signal 1 are determined to be "0" and "1" and the first input-output attribute is determined to be input, and the retrieval signal identifier "signal 2" corresponding to signal 2 is determined, the retrieval signal identifier "signal 2" corresponding to signal 2 is determined, the signal values ​​in the first signal data corresponding to signal 2 are determined to be "0" and "1" and the first input-output attribute is determined to be output; according to the retrieval signal identifier "signal 1" of signal 1, a search is performed in the mapping file to obtain the interface signal corresponding to signal 1 as signal 1*, the interface signal identifier "signal 1*" of signal 1* is determined, and according to the retrieval signal identifier "signal 2" of signal 2, a search is performed in the mapping file to obtain the interface signal corresponding to signal 2 as signal 2*, and the interface signal identifier "signal 2*" of signal 2* is determined; according to the signal value "0" of signal 1 and "1" and the first input-output attribute are used as input, and the signal value of signal 1* is determined to be "0" and "1" and the second input-output attribute is used as output, and the signal value of "0" and "1" and the second input-output attribute are used as output as the second signal data of signal 1, and according to "signal 1", the first signal data, "signal 1*" and the second signal data, a signal use case data is determined; according to the signal value of signal 2 "0" and "1" and the first input-output attribute are used as output, the signal value of signal 2* is determined to be "0" and "1" and the second input-output attribute are used as input, and the signal value of "0" and "1" and the second input-output attribute are used as input as the second signal data of signal 2, and according to "signal 2", the first signal data, "signal 2*" and the second signal data, a signal use case data is determined; referring to Table 2, according to the signal use case data corresponding to at least one retrieval signal determined, the table consisting of the initial use case data can be supplemented to obtain the target use case data.

[0104] Table 2 Target use case data composition table

[0105] Input signal name Input signal value Output signal name Output signal value Signal 1 0 Signal 1* 0 Signal 1 1 Signal 1* 1 Signal 2* 0 Signal 2 0 Signal 2* 1 Signal 2 1

[0106] S370. Determine a test case according to the target use case data, and test the interface to be tested according to the test case to obtain a test result of the interface to be tested.

[0107] The technical solution of the embodiment of the present invention determines the retrieval signal identifier and the first signal data respectively corresponding to at least one retrieval signal from the initial use case data, so as to determine the interface signal identifier and the second signal data of the interface signal; for each retrieval signal in the at least one retrieval signal, according to the retrieval signal identifier of the retrieval signal, a search is performed in the mapping file to obtain the interface signal identifier of the interface signal corresponding to the retrieval signal, and the interface signal identifier of the interface signal corresponding to the retrieval signal can be determined from the mapping file to facilitate the subsequent determination of the signal use case data; according to the first signal data of the retrieval signal, the second signal data of the interface signal is determined, and according to the retrieval signal identifier, the first signal data, the interface signal identifier and the second signal data, the signal use case data is determined; according to the signal use case data respectively corresponding to at least one retrieval signal, the target use case data is determined. The above technical solution can determine the interface signal identifier and the second signal data of the interface signal through the retrieval signal identifier and the first signal data, determine the signal use case data having an internal corresponding relationship, and then determine the target use case data, which can improve the accuracy of the determined target use case data.

[0108] An optional technical solution, the first signal data includes the first input and output attributes of the retrieval signal and the retrieval signal data; according to the first signal data of the retrieval signal, the second signal data of the interface signal is determined, including: using the opposite attribute of the first input and output attribute of the retrieval signal as the second input and output attribute of the interface signal, and using the retrieval signal data as the interface signal data of the interface signal; using the second input and output attribute and the interface signal data as the second signal data of the interface signal.

[0109] The opposite attribute is an attribute opposite to the first input / output attribute; for example, if the first input / output attribute indicates that the retrieval signal is sent to the interface to be tested, that is, the first input / output attribute is input, then the opposite attribute indicates that the retrieval signal is received from the interface to be tested, that is, the opposite attribute is output. The second input / output attribute is an attribute that indicates whether the interface signal is input to the interface to be tested or output from the interface to be tested.

[0110] It can be understood that, when the retrieval signal is a signal input to the interface to be tested, its corresponding interface signal is a signal output from the interface to be tested. Therefore, the opposite attribute of the first input and output attribute of the retrieval signal can be used as the second input and output attribute of the interface signal; considering that the input and output data of the interface to be tested are the same, there is no abnormality in the interface to be tested. Therefore, the retrieval signal data can be used as the interface signal data of the interface signal; the second input and output attributes and the interface signal data can be used as the second signal data of the interface signal.

[0111] For example, see Figure 6, determine the retrieval signal identifier, the first input / output attribute, and the retrieval signal data corresponding to at least one retrieval signal respectively from the initial use case data; for each retrieval signal in the at least one retrieval signal, determine whether the first input / output attribute of the retrieval signal is input to the interface to be tested or output from the interface to be tested; in the case where the first input / output attribute of the retrieval signal is input to the interface to be tested, determine whether it is possible to search in the mapping file according to the retrieval signal identifier of the retrieval signal to obtain the interface signal identifier of the interface signal corresponding to the retrieval signal; in the case where the interface signal identifier of the interface signal corresponding to the retrieval signal can be obtained, write the interface signal identifier of the interface signal as the identifier of the signal output from the interface to be tested corresponding to the retrieval signal into the initial use case data, and write the retrieval signal data as the interface signal data of the interface signal into the initial use case data to obtain the target use case data; in the case where the interface signal identifier of the interface signal corresponding to the retrieval signal is not obtained, obtain the address-signal correspondence; according to the retrieval signal, determine the signal address that has an address-signal correspondence with the retrieval signal, take the signal under the signal address as the interface signal, and determine the interface signal identifier of the interface signal. , execute the step of writing the interface signal identifier of the interface signal as the identifier of the signal output from the interface to be tested corresponding to the retrieval signal into the initial use case data; when the first input and output attribute of the retrieval signal is output from the interface to be tested, determine whether it is possible to search in the mapping file according to the retrieval signal identifier of the retrieval signal to obtain the interface signal identifier of the interface signal corresponding to the retrieval signal; when the interface signal identifier of the interface signal corresponding to the retrieval signal can be obtained, write the interface signal identifier of the interface signal as the identifier of the signal input to the interface to be tested corresponding to the retrieval signal into the initial use case data, and write the retrieval signal data as the interface signal data of the interface signal into the initial use case data to obtain the target use case data; when the interface signal identifier of the interface signal corresponding to the retrieval signal is not obtained, obtain the address-signal correspondence; according to the retrieval signal, determine the signal address that has an address-signal correspondence with the retrieval signal, take the signal under the signal address as the interface signal, determine the interface signal identifier of the interface signal, and execute the step of writing the interface signal identifier of the interface signal as the identifier of the signal input to the interface to be tested corresponding to the retrieval signal into the initial use case data.

[0112] The technical solution obtained by the embodiment of the present invention can obtain second signal data having a corresponding relationship with the first signal data of the search signal, thereby making the determined second signal data more accurate.

[0113] In order to better understand the technical solution of the above embodiment of the present invention, an optional example is provided here. Figure 7, parse the description file and the mapping file to obtain the parsing results; process the parsing results through the tool to obtain the target use case data in a tabular form; process the target use case data through the tool to obtain the test case in the form of a script; configure the automated testing desktop environment, automatically execute the test case in the automated testing desktop environment, and obtain the test results; detect the generated test results.

[0114] Figure 8 This is a structural block diagram of an interface testing device provided in an embodiment of the present invention, and the device is used to execute the interface testing method provided in any of the above embodiments. The device and the interface testing method of the above embodiments belong to the same inventive concept, and the details not described in detail in the embodiment of the interface testing device can refer to the embodiment of the above interface testing method. Figure 8 The device may specifically include: a mapping file acquisition module 410, a target use case data determination module 420 and a test result acquisition module 430.

[0115] Among them, the mapping file acquisition module 410 is used to obtain the description file of the target communication method and the mapping file of the interface to be tested, wherein the interface to be tested is an interface that communicates using the target communication method; the target use case data determination module 420 is used to determine the initial use case data based on the description file, and determine the target use case data based on the initial use case data and the mapping file; the test result acquisition module 430 is used to determine the test case based on the target use case data, and test the interface to be tested based on the test case to obtain the test result of the interface to be tested.

[0116] Optionally, the target use case data determination module 420 includes: a message sending and receiving attribute determination sub-module, which is used to determine the message sending and receiving attributes of the transmission message corresponding to the interface to be tested based on the description file, wherein the transmission message is transmitted using the target communication method; an initial use case data determination sub-module, which is used to determine the initial use case data based on the description file and the message sending and receiving attributes.

[0117] Optionally, based on the above-mentioned device, the initial use case data determination submodule includes: a transmission signal data determination unit, used to parse the description file, and determine the transmission signal identifier and transmission signal data corresponding to at least one transmission signal under the transmission message; a first initial use case data determination unit, used to determine the initial use case data based on the transmission signal identifier and transmission signal data corresponding to at least one transmission signal, and the message sending and receiving attributes.

[0118] Optionally, based on the above-mentioned device, the device may also include: a message transmission attribute acquisition module, used to parse the description file to obtain the message transmission attributes of the transmission message; an initial use case data determination submodule, including: a second initial use case data determination unit, used to determine the initial use case data according to the message transmission attributes, the description file and the message sending and receiving attributes.

[0119] Optionally, based on the above device, the message transmission attribute includes at least one of a transmission period, a transmission mode and a message identifier of the transmission message.

[0120] Optionally, the target use case data determination module 420 includes: a first signal data determination submodule, used to determine the retrieval signal identifier and first signal data corresponding to at least one retrieval signal respectively from the initial use case data; an interface signal identifier acquisition submodule, used to search in a mapping file for each retrieval signal in at least one retrieval signal according to the retrieval signal identifier of the retrieval signal, and obtain the interface signal identifier of the interface signal corresponding to the retrieval signal; a signal use case data determination submodule, used to determine the second signal data of the interface signal according to the first signal data of the retrieval signal, and determine the signal use case data according to the retrieval signal identifier, the first signal data, the interface signal identifier and the second signal data; a target use case data determination submodule, used to determine the target use case data according to the signal use case data corresponding to at least one retrieval signal respectively.

[0121] Optionally, based on the above-mentioned device, the first signal data includes the first input and output attributes of the retrieval signal and the retrieval signal data; the signal use case data determines the submodule, including: the interface signal data as a unit, used to use the opposite attribute of the first input and output attribute of the retrieval signal as the second input and output attribute of the interface signal, and the retrieval signal data as the interface signal data of the interface signal; the second signal data as a unit, used to use the second input and output attributes and the interface signal data as the second signal data of the interface signal.

[0122] Optionally, the test result obtaining module 430 includes: a submodule for obtaining filtered use case data, which is used to filter the target use case data according to preset use case filtering rules to obtain filtered use case data; and a test case determination submodule, which is used to determine the test case based on the filtered use case data.

[0123] The interface testing device provided by the embodiment of the present invention obtains the description file of the target communication mode and the mapping file of the interface to be tested through the mapping file acquisition module, wherein the interface to be tested is an interface that uses the target communication mode for communication, so as to automatically determine the test case through the description file and the mapping file; through the target case data determination module, the initial case data is determined according to the description file, and the target case data is determined according to the initial case data and the mapping file, and the target case data can be automatically determined through the description file and the mapping file; through the test result acquisition module, the test case is determined according to the target case data, and the interface to be tested is tested according to the test case to obtain the test result of the interface to be tested, and the interface to be tested can be automatically tested through the test case. The above device can automatically determine the test case through the description file and the mapping file, and then automatically test the interface to be tested according to the test case, without manual participation in the interface test, avoiding the large amount of time consumption in the interface test process caused by manual participation in the interface test, thereby improving the test efficiency of the interface test.

[0124] The interface testing device provided in the embodiment of the present invention can execute the interface testing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0125] It is worth noting that in the embodiment of the above-mentioned interface testing device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0126] Fig. 9 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0127] like Fig. 9As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0128] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0129] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the interface testing method.

[0130] In some embodiments, the interface testing method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the interface testing method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the interface testing method in any other appropriate manner (e.g., by means of firmware).

[0131] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0132] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0133] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0134] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0135] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0136] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0137] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0138] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. An interface testing method, characterized in that: include: Obtain a description file of a target communication method and a mapping file of an interface to be tested, wherein the interface to be tested is an interface that communicates using the target communication method; Determine initial use case data according to the description file, and determine target use case data according to the initial use case data and the mapping file; A test case is determined according to the target use case data, and the interface to be tested is tested according to the test case to obtain a test result of the interface to be tested.

2. The method according to claim 1, characterized in that The determining of initial use case data according to the description file includes: Determining, according to the description file, a message sending and receiving attribute of a transmission message corresponding to the interface to be tested, wherein the transmission message is transmitted using the target communication mode; Determine initial use case data based on the description file and the message sending and receiving attributes.

3. The method according to claim 2, characterized in that The determining of initial use case data according to the description file and the message sending and receiving attributes includes: Parsing the description file to determine a transmission signal identifier and transmission signal data respectively corresponding to at least one transmission signal under the transmission message; The initial use case data is determined based on the transmission signal identifier and the transmission signal data respectively corresponding to the at least one transmission signal, and the message sending and receiving attributes.

4. The method according to claim 2, characterized in that: Also includes: Parsing the description file to obtain the message transmission attribute of the transmission message; The determining of initial use case data according to the description file and the message sending and receiving attributes includes: Initial use case data is determined based on the message transmission attributes, the description file, and the message sending and receiving attributes.

5. The method according to claim 4, characterized in that The message transmission attribute includes at least one of a sending period, a sending mode and a message identifier of the transmission message.

6. The method according to claim 1, characterized in that The determining target use case data according to the initial use case data and the mapping file includes: Determine, from the initial use case data, a search signal identifier and first signal data respectively corresponding to at least one search signal; For each of the at least one retrieval signal, searching in the mapping file according to the retrieval signal identifier of the retrieval signal to obtain an interface signal identifier of the interface signal corresponding to the retrieval signal; Determine the second signal data of the interface signal according to the first signal data of the retrieval signal, and determine the signal use case data according to the retrieval signal identifier, the first signal data, the interface signal identifier and the second signal data; The target use case data is determined according to the signal use case data respectively corresponding to the at least one retrieval signal.

7. The method according to claim 6, characterized in that The first signal data includes a first input-output attribute of the retrieval signal and retrieval signal data; Determining the second signal data of the interface signal according to the first signal data of the retrieval signal comprises: Using the opposite attribute of the first input and output attribute of the search signal as the second input and output attribute of the interface signal, and using the search signal data as the interface signal data of the interface signal; The second input / output attribute and the interface signal data are used as second signal data of the interface signal.

8. The method according to claim 1, characterized in that Determining the test case according to the target case data includes: According to the preset use case screening rules, the target use case data is screened to obtain screened use case data; Determine the test case based on the screening case data.

9. An interface testing device, characterized in that: include: A mapping file acquisition module, used to acquire a description file of a target communication method and a mapping file of an interface to be tested, wherein the interface to be tested is an interface that communicates using the target communication method; A target use case data determination module, used to determine initial use case data according to the description file, and determine target use case data according to the initial use case data and the mapping file; The test result obtaining module is used to determine the test case according to the target case data, and test the interface to be tested according to the test case to obtain the test result of the interface to be tested.

10. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor performs the interface testing method according to any one of claims 1 to 7.