CN103678076A - Test method and system for interfaces between modules - Google Patents
Test method and system for interfaces between modules Download PDFInfo
- Publication number
- CN103678076A CN103678076A CN201210325447.7A CN201210325447A CN103678076A CN 103678076 A CN103678076 A CN 103678076A CN 201210325447 A CN201210325447 A CN 201210325447A CN 103678076 A CN103678076 A CN 103678076A
- Authority
- CN
- China
- Prior art keywords
- interface
- module
- interface information
- field
- data packet
- 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
- 238000010998 test method Methods 0.000 title abstract description 4
- 238000012360 testing method Methods 0.000 claims abstract description 73
- 238000001514 detection method Methods 0.000 claims abstract description 65
- 230000004048 modification Effects 0.000 claims abstract description 24
- 238000012986 modification Methods 0.000 claims abstract description 24
- 238000000034 method Methods 0.000 claims description 44
- 238000012544 monitoring process Methods 0.000 claims description 17
- 238000010801 machine learning Methods 0.000 claims description 13
- 230000008676 import Effects 0.000 claims description 6
- 238000004458 analytical method Methods 0.000 claims description 5
- 238000011161 development Methods 0.000 abstract description 14
- 230000006870 function Effects 0.000 description 8
- 230000008569 process Effects 0.000 description 7
- 238000004891 communication Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000002452 interceptive effect Effects 0.000 description 2
- 238000011144 upstream manufacturing Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention provides a test method for interfaces between modules. The test method comprises the steps of obtaining a data package output by the modules to be tested, detecting fields in the obtained data package through stored interface information, and obtaining the detection result. The interface information is incoming interface information of the downstream modules of the modules to be tested, and is used for limiting the fields received by the incoming interfaces. The invention further provides a test system for the interfaces between the modules. According to the technical scheme, the modification cost of the modules can be lowered, and the development efficiency can be improved.
Description
[ technical field ] A method for producing a semiconductor device
The present invention relates to internet testing technologies, and in particular, to a method and a system for testing an interface between modules.
[ background of the invention ]
At present, in the development process of a module, the module test mainly includes a module function test and an inter-module interface test, wherein the inter-module interface test in a system is usually performed during inter-module joint debugging after the module function test, if an interface problem is found at this time, because a module in the system is already shaped, the problem is not found in time, a lot of manpower and material resources are consumed during modification, the modification cost is very high, and the delay of the whole development cycle is caused.
In the prior art, the interfaces among the modules are tested by regularly monitoring data transmitted by the interfaces among the modules in the system, in the test process, the data needs to be monitored according to a credible interval of the data in the interfaces obtained through long-time learning, and if the data exceeds the credible interval, an alarm is sent to developers. If the developer upgrades the interface, the above scheme will cause the situation of false alarm.
In addition, in the development process of the modules in the existing system, developers of different modules need to communicate for a long time to determine whether a downstream module can accept the change of the interface of an upstream module, and then can determine a development scheme, so that excessive time is consumed for communication, and the development efficiency is low.
[ summary of the invention ]
The invention provides a method and a system for testing an interface between modules, which can reduce the modification cost of the modules and improve the development efficiency.
The specific technical scheme of the invention is as follows:
according to a preferred embodiment of the present invention, a method for testing an interface between modules includes:
acquiring a data packet output by a module to be detected, and detecting fields in the acquired data packet by using the stored interface information to obtain a detection result; the interface information is input interface information of a downstream module of the module to be tested and is used for limiting fields received by the input interface.
In the above method, the detecting the field in the acquired data packet by using the stored interface information is:
and judging whether the field in the data packet completely conforms to the field regulation of the interface information, if so, determining that the interface between the module to be tested and the downstream module passes the test, otherwise, determining that the interface between the module to be tested and the downstream module does not pass the test.
In the above method, the detecting the field in the acquired data packet by using the stored interface information is:
judging whether the field in the data packet completely conforms to the stipulation of the first priority interface information in the interface information on the field; if yes, judging whether the field in the data packet completely conforms to the field specification of the interface information with the second priority in the interface information; otherwise, determining that the interface between the module to be tested and the downstream module fails to test;
when the field in the data packet completely conforms to the field specification of the interface information of the second priority, determining that the interface between the module to be tested and the downstream module passes the test; otherwise, determining that the interface between the module to be tested and the downstream module fails to test.
In the above-mentioned method, the first step of the method,
the interface information of the first priority is interface information provided by a user through a Graphical User Interface (GUI);
the interface information of the second priority is obtained by learning the field type of the field, the maximum value of the data in the field and the minimum value of the data in the field which are transmitted among the modules in the system.
In the above method, the method further comprises:
adding, deleting, modifying or inquiring the stored interface information with the first priority through a GUI (graphical user interface), and detecting modification conflict when modifying the interface information with the first priority; or,
and carrying out batch import or batch export on the interface information of the first priority.
In the above method, the acquiring of the data packet output by the module to be tested is:
capturing a data packet output by a module to be tested from an output interface of the module to be tested, or receiving a data packet imported by a user;
and analyzing the acquired data packet to obtain fields contained in the data packet.
In the above method, before the detecting the field in the acquired data packet by using the stored interface information, the method further includes: and extracting the identity of the downstream module to which the data packet is sent from the identity field obtained after analysis, and acquiring corresponding interface information according to the identity.
In the above method, the method further comprises:
and when determining that the interface between the module to be tested and the downstream module fails to pass the test, sending alarm information to a user, and acquiring a judgment result of whether the interface information is wrong or not according to the alarm information.
In the above method, the result of determining whether the interface information is incorrect by the obtaining user according to the alarm information is:
if the user triggers an end button, acquiring the judgment result that the stored interface information has no error, and the field in the data packet has an error;
and if the user triggers the modification button, acquiring the judgment result that the stored interface information is wrong.
In the above method, the method further comprises:
and when the interface information has errors, relearning the field type of the field transmitted among the modules, the maximum value of the data in the field and the minimum value of the data in the field to obtain new interface information, and replacing the wrong interface information with the new interface information.
A system for testing an inter-module interface, comprising: the system comprises an interface management platform and an interface detection platform; the interface management platform comprises a database, and the interface detection platform comprises a detection module; wherein,
a database for storing interface information; the interface information is input interface information of a downstream module of the module to be tested and is used for limiting fields received by the input interface;
and the detection module is used for acquiring the data packet output by the module to be detected, and detecting the field in the acquired data packet by using the interface information stored in the database to obtain a detection result.
In the above system, when the detection module detects the field in the acquired data packet by using the interface information stored in the database, the detection module specifically includes:
and judging whether the field in the data packet completely conforms to the field regulation of the interface information, if so, determining that the interface between the module to be tested and the downstream module passes the test, otherwise, determining that the interface between the module to be tested and the downstream module does not pass the test.
In the above system, when the detection module detects the field in the acquired data packet by using the interface information stored in the database, the detection module specifically includes:
judging whether the field in the data packet completely conforms to the stipulation of the first priority interface information in the interface information on the field; if yes, judging whether the field in the data packet completely conforms to the field specification of the interface information with the second priority in the interface information; otherwise, determining that the interface between the module to be tested and the downstream module fails to test;
when the field in the data packet completely conforms to the field specification of the interface information of the second priority, determining that the interface between the module to be tested and the downstream module passes the test; otherwise, determining that the interface between the module to be tested and the downstream module fails to test.
In the system, the interface management platform further comprises a GUI and a machine learning module; wherein,
the GUI is used for acquiring interface information provided by a user and is used as the interface information of the first priority;
the machine learning module is configured to learn a field type of a field transmitted among modules in the system, a maximum value of data in the field, and a minimum value of the data in the field, so as to obtain the interface information of the second priority.
In the above-mentioned system, the first and second sensors are arranged in a single circuit,
the GUI is also used for receiving the operations of adding, deleting, modifying or inquiring the stored interface information with the first priority, and triggering a conflict detection module in the interface management platform to carry out modification conflict detection when the modification operation is carried out on the interface information with the first priority; or,
the GUI is further configured to bulk import or bulk export the interface information of the first priority.
In the above system, when the detection module obtains the data packet output by the module to be detected, the method specifically includes:
capturing a data packet output by a module to be tested from an output interface of the module to be tested, or receiving a data packet imported by a user; and analyzing the acquired data packet to obtain fields contained in the data packet.
In the system, the detection module is further configured to extract the identity of the downstream module to which the data packet is sent from the identity field obtained after the analysis, and obtain corresponding interface information from the database according to the identity.
In the above system, the interface detection platform further includes: monitoring an interface;
when the interface between the module to be tested and the downstream module is determined not to pass the test, the detection module is further used for sending alarm information to a user;
and the monitoring interface is used for acquiring a judgment result of whether the interface information is wrong or not by the user according to the alarm information.
In the above system, when the monitoring interface obtains a result of determining whether the interface information is incorrect according to the alarm information, the method specifically includes:
if the user triggers an end button, acquiring the judgment result that the stored interface information has no error, and the field in the data packet has an error;
and if the user triggers the modification button, acquiring the judgment result that the stored interface information is wrong.
In the system, the machine learning module is further configured to relearn a field type of a field transferred between the modules, a maximum value of data in the field, and a minimum value of data in the field when the interface information has an error, to obtain new interface information, and replace the erroneous interface information with the new interface information.
According to the technical scheme, the invention has the following beneficial effects:
the interface test method has the advantages that the downstream module input interface information of the module to be tested can be utilized to test the output of the module to be tested, so that the interface problem of the module can be detected, the inter-module interface test can be carried out in the module function test process, the problem of the inter-module interface test which can be carried out only after the module function test is completed at present is solved, the problem can be found as soon as possible, the module is modified before the module is unshaped, the modification cost is reduced, and the development efficiency is improved.
[ description of the drawings ]
FIG. 1 is a schematic structural diagram of a preferred embodiment of a test system for implementing an interface between modules according to the present invention;
fig. 2 is a flowchart illustrating a testing method for implementing an interface between modules according to a preferred embodiment of the present invention.
[ detailed description ] embodiments
The basic idea of the invention is: acquiring a data packet output by a module to be detected, and detecting fields in the acquired data packet by using the stored interface information to obtain a detection result; the interface information is input interface information of a downstream module of the module to be tested and is used for limiting fields received by the input interface.
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
The present invention provides a test system for an inter-module interface, fig. 1 is a schematic structural diagram of a preferred embodiment of the test system for implementing an inter-module interface according to the present invention, as shown in fig. 1, the system includes: an interface management platform 10 and an interface detection platform 20; wherein, the interface management platform 10 further includes: a Graphical User Interface (GUI) 101, a conflict detection module 102, and a database 103; interface detection platform 20 further includes: a monitoring interface 201, a machine learning module 202 and a detection module 203.
Based on the above system, the present invention further provides a method for testing an interface between modules, fig. 2 is a schematic flow chart of a preferred embodiment of the method for testing an interface between modules according to the present invention, and as shown in fig. 2, the preferred embodiment includes the following steps:
Specifically, interface information of an interface between modules in a system is stored in a database of an interface management platform, wherein the interface information is input interface information of the modules, and the interface information is used for limiting fields in a data packet received in the input interface of the modules; the database stores two levels of interface information, namely first priority interface information and second priority interface information, wherein the comparison priority of the first priority interface information is higher than that of the second priority interface information.
The interface information of the first priority is configured in a database by a GUI (graphical user interface) provided by a user through an interface management platform, and the user is a developer of the module; the interface information of the first priority includes one or any combination of at least two of the following information:
IN: indicates the allowed value of the data IN the field, e.g., the data IN the field must be some value IN (404,403,200);
NOT _ IN: an disallowed value of the data IN the field is indicated, e.g., the data must NOT be a certain value NOT _ IN (404,403,200);
ALL _ NUM: indicating that the data in the field must all be numbers;
ALL _ CHR: indicating that the data in the field must all be characters;
RANGE: represents the RANGE of values of the data in the field, e.g. the data must be within a certain RANGE (100, 500);
NOT _ IN _ RANGE: a value range in which data in the field cannot be located is represented;
CONTAIN: information that the data in the field must contain is represented;
NOT _ CONTAIN: information that the data in the field must not contain;
START _ WITH: indicating the starting data in the field;
NOT _ START _ WITH: indicating the starting data that cannot be present in the field;
LENGTH _ IN: indicating the range of lengths of data in the field.
The interface information of the second priority comprises a value range and a field type of data in a field; the interface information of the second priority is the machine learning module of the interface verification platform, and the interface information is obtained after learning according to the field type of the field transmitted among the modules in the system, the maximum value of data in the field and the minimum value of the data in the field, for example, the field types transmitted by a certain field in the data packet in the interface among the modules are all int32, and the value range of the data in the field is 0-99; and the machine learning module sends the learned interface information to a database of the interface management platform for storage through an interactive interface provided by the interface management platform.
In addition, according to the upgrading condition of the interfaces between the modules, a user can add, delete, modify or query the interface information with the first priority stored in the database through a GUI (graphical user interface), can import the interface information with the first priority into the database in batches, and can export the interface information from the database in batches; if the user modifies the interface information of a certain module, the conflict detection module of the interface management platform can perform modification conflict detection when receiving the modification information of the user, and judge whether the modified interface information conflicts with the interface information of other modules, for example, the field type specified in the modified interface information is the field type which is specified in the input interface information of the downstream module and is not allowed to appear; if not, the modification is allowed, if so, the modification is refused, and the conflict information is reported to the system developer.
Specifically, while performing a function test on a module of the system, a detection module of the interface detection platform captures a data packet output by the module to be tested from an output interface of the module to be tested by using a capture tool, or a monitoring interface of the interface detection platform receives a data packet imported by a user and sends the data packet to the detection module; the detection module analyzes the acquired data packet to obtain fields contained in the data packet, at least two fields are obtained, one field is an identity identification field, the identity identification field contains an identity of a module to which the data packet is sent, after the fields are analyzed, the identity of a downstream module to which the data packet is sent is extracted from the identity identification field, corresponding interface information is obtained from a database through an interactive interface provided by an interface management platform according to the identity of the module, the interface information is input interface information of the downstream module to which the data packet is sent, namely the data packet sent by an output interface of the module to be detected needs to be detected by utilizing the input interface information of the downstream module to be detected, and therefore detection of the interface of the module to be detected is achieved.
After the detection module acquires the interface information, comparing each analyzed field with the interface information by using a Hash algorithm, judging whether the field in the data packet completely conforms to the stipulation of the interface information on the field, if so, determining that the interface between the module to be tested and the downstream module passes the test, otherwise, determining that the interface between the module to be tested and the downstream module does not pass the test; the field may be compared with the interface information of the first priority higher than the comparison priority, and whether the analyzed field completely meets the specification of the interface information of the first priority on the field is determined, for example, whether the value of the data in the field is a value specified in the interface information of the first priority, whether the data in the field includes information that is not allowed to be included in the interface information of the first priority, and the like; when the detection result is that the field completely accords with the field regulation of the interface information of the first priority, judging whether the field in the data packet completely accords with the field regulation of the interface information of the second priority; otherwise, if the field obtained by the analysis does not completely meet the specification of the first priority interface information on the field as a detection result, determining that the interface between the module to be tested and the downstream module fails the test, and executing step 203; other comparison algorithms can be used, in the preferred embodiment, the hash algorithm is used for comparison, which can improve the comparison efficiency, thereby improving the whole testing efficiency, but not limited to the hash algorithm.
The detection module judges whether the field in the data packet completely conforms to the field specification of the interface information of the second priority, for example, whether the numerical value in the field belongs to the value range specified in the interface information of the second priority, and whether the field type conforms to the field type specified in the interface information of the second priority; when the detection result is that the field completely conforms to the field specification of the interface information of the second priority, determining that the interface between the module to be detected and the downstream module passes the test, continuously detecting other fields in the data packet, and if all the fields in the data packet pass the test, continuously acquiring the next data packet for detection; otherwise, if the field is not completely compliant with the specification of the second priority interface information to the field as a result of the detection, it is determined that the interface between the module to be tested and the downstream module fails the test, and step 203 is executed.
And 203, when the detection result is that the interface between the module to be tested and the downstream module fails to be tested, sending alarm information to a user, and acquiring a judgment result of whether the interface information is wrong or not according to the alarm information by the user.
Specifically, when the detection result is that the interface between the module to be detected and the downstream module fails to be tested, the detection module sends alarm information to the user, if the detection result indicates that the data packet sent by the module to be detected cannot be accepted by the downstream module; the alarm information comprises a detected field which does not conform to the interface information and specific non-conforming contents, such as a current value of the field and a value range specified in the interface information; the detection module sends the alarm information to the user, wherein the alarm information can be displayed in real time through a monitoring interface provided by the interface detection platform, or the URL information can be sent to the user periodically through mails or short messages, and the user clicks a link in the URL information to check the alarm information.
After receiving the alarm information, the user judges whether the field in the data packet is wrong or the interface information stored in the database is wrong according to the alarm information; a user judges whether a field in a data packet is wrong or not according to a field error judgment process in the data packet, for example, a general field error in the data packet is caused by inconsistent understanding of users of two modules to an intermediate interface, so that a data packet output by an output interface of an upstream module cannot be accepted by a downstream module, whether a requirement document, an interface description document and an interface use scene defined during module development are wrong or not needs to be judged, if it is determined that relevant contents of the module defined during module development are wrong, the field error in the data packet is represented, a user triggers an end button on a monitoring interface, a judgment result obtained by the monitoring interface is the field error in the data packet, stored interface information is not wrong, a detection module is triggered to end a current detection process, and the user can modify the relevant contents of the originally defined module after the field error is determined; otherwise, if it is determined that the relevant content of the module defined during the module development is not wrong, and the user triggers a modification button on the monitoring interface, the determination result obtained by the monitoring interface is that the field in the data packet is not wrong, but the interface information stored in the database is wrong, and then step 204 is executed.
For example, if the interface is upgraded but the interface information is not upgraded correspondingly in the database, an alarm will be generated, but the alarm is not caused by a field error in the data packet, so that the alarm is a false alarm, and a further judgment needs to be made according to the alarm information.
specifically, the monitoring interface triggers the machine learning module, after receiving the trigger, the machine learning module relearns the field type of the field transmitted among the modules, the maximum value of data in the field and the minimum value of the data in the field to obtain new interface information, and sends the learned new interface information to the database of the interface management platform; and after the database receives the new interface information, replacing the wrong interface information with the new interface information to ensure the correctness of the interface information in the database.
By utilizing the technical scheme provided by the preferred embodiment, the input interface information of the downstream module of the module to be tested can be utilized to test the output of the module to be tested, the interface problem of the module can be detected, the inter-module interface test can be realized in the module function test process, the problem that the inter-module interface test can be carried out only after the module function test is finished at present is solved, the inter-module interface test is carried out during the module function test, the problem can be found as soon as possible, and then the module is modified before the module is unshaped, so that the modification cost is reduced, and the development efficiency is improved. Meanwhile, whether the interface information is wrong or not stored in the database needs to be further confirmed after the alarm, so that the interface information in the database can be modified under the condition that the interface information in the database is wrong, the correctness of the interface information in the database is ensured, and the false alarm is avoided. Because the interface information in the database has higher correctness, the interface information of other modules in the database can be directly utilized to develop the modules when subsequent module development is carried out, thereby reducing the communication of developers and improving the development efficiency.
To implement the above method, as shown in fig. 3, in the testing system of the interface between modules provided by the present invention:
a database 103 for storing interface information; the interface information is input interface information of a downstream module of the module to be tested and is used for limiting fields received by the input interface;
the detection module 203 is configured to obtain a data packet output by a module to be detected, and detect a field in the obtained data packet by using the interface information stored in the database 103 to obtain a detection result.
The detecting module 203 detects the field in the acquired data packet by using the interface information stored in the database specifically includes:
and judging whether the field in the data packet completely conforms to the field regulation of the interface information, if so, determining that the interface between the module to be tested and the downstream module passes the test, otherwise, determining that the interface between the module to be tested and the downstream module does not pass the test.
The detecting module 203 detects the field in the acquired data packet by using the interface information stored in the database specifically includes: judging whether the field in the data packet completely conforms to the stipulation of the first priority interface information in the interface information on the field; if yes, judging whether the field in the data packet completely conforms to the field specification of the interface information with the second priority in the interface information; otherwise, determining that the interface between the module to be tested and the downstream module fails to test; when the field in the data packet completely conforms to the field specification of the interface information of the second priority, determining that the interface between the module to be tested and the downstream module passes the test; otherwise, determining that the interface between the module to be tested and the downstream module fails to test.
The GUI 101 is configured to obtain interface information provided by a user and use the interface information as the interface information of the first priority;
the machine learning module 202 is configured to learn a field type of a field transmitted among modules in the system, a maximum value of data in the field, and a minimum value of the data in the field, so as to obtain the interface information of the second priority.
The GUI 101 is further configured to receive an operation of adding, deleting, modifying, or querying the stored interface information with the first priority, and when the operation of modifying the interface information with the first priority is performed, trigger the conflict detection module 102 in the interface management platform 10 to perform modification conflict detection; or,
the GUI 101 is further configured to import or export interface information of the first priority in bulk.
The step of acquiring, by the detection module 203, the data packet output by the module to be detected specifically includes: capturing a data packet output by a module to be tested from an output interface of the module to be tested, or receiving a data packet imported by a user; and analyzing the acquired data packet to obtain fields contained in the data packet.
The detection module 203 is further configured to extract the identity of the downstream module to which the data packet is sent from the identity field obtained after the analysis, and obtain corresponding interface information from the database 103 according to the identity.
When it is determined that the interface between the module to be tested and the downstream module fails to be tested, the detection module 203 is further configured to send alarm information to a user;
the monitoring interface 201 is configured to obtain a result of determining whether the interface information is incorrect according to the alarm information.
The specific judgment result of the monitoring interface 201 for the user to judge whether the interface information is wrong according to the alarm information is as follows:
if the user triggers an end button, acquiring the judgment result that the stored interface information has no error, and the field in the data packet has an error;
and if the user triggers the modification button, acquiring the judgment result that the stored interface information is wrong.
The machine learning module 202 is further configured to relearn a field type of a field transferred between the modules, a maximum value of data in the field, and a minimum value of data in the field when the interface information has an error, to obtain new interface information, and replace the error interface information with the new interface information.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (20)
1. A method for testing an interface between modules, the method comprising:
acquiring a data packet output by a module to be detected, and detecting fields in the acquired data packet by using the stored interface information to obtain a detection result; the interface information is input interface information of a downstream module of the module to be tested and is used for limiting fields received by the input interface.
2. The method of claim 1, wherein the detecting the fields in the obtained data packet by using the stored interface information is:
and judging whether the field in the data packet completely conforms to the field regulation of the interface information, if so, determining that the interface between the module to be tested and the downstream module passes the test, otherwise, determining that the interface between the module to be tested and the downstream module does not pass the test.
3. The method of claim 1, wherein the detecting the fields in the obtained data packet by using the stored interface information is:
judging whether the field in the data packet completely conforms to the stipulation of the first priority interface information in the interface information on the field; if yes, judging whether the field in the data packet completely conforms to the field specification of the interface information with the second priority in the interface information; otherwise, determining that the interface between the module to be tested and the downstream module fails to test;
when the field in the data packet completely conforms to the field specification of the interface information of the second priority, determining that the interface between the module to be tested and the downstream module passes the test; otherwise, determining that the interface between the module to be tested and the downstream module fails to test.
4. The method of claim 3,
the interface information of the first priority is interface information provided by a user through a Graphical User Interface (GUI);
the interface information of the second priority is obtained by learning the field type of the field, the maximum value of the data in the field and the minimum value of the data in the field which are transmitted among the modules in the system.
5. The method of claim 3 or 4, further comprising:
adding, deleting, modifying or inquiring the stored interface information with the first priority through a GUI (graphical user interface), and detecting modification conflict when modifying the interface information with the first priority; or,
and carrying out batch import or batch export on the interface information of the first priority.
6. The method according to claim 1, wherein the obtaining of the data packet output by the module under test is:
capturing a data packet output by a module to be tested from an output interface of the module to be tested, or receiving a data packet imported by a user;
and analyzing the acquired data packet to obtain fields contained in the data packet.
7. The method of claim 6, wherein before detecting the fields in the obtained data packet using the stored interface information, the method further comprises: and extracting the identity of the downstream module to which the data packet is sent from the identity field obtained after analysis, and acquiring corresponding interface information according to the identity.
8. A method according to claim 2 or 3, characterized in that the method further comprises:
and when determining that the interface between the module to be tested and the downstream module fails to pass the test, sending alarm information to a user, and acquiring a judgment result of whether the interface information is wrong or not according to the alarm information.
9. The method according to claim 8, wherein the obtaining of the result of the judgment of whether the interface information is wrong by the user according to the alarm information is:
if the user triggers an end button, acquiring the judgment result that the stored interface information has no error, and the field in the data packet has an error;
and if the user triggers the modification button, acquiring the judgment result that the stored interface information is wrong.
10. The method according to claim 8 or 9, characterized in that the method further comprises:
and when the interface information has errors, relearning the field type of the field transmitted among the modules, the maximum value of the data in the field and the minimum value of the data in the field to obtain new interface information, and replacing the wrong interface information with the new interface information.
11. A system for testing an interface between modules, the system comprising: the system comprises an interface management platform and an interface detection platform; the interface management platform comprises a database, and the interface detection platform comprises a detection module; wherein,
a database for storing interface information; the interface information is input interface information of a downstream module of the module to be tested and is used for limiting fields received by the input interface;
and the detection module is used for acquiring the data packet output by the module to be detected, and detecting the field in the acquired data packet by using the interface information stored in the database to obtain a detection result.
12. The system according to claim 11, wherein the detecting module, when detecting the field in the acquired data packet by using the interface information stored in the database, specifically:
and judging whether the field in the data packet completely conforms to the field regulation of the interface information, if so, determining that the interface between the module to be tested and the downstream module passes the test, otherwise, determining that the interface between the module to be tested and the downstream module does not pass the test.
13. The system according to claim 11, wherein the detecting module, when detecting the field in the acquired data packet by using the interface information stored in the database, specifically:
judging whether the field in the data packet completely conforms to the stipulation of the first priority interface information in the interface information on the field; if yes, judging whether the field in the data packet completely conforms to the field specification of the interface information with the second priority in the interface information; otherwise, determining that the interface between the module to be tested and the downstream module fails to test;
when the field in the data packet completely conforms to the field specification of the interface information of the second priority, determining that the interface between the module to be tested and the downstream module passes the test; otherwise, determining that the interface between the module to be tested and the downstream module fails to test.
14. The system of claim 13, wherein the interface management platform further comprises a GUI and a machine learning module; wherein,
the GUI is used for acquiring interface information provided by a user and is used as the interface information of the first priority;
the machine learning module is configured to learn a field type of a field transmitted among modules in the system, a maximum value of data in the field, and a minimum value of the data in the field, so as to obtain the interface information of the second priority.
15. The system of claim 13 or 14,
the GUI is also used for receiving the operations of adding, deleting, modifying or inquiring the stored interface information with the first priority, and triggering a conflict detection module in the interface management platform to carry out modification conflict detection when the modification operation is carried out on the interface information with the first priority; or,
the GUI is further configured to bulk import or bulk export the interface information of the first priority.
16. The system according to claim 11, wherein when the detection module obtains the data packet output by the module under test, specifically:
capturing a data packet output by a module to be tested from an output interface of the module to be tested, or receiving a data packet imported by a user; and analyzing the acquired data packet to obtain fields contained in the data packet.
17. The system according to claim 16, wherein the detection module is further configured to extract an identifier of a downstream module to which the data packet is sent from an identifier field obtained after the parsing, and obtain corresponding interface information from the database according to the identifier.
18. The system of claim 12 or 13, wherein the interface detection platform further comprises: monitoring an interface;
when the interface between the module to be tested and the downstream module is determined not to pass the test, the detection module is further used for sending alarm information to a user;
and the monitoring interface is used for acquiring a judgment result of whether the interface information is wrong or not by the user according to the alarm information.
19. The system according to claim 18, wherein when the monitoring interface obtains a result of determining whether the interface information is incorrect by the user according to the alarm information, specifically:
if the user triggers an end button, acquiring the judgment result that the stored interface information has no error, and the field in the data packet has an error;
and if the user triggers the modification button, acquiring the judgment result that the stored interface information is wrong.
20. The system according to claim 18 or 19, wherein the machine learning module is further configured to, when the interface information has an error, relearn the field type of the field passed between the modules, the maximum value of the data in the field, and the minimum value of the data in the field to obtain new interface information, and replace the error interface information with the new interface information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210325447.7A CN103678076B (en) | 2012-09-05 | 2012-09-05 | The test method and system of a kind of intermodule interface |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210325447.7A CN103678076B (en) | 2012-09-05 | 2012-09-05 | The test method and system of a kind of intermodule interface |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103678076A true CN103678076A (en) | 2014-03-26 |
CN103678076B CN103678076B (en) | 2018-06-05 |
Family
ID=50315720
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210325447.7A Active CN103678076B (en) | 2012-09-05 | 2012-09-05 | The test method and system of a kind of intermodule interface |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103678076B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105429982A (en) * | 2015-11-20 | 2016-03-23 | 北京畅游天下网络技术有限公司 | Method and device for analyzing communication content between client and server |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2007110290A1 (en) * | 2006-03-28 | 2007-10-04 | Robert Bosch Gmbh | Method for testing at least one computation unit which is installed in a control device |
CN200996981Y (en) * | 2007-01-22 | 2007-12-26 | 华为技术有限公司 | Terminal-module tester |
CN101262379A (en) * | 2008-04-24 | 2008-09-10 | 中兴通讯股份有限公司 | A real time validation system and method for interface packets |
CN101819550A (en) * | 2009-02-26 | 2010-09-01 | 鸿富锦精密工业(深圳)有限公司 | Interface testing system for serial connecting small computer system |
CN102054133A (en) * | 2009-10-27 | 2011-05-11 | 上海杉达学院 | Interactive page control device of database system |
-
2012
- 2012-09-05 CN CN201210325447.7A patent/CN103678076B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2007110290A1 (en) * | 2006-03-28 | 2007-10-04 | Robert Bosch Gmbh | Method for testing at least one computation unit which is installed in a control device |
CN200996981Y (en) * | 2007-01-22 | 2007-12-26 | 华为技术有限公司 | Terminal-module tester |
CN101262379A (en) * | 2008-04-24 | 2008-09-10 | 中兴通讯股份有限公司 | A real time validation system and method for interface packets |
CN101819550A (en) * | 2009-02-26 | 2010-09-01 | 鸿富锦精密工业(深圳)有限公司 | Interface testing system for serial connecting small computer system |
CN102054133A (en) * | 2009-10-27 | 2011-05-11 | 上海杉达学院 | Interactive page control device of database system |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105429982A (en) * | 2015-11-20 | 2016-03-23 | 北京畅游天下网络技术有限公司 | Method and device for analyzing communication content between client and server |
CN105429982B (en) * | 2015-11-20 | 2019-11-08 | 北京畅游天下网络技术有限公司 | A kind of analysis method and device of client and server Content of Communication |
Also Published As
Publication number | Publication date |
---|---|
CN103678076B (en) | 2018-06-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107766190B (en) | Interface testing method and device, computer equipment and storage medium | |
CN107844421B (en) | Interface testing method and device, computer equipment and storage medium | |
CN106991040B (en) | Data interface testing method and device | |
CN106886494B (en) | Automatic interface testing method and system | |
CN106484611B (en) | Fuzzy test method and device based on automatic protocol adaptation | |
WO2017000424A1 (en) | Protocol detection method and apparatus | |
CN107223257B (en) | Test method, test server and test system | |
CN107870849A (en) | The treating method and apparatus of test log | |
CN107818107B (en) | Method and device for controlling page jump | |
CN116136950B (en) | Chip verification method, device, system, electronic equipment and storage medium | |
CN113572726A (en) | Multi-mode network control-data plane consistency verification method and device | |
CN103678076B (en) | The test method and system of a kind of intermodule interface | |
CN116302902A (en) | Method and device for generating test case, electronic equipment and storage medium | |
CN109614382B (en) | Log segmentation method and device for application | |
CN111193631B (en) | Information processing method, system, and computer-readable storage medium | |
CN109413450B (en) | Bullet screen data integrity verification method and device, terminal and storage medium | |
CN117194259A (en) | Interface testing method, system, electronic equipment and storage medium | |
CN111552967A (en) | Application software security vulnerability detection method | |
CN114500508B (en) | Gas meter upgrading method and device and electronic equipment | |
CN118057771A (en) | Test analysis method and device | |
CN112688947B (en) | Internet-based network communication information intelligent monitoring method and system | |
CN102469450A (en) | Method and device for recognizing virus characteristics of mobile phone | |
CN114579809A (en) | Event analysis method and device, electronic equipment and storage medium | |
CN113407444B (en) | Interface test case generation method, device, equipment and storage medium | |
CN103188117A (en) | Device and method for information interaction server simulation testing |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
EXSB | Decision made by sipo to initiate substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |