CN110377463A - Interface test method, device, terminal and computer readable storage medium - Google Patents

Interface test method, device, terminal and computer readable storage medium Download PDF

Info

Publication number
CN110377463A
CN110377463A CN201910533693.3A CN201910533693A CN110377463A CN 110377463 A CN110377463 A CN 110377463A CN 201910533693 A CN201910533693 A CN 201910533693A CN 110377463 A CN110377463 A CN 110377463A
Authority
CN
China
Prior art keywords
instruction
parametrization
character string
message
interface
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.)
Pending
Application number
CN201910533693.3A
Other languages
Chinese (zh)
Inventor
吕小立
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Priority to CN201910533693.3A priority Critical patent/CN110377463A/en
Publication of CN110377463A publication Critical patent/CN110377463A/en
Priority to PCT/CN2019/122070 priority patent/WO2020253124A1/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/2221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test input/output devices or peripheral units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3041Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is an input/output interface

Abstract

The invention discloses a kind of interface test methods, comprising: obtains the data packet for the message instruction transmitted in the application programming interfaces of client;It is searched in preset parametrization instruction set according to data packet, obtains corresponding parametrization instruction;Message corresponding in data packet instruction is carried out being converted to visual character string according to parametrization instruction, and by visual character string display in terminal interface;Visual character string preset standard characters corresponding with parametrization instruction is compared;If there is the character string different from standard characters in visual character string, different character strings is highlighted.The present invention also provides a kind of interface test device, terminal and computer readable storage mediums.Technical solution proposed by the present invention is based on visualization and converts to message instruction, can directly carry out visualization verifying to the message instruction transmitted based on long connection message agreement, promote the efficiency and quality of test verifying.

Description

Interface test method, device, terminal and computer readable storage medium
Technical field
The present invention relates to interface testing technical field more particularly to a kind of interface test method, device, terminal and computers Readable storage medium storing program for executing.
Background technique
Whether the interface sending and receiving data in order to know application program is normal, needs the instruction of the interface transmitting-receiving to application program Test verifying is carried out, traditional test verification mode is that client sends request instruction to server-side, receives what server-side returned Message instruction, whether being successfully tested further according to message instruction is determining, and the data of the interface based on long connection message agreement are received Hair principle is server-side active transmission message instruction to client, and client is done according to the transmission message instruction received into one The data processing of step, therefore, pervious interface test method are no longer applicable in.
Therefore, how to realize that the interface testing based on long connection message agreement is a kind of urgent problem to be solved.
Summary of the invention
The main purpose of the present invention is to provide a kind of interface test method, device, terminal and computer-readable storage mediums Matter, it is intended to solve the technical issues of how realizing the interface testing based on long connection message agreement.
To achieve the above object, the present invention provides a kind of interface test method, and the interface test method includes:
Interface test method, which is characterized in that the interface test method includes:
Obtain the data packet for the message instruction transmitted in the application programming interfaces of client;
It is searched in preset parametrization instruction set according to the data packet, obtains corresponding parametrization instruction;
Message corresponding in data packet instruction is carried out being converted to visual character string according to parametrization instruction, And by the visual character string display in terminal interface;
The visual character string preset standard characters corresponding with the parametrization instruction is compared;
It, will be described different if there is the character string different from the standard characters in the visual character string Character string is highlighted.
Preferably, described to be searched in preset parametrization instruction set according to the data packet, it obtains corresponding Parameterizing the step of instructing includes:
The instruction head text that parsing obtains all message instructions in data packet is carried out to the data packet;
Matched and searched is carried out in parametrization instruction set according to the instruction head text of message instruction;
The identical parametrization of the instruction head text of head text and message instruction is instructed to instruct in getting parms instruction set, and will The message instruction carries out corresponding association with parametrization instruction.
Preferably, described that message corresponding in data packet instruction be converted to visually according to parametrization instruction The character string of change, and include: in the step of terminal interface by the visual character string display
Obtain the field type and field length of the parametrization instruction;
Corresponding information command is converted into corresponding field type according to the field type;
Corresponding length is set by the message instruction after conversion according to the field length, obtains visual character String, and by the visual character string display in terminal interface.
Preferably, if there is the character string different from the standard characters in the visual character string, After the step of different character string is highlighted, further includes:
Obtain the preset configuration file of terminal;
By the different character string and message corresponding from different character string instruction with the configuration file Corresponding sending method is sent to reparation personnel.
Preferably, the step of the data packet for obtaining the message instruction transmitted in the application programming interfaces of client Before rapid, further includes:
Receive the conversion command for parameterizing the code of application program of tester's input;
The exploitation instruction code set of preset specification protocol and the application program is obtained according to the conversion command;
The instruction code in the exploitation instruction code set is converted into extensible markup language according to the specification protocol The parametrization instruction for saying format, forms parametrization instruction set.
It is preferably, described that according to the specification protocol, by the instruction code in the exploitation instruction code set, be converted into can The parametrization of extending mark language format instructs, and forms the step of parameterizing instruction set and includes:
Judge in the exploitation instruction code set with the presence or absence of the instruction code in field type with structural body;
If in the exploitation instruction code set, there are the instruction codes in field type with structural body, according to Specification protocol refers to the parametrization that the instruction code in the exploitation instruction code set is converted into extensible markup language format It enables, and carries out in the instruction of parametrization that the instruction code with structural body is converted into customized, re-form parametrization instruction set It closes.
Preferably, the step of the data packet for obtaining the message instruction transmitted in the application programming interfaces of client Before rapid, further includes:
Receive the enabled instruction of tester's input;
Corresponding test script is called according to the enabled instruction;
Application programming interfaces are monitored in real time according to the test script.
In addition, the present invention also provides a kind of interface test device, the interface test device includes:
Module is obtained, the acquisition module refers to for obtaining the message transmitted in the application programming interfaces of client The data packet of order;
Searching module, the searching module according to the data packet in preset parametrization instruction set for being looked into It looks for, obtains corresponding parametrization instruction;
Conversion module, the conversion module be used for according to the parametrization instruct to message corresponding in data packet instruct into Row is converted to visual character string, and by the visual character string display in terminal interface;
Contrast module, the contrast module are used for the visual character string and the parametrization instruction is corresponding pre- If standard characters compare;
Prominent module, if the prominent module in the visual character string for existing with the standard characters not Same character string, then highlight the different character string.
The present invention also provides a kind of terminal, including processor, memory and be stored on the memory can be by institute State the interface testing program of processor execution, wherein when the interface testing program is executed by the processor, realize institute as above The step of interface test method stated.
The present invention also provides a kind of computer readable storage medium, interface is stored on the computer readable storage medium Test program, wherein when the interface testing program is executed by processor, realize the step of interface test method as described above Suddenly.
In technical solution of the present invention, the data for the message instruction transmitted in the application programming interfaces of client are obtained Packet;It is searched in preset parametrization instruction set according to data packet, obtains corresponding parametrization instruction;According to parametrization Instruction be converted to visual character string to message corresponding in data packet instruction, and by visual character string display In terminal interface;Visual character string preset standard characters corresponding with parametrization instruction is compared;If visual There is the character string different from standard characters in the character string of change, then highlights different character strings.The present invention The technical solution of proposition is based on visualization and converts to message instruction, is connect the application program of client using parametrization instruction The message instruction of port transmission is converted to visual character string, and is shown in terminal interface, to facilitate tester to character string Visual verification is carried out, then visual character string is compared respectively automatically with standard characters, it will be with standard characters not Same character string is highlighted.Therefore, the present invention can instruct the message transmitted based on long connection message agreement direct Visualization verifying is carried out, the time of exploitation reparation problem is shortened, promotes the efficiency and quality of test verifying.
Detailed description of the invention
Fig. 1 is the hardware structural diagram of terminal involved in the embodiment of the present invention;
Fig. 2 is the flow diagram of interface test method first embodiment of the present invention;
Fig. 3 is to be searched in preset parametrization instruction set in the embodiment of the present invention according to the data packet, is obtained The process refinement schematic diagram of the step of corresponding parametrization instruction;
Fig. 4 is to be converted according to parametrization instruction to message corresponding in data packet instruction in the embodiment of the present invention It obtains visual character string, and process refinement of the visual character string display in the terminal interface the step of is illustrated Figure;
Fig. 5 is the flow diagram of interface test method second embodiment of the present invention;
Fig. 6 is the flow diagram of interface test method 3rd embodiment of the present invention;
Fig. 7 is to be known described instruction code being converted into extensible markup language according to the specification protocol in the embodiment of the present invention The process refinement schematic diagram for the step of saying the parametrization instruction of format;
Fig. 8 is the flow diagram of interface test method fourth embodiment of the present invention;
Fig. 9 is the module diagram of interface test device of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The present embodiments relate to interface test method be mainly used in terminal, which can be PC, portable calculating The equipment that machine, mobile terminal etc. have display and processing function.
Referring to Fig.1, Fig. 1 is terminal structure schematic diagram involved in the embodiment of the present invention.In the embodiment of the present invention, eventually End may include processor 1001 (such as CPU), communication bus 1002, user interface 1003, network interface 1004, memory 1005.Wherein, communication bus 1002 is for realizing the connection communication between these components;User interface 1003 may include display Shield (Display), input unit such as keyboard (Keyboard);Network interface 1004 optionally may include that the wired of standard connects Mouth, wireless interface (such as WI-FI interface);Memory 1005 can be high speed RAM memory, be also possible to stable memory (non-volatile memory), such as magnetic disk storage, memory 1005 optionally can also be independently of aforementioned processor 1001 storage device.
It will be understood by those skilled in the art that hardware configuration shown in Fig. 1 does not constitute the restriction to equipment, can wrap It includes than illustrating more or fewer components, perhaps combines certain components or different component layouts.
With continued reference to Fig. 1, the memory 1005 in Fig. 1 as a kind of computer readable storage medium may include operation system System, network communication module and interface testing program.
In Fig. 1, network communication module is mainly used for connecting server, carries out data communication with server;And processor 1001 can call the interface testing program stored in memory 1005, and the step of executing interface test method.
Based on the hardware configuration of above-mentioned terminal, each embodiment of interface test method of the present invention is proposed.
The present invention provides a kind of interface test method.
Referring to Fig. 2, in the first embodiment of the invention, interface test method the following steps are included:
Step S100 obtains the data packet for the message instruction transmitted in the application programming interfaces of client;
Specifically, in the present embodiment, application program (e.g., chat program) is based on socket agreement and server-side establishes long connect It connects, to realize certain functions.The continual various message of transmission of server-side are instructed to client, and the application program of client is being transported Various message are uninterruptedly returned in the remittance of row process to instruct to server-side.Terminal in the operational process of application program, answering by crawl With the data packet of all message instructions interacted between program and server-side, that is, obtain in the interface of application program The data packet for the message instruction transmitted.In the present embodiment, it is not necessarily to simulant-client environment, it can be in the application journey of client Directly the data in transmission are grabbed during sort run, do not influence the use of client, without closing client Application program, to get rid of the dependence to client.
Wherein, it should be noted that a data packet may include one or more message instructions, each message instruction In have an instruction head text (instruction Key), instructing in Key includes " cmd " and " para ", for example, the instruction of a certain instruction Head text is " cmd=2, para=4 ", instruction Key is to carry out matched and searched to parametrization instruction hereinafter.
Step S200 is searched in preset parametrization instruction set according to the data packet, obtains corresponding ginseng Numberization instruction;
After the data packet for getting message instruction, carried out in preset parametrization instruction set according to the data packet With lookup, will be found out with the parametrization instruction of the message instruction Corresponding matching in data packet, to refer to corresponding message Enable conversion.It should be noted that including multiple parametersization instruction in preset parametrization instruction set, by the original to develop The parametrization for the extensible markup language format that beginning instruction code is converted to instructs, and the parameter instruction more having is integrated into It is formed together parametrization instruction set.
Specifically, referring to figure 3., Fig. 3 is according to the data packet in the embodiment of the present invention in preset parametrization instruction set The process refinement schematic diagram for the step of being searched in conjunction, obtaining corresponding parametrization instruction, based on the above embodiment, step S200 includes:
Step S210 carries out the instruction head text that parsing obtains all message instructions in data packet to the data packet;
Specifically, after getting the data packet that terminal and server-side interact, data packet is parsed, obtains number According to all message instructions in packet, then the instruction key of all message instructions is obtained, the instruction key that message instructs is known as First instruction head text.
Step S220 carries out matched and searched in parametrization instruction set according to the instruction head text of message instruction;
Specifically, it after the instruction for getting message instruction after title, is being parameterized according to the instruction head text that message instructs Matched and searched is carried out in instruction set, that is, all parametrization instructions in traversal parametrization instruction set, by message instruction Instruction head text and the instruction head text of parametrization instruction compare one by one, search the identical parametrization of instruction head text instructed with message and refer to The instruction head text of order.
Step S230, the identical parametrization of the instruction head text of instruction head text and message instruction in getting parms instruction set Instruction, and message instruction is subjected to corresponding association with parametrization instruction.
Specifically, after carrying out searching matching one by one to the parametrization instruction in parametrization instruction set, getting parms Instruction set instructs the identical parametrization of the instruction head text of head text and message instruction to instruct in closing, then the instruction head that will be found is literary Consistent message instruction carries out corresponding association with parametrization instruction.
Step S300 carries out being converted to visualization according to parametrization instruction to message corresponding in data packet instruction Character string, and by the visual character string display in terminal interface;
After getting parametrization instruction corresponding with message instruction, instructed according to the parametrization to corresponding in data packet Message instruction is converted, and obtains visual character string, after obtaining visual character string, visual character string is shown It is shown in terminal interface, so that tester carries out test verifying to character string.
Specifically, referring to figure 4., Fig. 4 is according to parametrization instruction in the embodiment of the present invention to corresponding in data packet Message instruction carry out being converted to visual character string, and by the visual character string display in the step of terminal interface Rapid process refinement schematic diagram, based on the above embodiment, step S300 includes:
Step S310 obtains the field type and field length of the parametrization instruction;
Definition has field type and field length in parametrization instruction, wherein in parametrization instruction, field indicates definition Field in structural body;When the attribute of field be type when, indicate field type, field type include ushort, uint, The types such as byte, string show that the field type is also a structural body when field type is with symbol ": " beginning; When the attribute of field is length, indicate that the length of field, the length of field directly can define length with numerical value, it can also be with Meet ": " beginning, generally in the form of ": size ", size is directed to length defined in the field size of current structure body.It is needing When being converted according to parametrization instruction to message instruction, the field type and field of available parametrization instruction are long Degree.
The instruction of corresponding message is converted into corresponding field type according to the field type by step S320;
Specifically, after getting field type and the field length in parametrization instruction, according to the field type of acquisition By the corresponding field type of the conversion buffered energy of message instruction in data packet, for example, message is referred to when field type is I type Order is also converted into I type.
Step S330 sets corresponding length for the message instruction after conversion according to the field length, obtains visual The character string of change, and by the visual character string display in terminal interface.
Specifically, after message instruction is converted into corresponding field type, after being converted according to the field length of acquisition Message instruct the length that is contoured to correspond to, obtain visual character string, and by visual character string display in terminal circle Face, so that tester carries out visual verification.
Step S400, by the visual character string preset standard characters corresponding with the parametrization instruction into Row comparison;
Specifically, message instruction of each transmission can be corresponding with one expected from response therefore in the terminal can be with Default standard characters corresponding with parametrization message instruction, after obtaining visual character string, by visual character string It is compared with the corresponding preset standard characters of parametrization instruction, search to visualize whether there is and standard word in character string The different character string of symbol string, with the realization correctness of test interface corresponding function.
Step S500 will if there is the character string different from the standard characters in the visual character string The different character string is highlighted.
If there is the character string different from standard characters in visual character string, character that can be different to this String is highlighted, for example, can carry out marking red display to the different character string or overstriking is shown, to prompt tester There are the different character strings by member, that is, there are problems for the message instruction of interface transmission.If be not present in visual character string The character string different from standard characters does not then carry out specially treated to the visualization character string for being shown in terminal interface.
In technical solution of the present invention, the data for the message instruction transmitted in the application programming interfaces of client are obtained Packet;It is searched in preset parametrization instruction set according to data packet, obtains corresponding parametrization instruction;According to parametrization Instruction be converted to visual character string to message corresponding in data packet instruction and by visual character string display In terminal interface;Visual character string preset standard characters corresponding with parametrization instruction is compared;If visual There is the character string different from standard characters in the character string of change, then highlights different character strings.The present invention The technical solution of proposition is based on visualization and converts to message instruction, is connect the application program of client using parametrization instruction The message instruction of port transmission is converted to visual character string, and is shown in terminal interface, to facilitate tester to character string Visual verification is carried out, then visual character string is compared respectively automatically with standard characters, it will be with standard characters not Same character string is highlighted.Therefore, the present invention can instruct the message transmitted based on long connection message agreement direct Visualization verifying is carried out, the time of exploitation reparation problem is shortened, promotes the efficiency and quality of test verifying.
Further, referring to figure 5., Fig. 5 is the flow diagram of interface test method second embodiment of the present invention, is based on First embodiment, after step S500, further includes:
Step S600 obtains the preset configuration file of terminal;
Specifically, if visual character string has the character string different from standard characters, illustrate to need Tester is wanted to carry out exploitation reparation, thus, it is possible to obtain preset configuration file in terminal, parsing to configuration file can To obtain corresponding sending method and repair personnel.Wherein, sending method may include mail is sent, short message is sent etc..
Step S700, by the different character string and message corresponding from different character string instruction with described The corresponding sending method of configuration file is sent to reparation personnel.
After getting sending method, by different character strings and message corresponding from different character strings instruction with The corresponding sending method of configuration file is sent to reparation personnel, which reparation personnel can be directly targeted to and instruct there are problem, The corresponding instruction of character string of problems is directly found, so that the precision of test verifying orientation problem is improved, so as to shorten opening Send out the time repaired.
Further, Fig. 6 is please referred to, Fig. 6 is the flow diagram of interface test method 3rd embodiment of the present invention, is based on First embodiment, before step S100, further includes:
Step S110 receives the conversion command for parameterizing the code of application program of tester's input;
It, can be first to for opening before needing the data of the application programming interfaces transmission to client to carry out test verifying The original instruction code for sending out the application program carries out the conversion of format.Specifically, it is needing to survey a certain application program When test card, terminal can receive tester and input the conversion command for parameterizing the code of application program.
Step S120 is instructed according to the exploitation that the conversion command obtains preset specification protocol and the application program Code collection;
In the conversion command that the code got application program parameterizes, obtained according to the conversion command preset The exploitation instruction code set of specification protocol and the application program.Wherein, preset specification protocol may include standard agreement With customized specification protocol, standard agreement can be message protocol etc., and customized specification protocol is by user according to practical need Ask definition.The exploitation instruction code set of application program is the instruction code pattern based on socket agreement, to application program It is developed.
Step S130, being converted into the instruction code in the exploitation instruction code set according to specification protocol knowledge can The parametrization of extending mark language format instructs, and forms parametrization instruction set.
After getting specification protocol, the instruction of instruction code in exploitation instruction code set is identified according to specification protocol Head literary (cmd and para), field type and field length;Generate include instruction head literary (cmd and para), field type and The parametrization of the extensible markup language format (XML format) of field length instructs, and forms parametrization instruction set.
Specifically, Fig. 7 is please referred to, Fig. 7 is to know according to the specification protocol by described instruction code in the embodiment of the present invention The process refinement schematic diagram for the step of being converted into the parametrization instruction of extensible markup language format, is based on 3rd embodiment, step Suddenly S130 includes:
Step S131 judges in the exploitation instruction code set with the presence or absence of the instruction in field type with structural body Code;
Specifically, after getting exploitation instruction code, judge to whether there is in the exploitation instruction code set got With the instruction code of structural body in field type, that is, when field type is with symbol ": " beginning, show the field type It is a structural body, for example,<feild type=": stMQ [] " length=": size_ " name=" list_ "/>, stMQ [] is minor structure body.
Step S132, if it is described exploitation instruction code set in there are in field type with structural body instruction code, The instruction code in the exploitation instruction code set is then converted by extensible markup language format according to the specification protocol Parametrization instruction, and carry out in the instruction of parametrization that the instruction code with structural body is converted into customized, re-form ginseng Numberization instruction set;
Specifically, if concentrated in exploitation instruction code, there are the instruction code in field type with structural body, roots After being converted into the parametrization instruction of extensible markup language format according to the instruction code that specification protocol will develop instruction code concentration, Need in field type with structural body instruction code be converted into parametrization instruction in carry out it is customized, with formed specification Parametrization instruction, all parametrization instructions are summarised in again after custom parameterization instruction and are formed together parametrization instruction set It closes.If there is no the instruction codes in field type with structural body in exploitation instruction code set, directly according to rule Model agreement instructs the parametrization that the instruction code developed in instruction code set is converted into extensible markup language format, is formed Parameterize instruction set.
For example, when exploitation instruction code are as follows:
Cmd=2para=14,
{public struct stRoomResMicQueue
public ushort cmd;
public ushort para;
public uint room_id_;
public ushort size_;
public stMQ[]list_;
}
{public struct stMQ
Public byte index;// Mai Xu
Public uint userid;// user
}
The parametrization instruction being converted into are as follows:
< struct cmd=" 2 " para=" 14 " name=" stRoomResMicQueue " description=" is returned Room wheat sequence table " >
<feild type=" ushort " name=" cmd "/>
<feild type=" ushort " name=" para "/>
<feild type=" uint " name=" room_id_ "/>
<feild type=" ushort " name=" size_ "/>
<feild type=": stMQ [] " length=": size_ " name=" list_ "/>
</struct>
</struct>
<struct cmd=" -999 " para=" -999 " name=" stMQ " description=" ">
<feild type=" byte " name=" index "/>
<feild type=" uint " name=" userid "/>
</struct>
Wherein, struct is definition structure body;Attribute cmd para in struct is unique key of instruction;structt In attribute description be instruction description.The attribute name of field refers to the title of field.Develop instruction code There is structural body stMQ [], customized cmd=" -999 " para="-in the parametrization instruction being converted into field type 999"。
Further, Fig. 8 is please referred to, Fig. 8 is the flow diagram of interface test method fourth embodiment of the present invention, is based on First embodiment, before step S100 further include:,
Step S140 receives the enabled instruction of tester's input;
When tester needs the interface to a certain application program of client to test, needs to input to terminal and open The enabled instruction monitored the interface of the application program is opened, terminal will receive the enabled instruction of tester's input.
Step S150 calls corresponding test script according to the enabled instruction;
The test script for tester will be previously stored with writing in the terminal, terminal can answered by the test script It is monitored with the instruction transmitted in the interface of program.Specifically, terminal is transferring correspondence after receiving enabled instruction from the background Test script.
Step S160 monitors application programming interfaces according to the test script in real time.
Specifically, it is monitored in real time according to the test script transferred using application programming interfaces, directly to grab in real time The data packet for getting all message instructions interacted between application program and server-side, does not interfere in client using journey The use of sequence.
In addition, please referring to Fig. 9, the present invention also provides a kind of interface test device 10, the interface test device 10 includes:
Module 20 is obtained, the acquisition module is for obtaining the message transmitted in the application programming interfaces of client The data packet of instruction;
Searching module 30, the searching module according to the data packet in preset parametrization instruction set for carrying out It searches, obtains corresponding parametrization instruction;
Conversion module 40, the conversion module are used to instruct message corresponding in data packet according to parametrization instruction It carries out being converted to visual character string, and by the visual character string display in terminal interface;
Contrast module 50, the contrast module are used for the visual character string is corresponding with the parametrization instruction Preset standard characters compares;
Prominent module 60, if the prominent module in the visual character string for existing and the standard characters Different character strings then highlights the different character string.
Further, the searching module 30 is also used to:
The instruction head text that parsing obtains all message instructions in data packet is carried out to the data packet;
Matched and searched is carried out in parametrization instruction set according to the instruction head text of message instruction;
The identical parametrization of the instruction head text of head text and message instruction is instructed to instruct in getting parms instruction set, and will The message instruction carries out corresponding association with parametrization instruction.
Further, the conversion module 40 is also used to:
Obtain the field type and field length of the parametrization instruction;
Corresponding information command is converted into corresponding field type according to the field type;
Corresponding length is set by the message instruction after conversion according to the field length, obtains visual character String, and by the visual character string display in terminal interface.
Further, the interface test device 10 further include:
The acquisition module is also used to obtain the preset configuration file of terminal;
Sending module, the sending module are used for the different character string and corresponding from the different character string Message instruct reparation personnel be sent to the corresponding sending method of the configuration file.
Further, the interface test device 10 further include:
First receiving module, first receiving module be used for receive tester input the code by application program into The conversion command of row parametrization;
The acquisition module is also used to obtain preset specification protocol and the application program according to the conversion command Exploitation instruction code set;
The conversion module be also used to according to the specification protocol by it is described exploitation instruction code set in instruction code It is converted into the parametrization instruction of extensible markup language format, forms parametrization instruction set.
Further, the interface test device 10 further include:
Judgment module, the judgment module is for judging in the exploitation instruction code set with the presence or absence of in field type Instruction code with structural body;
If the conversion module is also used in the exploitation instruction code set, there are have structural body in field type Instruction code in the exploitation instruction code set is then converted into extensible markup according to the specification protocol by instruction code The parametrization of language format instructs, and carry out in the parametrization instruction that the instruction code with structural body is converted into it is customized, Re-form parametrization instruction set.
Further, the interface test device 10 further include:
Second receiving module, second receiving module are used to receive the enabled instruction of tester's input;
Calling module, the calling module are used to call corresponding test script according to the enabled instruction;
Module is monitored, the monitoring module for monitoring application programming interfaces according to the test script in real time.
Wherein, modules are opposite with each step in above-mentioned interface test method embodiment in above-mentioned interface test device 10 It answers, function and realization process no longer repeat one by one here.
In addition, the present invention also provides a kind of computer readable storage mediums.
Interface testing program is stored on computer readable storage medium of the present invention, wherein interface testing program is processed When device executes, realize such as the step of above-mentioned interface test method.
Wherein, interface testing program, which is performed realized method, can refer to each reality of interface test method of the present invention Example is applied, details are not described herein again.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
It should be noted that in the claims, any reference symbol between parentheses should not be configured to power The limitation that benefit requires.Word "comprising" does not exclude the presence of component or step not listed in the claims.Before component Word "a" or "an" does not exclude the presence of multiple such components.The present invention can be by means of including several different components It hardware and is realized by means of properly programmed computer.In the unit claims listing several devices, these are filled Several in setting, which can be, to be embodied by the same item of hardware.The use of word first, second, and third is not Indicate any sequence.These words can be construed to title.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basic Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as It selects embodiment and falls into all change and modification of the scope of the invention.
The above description is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all at this Under the inventive concept of invention, using equivalent structure transformation made by description of the invention and accompanying drawing content, or directly/use indirectly It is included in other related technical areas in scope of patent protection of the invention.

Claims (10)

1. a kind of interface test method, which is characterized in that the interface test method includes:
Obtain the data packet for the message instruction transmitted in the application programming interfaces of client;
It is searched in preset parametrization instruction set according to the data packet, obtains corresponding parametrization instruction;
Message corresponding in data packet instruction is carried out according to parametrization instruction to be converted to visual character string, and will The visual character string display is in terminal interface;
The visual character string preset standard characters corresponding with the parametrization instruction is compared;
If there is the character string different from the standard characters in the visual character string, by the different character String is highlighted.
2. interface test method as described in claim 1, which is characterized in that it is described according to the data packet in preset parameter Change and searched in instruction set, obtaining the step of corresponding parametrization instructs includes:
The instruction head text that parsing obtains all message instructions in data packet is carried out to the data packet;
Matched and searched is carried out in parametrization instruction set according to the instruction head text of message instruction;
The identical parametrization of the instruction head text of head text and message instruction is instructed to instruct in getting parms instruction set, and will be described Message instruction carries out corresponding association with parametrization instruction.
3. interface test method as described in claim 1, which is characterized in that described to be instructed according to the parametrization to data packet In the instruction of corresponding message carry out being converted to visual character string, and by the visual character string display in terminal circle The step of face includes:
Obtain the field type and field length of the parametrization instruction;
Corresponding information command is converted into corresponding field type according to the field type;
Corresponding length is set by the message instruction after conversion according to the field length, obtains visual character string, and By the visual character string display in terminal interface.
4. interface test method as claimed in any one of claims 1-3, which is characterized in that if the visual word There is the character string different from the standard characters in symbol string, then the step of being highlighted the different character string Later, further includes:
Obtain the preset configuration file of terminal;
The different character string and message corresponding from different character string instruction is corresponding with the configuration file Sending method be sent to reparation personnel.
5. interface test method as claimed in any one of claims 1-3, which is characterized in that acquisition the answering in client Before the step of data packet instructed with the message transmitted in routine interface, further includes:
Receive the conversion command for parameterizing the code of application program of tester's input;
The exploitation instruction code set of preset specification protocol and the application program is obtained according to the conversion command;
The instruction code in the exploitation instruction code set is converted into extensible markup language lattice according to the specification protocol The parametrization of formula instructs, and forms parametrization instruction set.
6. interface test method as claimed in claim 5, which is characterized in that it is described according to the specification protocol by the exploitation Instruction code in instruction code set is converted into the parametrization instruction of extensible markup language format, forms parametrization instruction set The step of conjunction includes:
Judge in the exploitation instruction code set with the presence or absence of the instruction code in field type with structural body;
If in the exploitation instruction code set, there are the instruction codes in field type with structural body, according to the specification Agreement instructs the parametrization that the instruction code in the exploitation instruction code set is converted into extensible markup language format, and It is carried out in the instruction of parametrization that the instruction code with structural body is converted into customized, re-forms parametrization instruction set.
7. interface test method as claimed in any one of claims 1-3, which is characterized in that acquisition the answering in client Before the step of data packet instructed with the message transmitted in routine interface, further includes:
Receive the enabled instruction of tester's input;
Corresponding test script is called according to the enabled instruction;
Application programming interfaces are monitored in real time according to the test script.
8. a kind of interface test device, which is characterized in that the interface test device includes:
Module is obtained, the module that obtains is used to obtain the message instruction transmitted in the application programming interfaces of client Data packet;
Searching module, the searching module are used to be searched in preset parametrization instruction set according to the data packet, Obtain corresponding parametrization instruction;
Conversion module, the conversion module are used to turn message corresponding in data packet instruction according to parametrization instruction Get visual character string in return, and by the visual character string display in terminal interface;
Contrast module, the contrast module are used for the visual character string and the parametrization instruction is corresponding preset Standard characters compares;
Prominent module, if the prominent module is different from the standard characters for existing in the visual character string Character string then highlights the different character string.
9. a kind of terminal, which is characterized in that including processor, memory and be stored on the memory can be described The interface testing program that processor executes, wherein when the interface testing program is executed by the processor, realize as right is wanted The step of interface test method described in asking any one of 1 to 7.
10. a kind of computer readable storage medium, which is characterized in that be stored with interface survey on the computer readable storage medium Try program, wherein when the interface testing program is executed by processor, realize connecing as described in any one of claims 1 to 7 The step of mouth test method.
CN201910533693.3A 2019-06-19 2019-06-19 Interface test method, device, terminal and computer readable storage medium Pending CN110377463A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910533693.3A CN110377463A (en) 2019-06-19 2019-06-19 Interface test method, device, terminal and computer readable storage medium
PCT/CN2019/122070 WO2020253124A1 (en) 2019-06-19 2019-11-29 Interface testing method and device, terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910533693.3A CN110377463A (en) 2019-06-19 2019-06-19 Interface test method, device, terminal and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN110377463A true CN110377463A (en) 2019-10-25

Family

ID=68249332

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910533693.3A Pending CN110377463A (en) 2019-06-19 2019-06-19 Interface test method, device, terminal and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN110377463A (en)
WO (1) WO2020253124A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020253124A1 (en) * 2019-06-19 2020-12-24 深圳壹账通智能科技有限公司 Interface testing method and device, terminal and computer readable storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000022517A1 (en) * 1998-10-13 2000-04-20 Codagen Technologies Corp. Component-based source code generator
CN1524217A (en) * 2000-06-22 2004-08-25 Distributed computing services platform
US20100042975A1 (en) * 2008-08-13 2010-02-18 Honeywell International Inc. Message logging for software applications
EP2453370A1 (en) * 2010-11-12 2012-05-16 Business Objects Software Limited Method and system for specifying, preparing and using parameterized database queries
CN107908541A (en) * 2017-07-26 2018-04-13 平安壹钱包电子商务有限公司 Interface test method, device, computer equipment and storage medium
CN109101415A (en) * 2018-06-25 2018-12-28 平安科技(深圳)有限公司 Interface test method, system, equipment and the storage medium compared based on database
CN109614309A (en) * 2018-10-22 2019-04-12 中国平安财产保险股份有限公司 Compare the method, apparatus, computer equipment and storage medium of test result
CN109766262A (en) * 2018-12-15 2019-05-17 深圳壹账通智能科技有限公司 Interface data processing method, automated testing method, device, equipment and medium
CN109902274A (en) * 2019-02-22 2019-06-18 今天东翼科技有限公司 A kind of method and system converting json character string to thrift binary stream

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030083838A1 (en) * 2001-10-31 2003-05-01 Barrett Richard M. Wireless test and measurement method
CN101378548A (en) * 2008-09-23 2009-03-04 中兴通讯股份有限公司 Method and apparatus for implementing conversion of AT command and business message
CN108009136B (en) * 2017-10-31 2021-09-21 努比亚技术有限公司 Message correction method, mobile terminal and computer readable storage medium
CN110377463A (en) * 2019-06-19 2019-10-25 深圳壹账通智能科技有限公司 Interface test method, device, terminal and computer readable storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000022517A1 (en) * 1998-10-13 2000-04-20 Codagen Technologies Corp. Component-based source code generator
CN1524217A (en) * 2000-06-22 2004-08-25 Distributed computing services platform
US20100042975A1 (en) * 2008-08-13 2010-02-18 Honeywell International Inc. Message logging for software applications
EP2453370A1 (en) * 2010-11-12 2012-05-16 Business Objects Software Limited Method and system for specifying, preparing and using parameterized database queries
CN107908541A (en) * 2017-07-26 2018-04-13 平安壹钱包电子商务有限公司 Interface test method, device, computer equipment and storage medium
CN109101415A (en) * 2018-06-25 2018-12-28 平安科技(深圳)有限公司 Interface test method, system, equipment and the storage medium compared based on database
CN109614309A (en) * 2018-10-22 2019-04-12 中国平安财产保险股份有限公司 Compare the method, apparatus, computer equipment and storage medium of test result
CN109766262A (en) * 2018-12-15 2019-05-17 深圳壹账通智能科技有限公司 Interface data processing method, automated testing method, device, equipment and medium
CN109902274A (en) * 2019-02-22 2019-06-18 今天东翼科技有限公司 A kind of method and system converting json character string to thrift binary stream

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020253124A1 (en) * 2019-06-19 2020-12-24 深圳壹账通智能科技有限公司 Interface testing method and device, terminal and computer readable storage medium

Also Published As

Publication number Publication date
WO2020253124A1 (en) 2020-12-24

Similar Documents

Publication Publication Date Title
CN106155891B (en) Interface test method, interface description data library generating method and device
CN109446071A (en) Interface test method, interface test device, electronic equipment and storage medium
CN109768970B (en) Configurable universal protocol generation method
CN108897691A (en) Data processing method, device, server and medium based on interface analog service
CN110389898A (en) Acquisition methods, device, terminal and the computer readable storage medium of Test Strategy
CN110442524A (en) It is a kind of for have Certificate Authority web service interface test method and device
CN109726108B (en) Front-end code testing method, device, system and medium based on analog data
CN111813701B (en) HTTP-based interface testing method and device, computer equipment and storage medium
CN108459850B (en) Method, device and system for generating test script
CN108737243A (en) Conversation message quality detecting method and device
CN108345449A (en) A kind of information processing method, device, storage medium and computer equipment
CN108683704A (en) A kind of Socket network communications test method and its system, storage medium
KR20140106857A (en) Protocol conformity verification method, apparatus performing the same and systme performing the same
CN113268336A (en) Service acquisition method, device, equipment and readable medium
CN105117340B (en) URL detection methods and device for iOS browser application quality evaluations
CN105049280B (en) The interface Behavior modeling test macro and method of Business Management Platform
CN113238740A (en) Code generation method, code generation device, storage medium, and electronic apparatus
CN111723019A (en) Interface debugging method and system
CN106301976A (en) A kind of intelligent substation schedule information automated testing method
CN110377463A (en) Interface test method, device, terminal and computer readable storage medium
CN113391992A (en) Test data generation method and device, storage medium and electronic equipment
CN116346660A (en) Data processing method, device, equipment and medium based on dependent replacement service
CN111506305A (en) Tool kit generation method and device, computer equipment and readable storage medium
CN103457957B (en) A kind of network penetration test macro and method with adaptation function
CN113645052B (en) Firmware debugging method and related equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
AD01 Patent right deemed abandoned
AD01 Patent right deemed abandoned

Effective date of abandoning: 20240209