CN109766264A - Method of calibration, device, computer equipment and the storage medium of interface parameters - Google Patents

Method of calibration, device, computer equipment and the storage medium of interface parameters Download PDF

Info

Publication number
CN109766264A
CN109766264A CN201811537271.5A CN201811537271A CN109766264A CN 109766264 A CN109766264 A CN 109766264A CN 201811537271 A CN201811537271 A CN 201811537271A CN 109766264 A CN109766264 A CN 109766264A
Authority
CN
China
Prior art keywords
parameter
interface
name
class
prompt information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811537271.5A
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 CN201811537271.5A priority Critical patent/CN109766264A/en
Publication of CN109766264A publication Critical patent/CN109766264A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a kind of method of calibration of interface parameters, device, computer equipment and storage mediums, it is related to technical field of performance test, it saves interface and enters manual testing's cost that ginseng must fill out, interface, which enters when ginseng is not filled in, provides the check cost of prompt, and saves interface and enter the check cost for providing prompt joined when format fills in incorrect.Main technical schemes of the invention are as follows: when testing interface, by the corresponding relationship of the parameter class name of interface path and request in preset verification file, reflection obtains corresponding parameter class;Each parameter name and its corresponding input requirements that it is included are obtained by the parameter class, the input requirements include that whether required information and its corresponding parameter do not fill out the prompt information that the prompt information provided and/or parameter input format information and its corresponding parameter format mistake provide to parameter;According to the corresponding input requirements of each parameter name, determines whether the result of operation code analysis acquisition verifies and pass through.

Description

Method of calibration, device, computer equipment and the storage medium of interface parameters
Technical field
The present invention relates to technical field of performance test more particularly to a kind of methods of calibration of interface parameters, device, computer Equipment and storage medium.
Background technique
Interface testing is a kind of test of test system components interface.Interface testing mainly for detection of external system with Interaction point between system and between internal subsystems.The emphasis of test is the exchange of data to be checked, transmitting and control Mutual logic dependencies etc. between management process and system processed.
During interface testing carries out, needs to be directed to interface and enter whether ginseng must be filled into capable test, i.e., interface is inputted Parameter whether must be filled into capable test, traditional test method: when entering ginseng not input content, check that interface shows, but work as Interface enters when proofreading more, and testing cost is larger, and also needs to pay close attention to required field when not filling in, and whether the prompt provided is correct; In addition, it is also necessary to be directed to interface and enter to join format check and tested, traditional test method: it is all enter ginseng input all kinds of formats Permutation and combination is carried out, checks that interface shows, when interface, which enters, proofreads more, testing cost is larger, and also needs to pay close attention to not being inconsistent into ginseng When closing expected form, whether the prompt provided is correct;Further more, interface parameters verification generally all infrequently changes, survey is returned to it Examination belongs to repetitive operation, but inevitable.
Summary of the invention
The present invention provides method of calibration, device, computer equipment and the storage medium of a kind of interface parameters, saves interface Enter manual testing's cost that ginseng must fill out, interface, which enters when ginseng is not filled in, provides the check cost of prompt, and saves interface and enter ginseng The check cost for providing prompt when format fills in incorrect.
The embodiment of the invention provides a kind of methods of calibration of interface parameters, which comprises
When testing interface, pass through pair of the parameter class name of interface path and request in preset verification file It should be related to, reflection obtains corresponding parameter class;
Each parameter name and its corresponding input requirements that it is included are obtained by the parameter class, the input is wanted Ask whether required information and its corresponding parameter do not fill out the prompt information provided and/or parameter input format information including parameter And its prompt information that corresponding parameter format mistake provides;
According to the corresponding input requirements of each parameter name, it is logical to determine whether the result of operation code analysis acquisition verifies It crosses.
Further, it is described interface is tested before, the method also includes:
The preset verification file is configured, the parameter class name of interface path, request is provided in the preset verification file Claim, parameter name, whether required information and its corresponding parameter do not fill out the prompt information provided to parameter, parameter input format information and The prompt information that its corresponding parameter format mistake provides.
Each parameter name that it is included is obtained by the parameter class and its corresponding input is wanted specifically, described It asks, comprising:
Corresponding parameter list of file names is obtained by the parameter class;
Corresponding the Comments List is obtained according to the parameter list of file names;
It parses described the Comments List and obtains each parameter name and its corresponding input requirements.
Specifically, it is described according to the corresponding input requirements of each parameter name, determine the result that operation code analysis obtains Whether verification passes through, comprising:
If the input requirements of the corresponding parameter name of the result that the operation code analysis obtains are consistent, it is determined that verification Pass through;
If the input requirements of the corresponding parameter name of the result that the operation code analysis obtains are inconsistent, school is exported Test unacceptable prompt information, the prompt information is that parameter does not fill out the prompt information provided or what parameter format mistake provided mentions Show information.
It further, include the parameter class name of multiple requests, the parameter class of each request in the preset verification file Title is all correspondingly arranged on corresponding interface path, parameter name, and parameter whether do not fill out and provide by required information and its corresponding parameter Prompt information, the prompt information that parameter input format information and its corresponding parameter format mistake provide.
The embodiment of the invention provides a kind of calibration equipment of interface parameters, described device includes:
First obtains module, for by the interface path in preset verification file and asking when testing interface The corresponding relationship for the parameter class name asked, reflection obtain corresponding parameter class;
Second obtains module, for obtaining each parameter name that it is included and its corresponding defeated by the parameter class Entering requirement, the input requirements include whether required information and its corresponding parameter do not fill out the prompt information provided to parameter, and/or The prompt information that parameter input format information and its corresponding parameter format mistake provide;
Correction verification module, for determining the knot that operation code analysis obtains according to the corresponding input requirements of each parameter name Whether fruit, which verifies, passes through.
Further, described device further include:
Configuration module is provided with interface path in the preset verification file, asks for configuring the preset verification file The parameter class name asked, parameter name, whether required information and its corresponding parameter do not fill out the prompt information provided to parameter, and parameter is defeated The prompt information that entry format information and its corresponding parameter format mistake provide.
Specifically, described second obtains module, comprising:
Acquiring unit, for obtaining corresponding parameter list of file names by the parameter class;
The acquiring unit is also used to obtain corresponding the Comments List according to the parameter list of file names;
Resolution unit obtains each parameter name and its corresponding input requirements for parsing described the Comments List.
Specifically, the correction verification module includes:
Determination unit, if the input requirements one of the parameter name corresponding for the result for running code analysis acquisition It causes, it is determined that verification passes through;
Output unit, if the input requirements of the parameter name corresponding for the result for running code analysis acquisition are not Unanimously, then the unacceptable prompt information of output verification, the prompt information are that parameter does not fill out the prompt information provided or parameter lattice The prompt information that formula mistake provides.
It further, include the parameter class name of multiple requests, the parameter class of each request in the preset verification file Title is all correspondingly arranged on corresponding interface path, parameter name, and parameter whether do not fill out and provide by required information and its corresponding parameter Prompt information, the prompt information that parameter input format information and its corresponding parameter format mistake provide.
A kind of computer equipment, including memory, processor and storage are in the memory and can be in the processing The computer program run on device, the processor realize the verification side of above-mentioned interface parameters when executing the computer program Method.
A kind of computer readable storage medium, the computer-readable recording medium storage have computer program, the meter Calculation machine program realizes the method for calibration of above-mentioned interface parameters when being executed by processor.
Method of calibration, device, computer equipment and the storage medium of above-mentioned interface parameters, when testing interface, By the corresponding relationship of the parameter class name of interface path and request in preset verification file, reflection obtains corresponding parameter Class;Then each parameter name and its corresponding input requirements that it is included are obtained by the parameter class, the input is wanted Ask whether required information and its corresponding parameter do not fill out the prompt information provided and/or parameter input format information including parameter And its prompt information that corresponding parameter format mistake provides;Finally according to the corresponding input requirements of each parameter name, determine Whether the result that operation code analysis obtains, which verifies, passes through.I.e. the application by it is preset verification file in interface parameters standard, Interface parameters can be verified, tester can formulate and adjust verification standard according to the actual situation, it is tested for the first time, It is reusable when regression test, it is only necessary to check practical verification standard, and run and obtain check results.Without entering ginseng It when input content, checks that interface shows, enters to join all kinds of formats progress permutation and combination of input without to all, to save interface Enter manual testing's cost that ginseng must fill out, interface enters the check cost that prompt is provided when ginseng is not filled in, and saves interface and enter to join lattice The check cost for providing prompt when formula fills in incorrect.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below by institute in the description to the embodiment of the present invention Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the invention Example, for those of ordinary skill in the art, without any creative labor, can also be according to these attached drawings Obtain other attached drawings.
Fig. 1 is a flow chart of the method for calibration of interface parameters in one embodiment of the invention;
Fig. 2 is the detail flowchart in one embodiment of the invention about Fig. 1 step S20;
Fig. 3 is the detail flowchart in one embodiment of the invention about Fig. 1 step S20;
Fig. 4 is the result schematic diagram that the operation code analysis in one embodiment of the invention obtains;
Fig. 5 is a functional block diagram of the calibration equipment of interface parameters in one embodiment of the invention;
Fig. 6 is a schematic diagram of computer equipment in one embodiment of the invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
Interface testing is a kind of test of test system components interface.Interface testing mainly for detection of external system with Interaction point between system and between internal subsystems.The emphasis of test is the exchange of data to be checked, transmitting and control Mutual logic dependencies etc. between management process and system processed.I.e. interface testing is exactly by under test different situations Enter the corresponding of participation to go out to join information to judge whether interface meets or meet corresponding functional, security requirement.
This application provides a kind of methods of calibration of interface parameters, when testing interface, pass through preset verification text The corresponding relationship of the parameter class name of interface path and request in part, reflection obtain corresponding parameter class;Then by described Parameter class obtains each parameter name and its corresponding input requirements that it is included, and the input requirements include whether parameter must It fills out information and its corresponding parameter does not fill out the prompt information provided and/or parameter input format information and its corresponding parameter lattice The prompt information that formula mistake provides;Finally according to the corresponding input requirements of each parameter name, determine that operation code analysis obtains Result whether verify and pass through.I.e. the application, can be to interface parameters by the interface parameters standard in preset verification file It is verified, tester can formulate and adjust verification standard according to the actual situation, test for the first time, when regression test can weigh It is multiple to use, it is only necessary to check practical verification standard, and run and obtain check results.Without checking when entering to join input content Interface performance, without to it is all enter ginseng input all kinds of formats and carry out permutation and combination, thus save interface enter ginseng must fill out it is artificial Testing cost, interface enter the check cost that ginseng provides prompt when not filling in, and save interface and enter to join format when filling in incorrect The check cost for providing prompt.
The embodiment for introducing a kind of method of calibration of interface parameters provided by the present application in detail below, if Fig. 1 is the application A kind of flow chart of the method for calibration for interface parameters that embodiment provides, technical solution provided by the present application mainly includes following step It is rapid:
S10 passes through the parameter class name of interface path and request in preset verification file when testing interface Corresponding relationship, reflection obtains corresponding parameter class.
It should be noted that the interface in the embodiment of the present invention includes: the interface of the interface inside program and system external. The interface of system external is resource or information to be obtained from other website or server, and website or server can only be mentioned As soon as obtain data for their methods for finishing writing, then provided by the interface method that him can be used to finish writing, thus Achieve the purpose that data sharing, such as app, network address these it are all by system external when carrying out data processing Interface is called;Interface inside program, is the interaction between method and method, between module and module, in program The interface that portion dishes out, such as bbs system have login module, module etc. of posting, and just must first log in to post, So there must be interaction between the two modules, it will dish out an interface, be called for built-in system.
In embodiments of the present invention, preset verification file is configured according to actual needs, specifically can according to Parametric variable involved in the corresponding functional module of test interface is configured.For example, for the interface testing of login module, Need to configure the path of login interface, the required parameter class name of interface and the input format of configuration parameter username and password Deng the embodiment of the present invention is not specifically limited.
In one embodiment provided by the invention, in step S10: it is described interface is tested before, the method Further include: the preset verification file is configured, the parameter class name of interface path, request is provided in the preset verification file Claim, parameter name, whether required information and its corresponding parameter do not fill out the prompt information provided to parameter, parameter input format information and The prompt information that its corresponding parameter format mistake provides.Wherein, parameter input format information can specifically pass through regular expressions Formula format is configured.
For example, including following content in preset verification file:
<? xml version=" 1.0 " encoding=" gb2312 "?>
< interface url="/portal/login " class=" com.yanshuiyong.common.user.f orm.LoginInputForm"
InterfaceName=" login " >
< parameter parameterName=" mobileNo " required=" Y " requiredMessage=" hand Machine number cannot for sky " validateRules=" ^ ((13 | 14 | 15 | 17 | 18) (d) (* * * * | d { 4 }) (d { 4 }))? $ " validateRulesMessage=" phone number format is incorrect "/>
< parameter parameterName=" passWord " required=" Y " requiredMessage=" is stepped on Recording password cannot be empty " validateRules=" " validateRulesMessage=" "/>
</interface>
Wherein, url is interface path;Class is the required parameter class name of interface;InterfaceName is interface work With;ParameterName is parameter name;Required is whether parameter must fill out;RequiredMessage is that must fill out parameter not fill out The prompt provided when writing;ValidateRules is regular expression format check rule;ValidateRulesMessage is lattice The prompt provided when formula is not inconsistent.
In embodiments of the present invention, the parameter class name of each request in preset verification file is correspondingly arranged on request Path, parameter class name and corresponding request path by request, it can reflection obtains corresponding parameter class.In addition, pre- The parameter class name for setting the request in verification file, is also correspondingly arranged on parameter name and the corresponding parameter of each parameter name Whether required information and its corresponding parameter do not fill out the prompt information provided, parameter input format information and its corresponding parameter lattice The prompt information that formula mistake provides.Wherein, the parameter class name of request includes packet name and class name.By preset verification file configuration After the completion, the embodiment of the present invention uses DOM (Document Object Model, DOM Document Object Model) mode, SAX (simple API for XML, SAX parsing) modes such as mode, JDOM mode, DOM4j mode parse preset verification file, to generate one Interface parameters verifies standard.
It should be noted that reflection is, for any one class, can to know all of this class in operating status Attribute and method;For any one object, its any one method and attribute can be called;The letter of this dynamic acquisition The function of the method for breath and dynamic call object is known as reflecting.That is all methods of this class of reflection acquisition, then go for it Parameter, then call this method in turn.Such as: a class has member variable, method, building method, packet etc. information, then One class can be dissected using reflection technology, each and every one component part is mapped to object one by one.Therefore, the present invention is real Applying example can be by the corresponding relationship of the parameter class name of interface path and request in preset verification file, and reflection obtains corresponding Parameter class, the parameter name convenient for each variable in the class that gets parms in the next steps, that is, in the class that gets parms.
S20 obtains each parameter name and its corresponding input requirements that it is included by the parameter class.
Wherein, the input requirements include that each parameter name is corresponding: parameter whether required information and its corresponding ginseng Number does not fill out the prompt letter that the prompt information provided and/or parameter input format information and its corresponding parameter format mistake provide Breath.
In one embodiment provided by the invention, as shown in Fig. 2, step S20: obtaining it by the parameter class and wrapped Each parameter name and its corresponding input requirements contained, comprising:
S201 obtains corresponding parameter list of file names by the parameter class.
The class specifically, the parameter class name reflection that the embodiment of the present invention passes through request first gets parms, such as step Content in S10 in preset verification file, the embodiment of the present invention pass through Class clazz=Class.forName (" com. Yanshuiyong.common.user.form.LoginInputForm ") get parms class, then pass through Field [] Fields=clazz.getDeclaredFields () parameter list of file names in such, finally reads in parameter list of file names one by one Parameter name.
S202 obtains corresponding the Comments List according to the parameter list of file names.
For example, the embodiment of the present invention passes through VNotEmpty vNotEmpty=field.getAnnotation (VNotEmpty.class) solution must be filled in by getting parms;Pass through String requiredMessage= VNotEmpty.message () acquisition must fill out the prompt provided when parameter is not filled in;Pass through VRegex vRegex= Field.getAnnotation (VRegex.class) obtains format check rule and explains;Pass through String ValidateRules=vRegex.value () obtains regular expression format check rule;Pass through String ValidateRulesMessage=vRegex.message () obtains the prompt provided when format is not inconsistent.
S203 parses described the Comments List and obtains each parameter name and its corresponding input requirements.
For example, the parameter obtained is entitled " mobileNo ", whether required information is "Yes" to parameter, and parameter, which is not filled out, to be provided Prompt information is " phone number cannot be empty ";
Parameter input format information be " ^ ((13 | 14 | 15 | 17 | 18) (d) (* * * * | d { 4 }) (d { 4 }))? $ ", the prompt information " phone number format is incorrect " that parameter format mistake provides.
S30, according to the corresponding input requirements of each parameter name, whether the result for determining that operation code analysis obtains is verified Pass through.
In one embodiment provided by the invention, as shown in figure 3, step S30: described to be respectively corresponded according to each parameter name Input requirements, whether the result for determining that operation code analysis obtains verify and pass through, comprising:
S301, if the input requirements for the corresponding parameter name of result that the operation code analysis obtains are consistent, really Fixed verification passes through.
S302, if the input requirements for the corresponding parameter name of result that the operation code analysis obtains are inconsistent, The unacceptable prompt information of output verification.
Wherein, the prompt information is the prompt letter that parameter does not fill out that the prompt information provided or parameter format mistake provide Breath.It is illustrated in figure 4 the result that operation code analysis obtains, wherein interface name: for the interface requests path listed;Parameter name: For the interface listed it is corresponding enter ginseng;Mandatory verification result: Inspection file is realized with from interface, is listed into ginseng mandatory verification Comparison result is highlighted when inconsistent;Mandatory verification remarks: when listing inconsistent into ginseng mandatory verification comparison result, specifically Reason;Format check result: Inspection file is realized with from interface, is listed into ginseng format check comparison result, when inconsistent It is highlighted;Format check remarks: when listing inconsistent into ginseng format check comparison result, concrete reason.
Available by upper example content, since whether required information is "Yes" for the parameter of parameter name mobileNo, parameter is defeated Entry format information be " ^ ((13 | 14 | 15 | 17 | 18) (d) (* * * * | d { 4 }) (d { 4 }))? $ ", and at this The mobile phone format inputted in example is unsatisfactory for call format, so verification does not pass through, output " phone number format is incorrect " Prompt information;Whether required information is "Yes" to the parameter of parameter name passWord, and does not input password in this example, then verifies not Pass through, the prompt information of output " login password cannot be sky ".
The embodiment of the invention provides a kind of methods of calibration of interface parameters, when testing interface, by preset The corresponding relationship of the interface path in file and the parameter class name of request is verified, reflection obtains corresponding parameter class;Then lead to It crosses the parameter class and obtains each parameter name and its corresponding input requirements that it is included, the input requirements include parameter Whether required information and its corresponding parameter do not fill out the prompt information provided and/or parameter input format information and its corresponding The prompt information that parameter format mistake provides;Finally according to the corresponding input requirements of each parameter name, operation code solution is determined Whether the result that analysis obtains, which verifies, passes through.I.e. the application can be docked by the interface parameters standard in preset verification file Mouthful parameter is verified, and tester can formulate and adjustment verification standard according to the actual situation, is tested for the first time, when regression test It is reusable, it is only necessary to check practical verification standard, and run and obtain check results.Without entering to join input content When, it checks that interface shows, enters to join all kinds of formats progress permutation and combination of input without to all, must be filled out to save interface and enter ginseng Manual testing's cost, interface enters the check cost that ginseng provides prompt when not filling in, and saves interface and enter to join format and fill in not The check cost for providing prompt when correct.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit It is fixed.
In one embodiment, a kind of calibration equipment of interface parameters, the calibration equipment of the interface parameters and above-mentioned reality are provided The method of calibration for applying interface parameters in example corresponds.As shown in figure 5, the calibration equipment of the interface parameters includes the first acquisition mould Block 10, second obtains module 20 and correction verification module 30.Detailed description are as follows for each functional module:
First obtains module 10, for when testing interface, by interface path in preset verification file and The corresponding relationship of the parameter class name of request, reflection obtain corresponding parameter class;
Second obtains module 20, for obtaining each parameter name that it is included and its corresponding by the parameter class Input requirements, the input requirements include whether required information and its corresponding parameter do not fill out the prompt information provided to parameter, and/ Or the prompt information that parameter input format information and its corresponding parameter format mistake provide;
Correction verification module 30, for determining what operation code analysis obtained according to the corresponding input requirements of each parameter name As a result whether verify and pass through.
Further, described device further include:
Configuration module 40, for configuring the preset verification file, be provided in the preset verification file interface path, The parameter class name of request, parameter name, whether required information and its corresponding parameter do not fill out the prompt information provided, parameter to parameter The prompt information that input format information and its corresponding parameter format mistake provide.
Specifically, described second obtains module 20, comprising:
Acquiring unit 21, for obtaining corresponding parameter list of file names by the parameter class;
The acquiring unit 21 is also used to obtain corresponding the Comments List according to the parameter list of file names;
Resolution unit 22, for parsing, described the Comments List obtains each parameter name and its corresponding input is wanted It asks.
Specifically, the correction verification module 30 includes:
Determination unit 31, if the input requirements of the parameter name corresponding for the result for running code analysis acquisition Unanimously, it is determined that verification passes through;
Output unit 32, if the input requirements of the parameter name corresponding for the result for running code analysis acquisition Inconsistent, then the unacceptable prompt information of output verification, the prompt information are that parameter does not fill out the prompt information or parameter provided The prompt information that format error provides.
It further, include the parameter class name of multiple requests, the parameter class of each request in the preset verification file Title is all correspondingly arranged on corresponding interface path, parameter name, and parameter whether do not fill out and provide by required information and its corresponding parameter Prompt information, the prompt information that parameter input format information and its corresponding parameter format mistake provide.
The specific of calibration equipment about interface parameters limits the method for calibration that may refer to above for interface parameters Restriction, details are not described herein.Modules in the calibration equipment of above-mentioned interface parameters can be fully or partially through software, hard Part and combinations thereof is realized.Above-mentioned each module can be embedded in the form of hardware or independently of in the processor in computer equipment, It can also be stored in a software form in the memory in computer equipment, execute the above modules in order to which processor calls Corresponding operation.
In one embodiment, a kind of computer equipment is provided, which can be terminal, internal structure Figure can be as shown in Figure 6.The computer equipment includes processor, the memory, network interface, display connected by system bus Screen and input unit.Wherein, the processor of the computer equipment is for providing calculating and control ability.The computer equipment is deposited Reservoir includes non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system and computer journey Sequence.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculating The network interface of machine equipment is used to communicate with external server by network connection.When the computer program is executed by processor with Realize the method for calibration of any one aforementioned interface parameters.
In one embodiment, a kind of computer equipment is provided, including memory, processor and storage are on a memory And the computer program that can be run on a processor, processor perform the steps of when executing computer program
When testing interface, pass through pair of the parameter class name of interface path and request in preset verification file It should be related to, reflection obtains corresponding parameter class;
Each parameter name and its corresponding input requirements that it is included are obtained by the parameter class, the input is wanted Ask whether required information and its corresponding parameter do not fill out the prompt information provided and/or parameter input format information including parameter And its prompt information that corresponding parameter format mistake provides;
According to the corresponding input requirements of each parameter name, it is logical to determine whether the result of operation code analysis acquisition verifies It crosses.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated Machine program performs the steps of when being executed by processor
When testing interface, pass through pair of the parameter class name of interface path and request in preset verification file It should be related to, reflection obtains corresponding parameter class;
Each parameter name and its corresponding input requirements that it is included are obtained by the parameter class, the input is wanted Ask whether required information and its corresponding parameter do not fill out the prompt information provided and/or parameter input format information including parameter And its prompt information that corresponding parameter format mistake provides;
According to the corresponding input requirements of each parameter name, it is logical to determine whether the result of operation code analysis acquisition verifies It crosses.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, To any reference of memory, storage, database or other media used in each embodiment provided herein, Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing The all or part of function of description.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of method of calibration of interface parameters, which is characterized in that the described method includes:
When testing interface, closed by the corresponding of parameter class name of interface path and request in preset verification file System, reflection obtain corresponding parameter class;
Each parameter name and its corresponding input requirements that it is included, the input requirements packet are obtained by the parameter class Include parameter whether required information and its corresponding parameter do not fill out the prompt information provided and/or parameter input format information and its The prompt information that corresponding parameter format mistake provides;
According to the corresponding input requirements of each parameter name, determines whether the result of operation code analysis acquisition verifies and pass through.
2. the method for calibration of interface parameters according to claim 1, which is characterized in that described to carry out testing it to interface Before, the method also includes:
The preset verification file is configured, is provided with interface path, the parameter class name of request, ginseng in the preset verification file Several, whether required information and its corresponding parameter do not fill out the prompt information provided to parameter, parameter input format information and its right The prompt information that the parameter format mistake answered provides.
3. the method for calibration of interface parameters according to claim 1, which is characterized in that described to be obtained by the parameter class Its each parameter name and its corresponding input requirements for being included, comprising:
Corresponding parameter list of file names is obtained by the parameter class;
Corresponding the Comments List is obtained according to the parameter list of file names;
It parses described the Comments List and obtains each parameter name and its corresponding input requirements.
4. the method for calibration of interface parameters according to claim 2, which is characterized in that described right respectively according to each parameter name The input requirements answered determine whether the result of operation code analysis acquisition verifies and pass through, comprising:
If the input requirements of the corresponding parameter name of the result that the operation code analysis obtains are consistent, it is determined that verification is logical It crosses;
If the input requirements of the corresponding parameter name of the result that the operation code analysis obtains are inconsistent, output verification is not By prompt information, the prompt information is the prompt letter that parameter does not fill out that the prompt information provided or parameter format mistake provide Breath.
5. the method for calibration of interface parameters according to claim 2, which is characterized in that include in the preset verification file The parameter class name of multiple requests, the parameter class name of each request are correspondingly arranged on corresponding interface path, parameter name, ginseng Whether required information and its corresponding parameter do not fill out the prompt information provided, parameter input format information and its corresponding parameter to number The prompt information that format error provides.
6. a kind of calibration equipment of interface parameters, which is characterized in that described device includes:
First obtains module, for passing through the preset interface path verified in file and request when testing interface The corresponding relationship of parameter class name, reflection obtain corresponding parameter class;
Second obtains module, for obtaining each parameter name that it is included by the parameter class and its corresponding input is wanted It asks, the input requirements include that whether required information and its corresponding parameter do not fill out the prompt information and/or parameter provided to parameter The prompt information that input format information and its corresponding parameter format mistake provide;
Correction verification module, for according to the corresponding input requirements of each parameter name, determine it is that operation code analysis obtains the result is that No verification passes through.
7. the calibration equipment of interface parameters according to claim 6, which is characterized in that described device further include:
Configuration module is provided with interface path, request for configuring the preset verification file in the preset verification file Parameter class name, parameter name, whether required information and its corresponding parameter do not fill out the prompt information provided to parameter, and parameter inputs lattice The prompt information that formula information and its corresponding parameter format mistake provide.
8. the calibration equipment of interface parameters according to claim 6, which is characterized in that described second obtains module, comprising:
Acquiring unit, for obtaining corresponding parameter list of file names by the parameter class;
The acquiring unit is also used to obtain corresponding the Comments List according to the parameter list of file names;
Resolution unit obtains each parameter name and its corresponding input requirements for parsing described the Comments List.
9. a kind of computer equipment, including memory, processor and storage are in the memory and can be in the processor The computer program of upper operation, which is characterized in that the processor realized when executing the computer program as claim 1 to The method of calibration of any one of 5 interface parameters.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In the verification side of realization interface parameters as described in any one of claim 1 to 5 when the computer program is executed by processor Method.
CN201811537271.5A 2018-12-15 2018-12-15 Method of calibration, device, computer equipment and the storage medium of interface parameters Pending CN109766264A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811537271.5A CN109766264A (en) 2018-12-15 2018-12-15 Method of calibration, device, computer equipment and the storage medium of interface parameters

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811537271.5A CN109766264A (en) 2018-12-15 2018-12-15 Method of calibration, device, computer equipment and the storage medium of interface parameters

Publications (1)

Publication Number Publication Date
CN109766264A true CN109766264A (en) 2019-05-17

Family

ID=66451856

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811537271.5A Pending CN109766264A (en) 2018-12-15 2018-12-15 Method of calibration, device, computer equipment and the storage medium of interface parameters

Country Status (1)

Country Link
CN (1) CN109766264A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110389765A (en) * 2019-07-24 2019-10-29 深圳市盟天科技有限公司 A kind of parameter verification method and parameter verification system
CN110502442A (en) * 2019-08-15 2019-11-26 平安普惠企业管理有限公司 Dynamic parameter method of calibration, device, equipment and storage medium
CN110704317A (en) * 2019-09-26 2020-01-17 凡普数字技术有限公司 Method, device and storage medium for testing parameter rule of interface parameter
CN111104191A (en) * 2019-12-17 2020-05-05 深圳前海环融联易信息科技服务有限公司 Interface docking method and device, computer equipment and storage medium
CN111897842A (en) * 2020-01-02 2020-11-06 北京京东尚科信息技术有限公司 Data checking method, device, computer system and medium
CN112052182A (en) * 2020-09-27 2020-12-08 平安信托有限责任公司 Interface automation test method and device, computer equipment and storage medium
CN112540923A (en) * 2020-12-15 2021-03-23 平安科技(深圳)有限公司 Interface parameter checking and converting method, device, equipment and storage medium
CN112579055A (en) * 2020-12-11 2021-03-30 平安普惠企业管理有限公司 Interface parameter checking method and device and computer readable storage medium
CN113282513A (en) * 2021-06-28 2021-08-20 平安消费金融有限公司 Interface test case generation method and device, computer equipment and storage medium
CN113572593A (en) * 2021-07-07 2021-10-29 中国银行股份有限公司 Complex format parameter transmission method and device

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110389765A (en) * 2019-07-24 2019-10-29 深圳市盟天科技有限公司 A kind of parameter verification method and parameter verification system
CN110502442A (en) * 2019-08-15 2019-11-26 平安普惠企业管理有限公司 Dynamic parameter method of calibration, device, equipment and storage medium
CN110704317A (en) * 2019-09-26 2020-01-17 凡普数字技术有限公司 Method, device and storage medium for testing parameter rule of interface parameter
CN111104191B (en) * 2019-12-17 2024-04-02 深圳前海环融联易信息科技服务有限公司 Interface docking method, device, computer equipment and storage medium
CN111104191A (en) * 2019-12-17 2020-05-05 深圳前海环融联易信息科技服务有限公司 Interface docking method and device, computer equipment and storage medium
CN111897842A (en) * 2020-01-02 2020-11-06 北京京东尚科信息技术有限公司 Data checking method, device, computer system and medium
CN112052182A (en) * 2020-09-27 2020-12-08 平安信托有限责任公司 Interface automation test method and device, computer equipment and storage medium
CN112579055A (en) * 2020-12-11 2021-03-30 平安普惠企业管理有限公司 Interface parameter checking method and device and computer readable storage medium
CN112540923A (en) * 2020-12-15 2021-03-23 平安科技(深圳)有限公司 Interface parameter checking and converting method, device, equipment and storage medium
CN112540923B (en) * 2020-12-15 2022-03-25 平安科技(深圳)有限公司 Interface parameter checking and converting method, device, equipment and storage medium
CN113282513A (en) * 2021-06-28 2021-08-20 平安消费金融有限公司 Interface test case generation method and device, computer equipment and storage medium
CN113572593A (en) * 2021-07-07 2021-10-29 中国银行股份有限公司 Complex format parameter transmission method and device
CN113572593B (en) * 2021-07-07 2024-04-19 中国银行股份有限公司 Complex format parameter transmission method and device

Similar Documents

Publication Publication Date Title
CN109766264A (en) Method of calibration, device, computer equipment and the storage medium of interface parameters
CN109344642A (en) Interface rules method of calibration, device, computer equipment and storage medium
CN110069297A (en) Abnormality eliminating method, device, computer equipment and storage medium based on Spring MVC
CN108089985B (en) Method, device and equipment for verifying interface return parameters and readable storage medium
CN107239271A (en) Develop document structure tree method and device
CN104636254A (en) Method and device for generating test case, testing method and testing equipment
CN105138461A (en) Interface testing method and device for application program
CN111190596A (en) Joint debugging method and device, computer equipment and readable storage medium
CN109669859A (en) Service test method, device, computer equipment and storage medium
CN112199300A (en) Interface testing method and device, electronic equipment and storage medium
CN107656872A (en) Method for testing software, device, equipment and computer-readable storage medium
CN111309593A (en) JSON interface verification method, device and equipment and computer readable storage medium
CN110569194A (en) interface testing method and device, electronic equipment and storage medium
CN110597714A (en) Kafka message testing method and device, computer equipment and storage medium
CN112328482A (en) Test method and device based on script template, computer equipment and storage medium
CN113407327A (en) Modeling task and data analysis method, device, electronic equipment and system
CN111026394A (en) Method for carrying out flow docking by utilizing self-service docking platform
CN114117977B (en) Method suitable for automatically verifying processor system scene
CN105868100A (en) Android system-based automatic test method and device
CN105162664A (en) Automatic platform testing method and system developed based on intermediate layers of instruments
KR102316084B1 (en) Apparatus and method for testing machine to machine application
CN116521538A (en) Automatic testing method and device for command line interface, electronic equipment and storage medium
CN111752601A (en) Data configuration method, device and system, electronic equipment and storage medium thereof
CN109815127A (en) Automatized script conversion method, device, computer equipment and storage medium
CN115599683A (en) Automatic testing method, device, equipment and storage medium

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