CN109298997A - Interface test method, system, computer equipment and storage medium - Google Patents

Interface test method, system, computer equipment and storage medium Download PDF

Info

Publication number
CN109298997A
CN109298997A CN201810893803.2A CN201810893803A CN109298997A CN 109298997 A CN109298997 A CN 109298997A CN 201810893803 A CN201810893803 A CN 201810893803A CN 109298997 A CN109298997 A CN 109298997A
Authority
CN
China
Prior art keywords
interface
data
journal file
tested
verification result
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
CN201810893803.2A
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201810893803.2A priority Critical patent/CN109298997A/en
Priority to PCT/CN2018/106403 priority patent/WO2020029375A1/en
Publication of CN109298997A publication Critical patent/CN109298997A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a kind of interface test method, system, computer equipment and storage mediums, the method comprise the steps that generating the request data for being directed to interface to be tested;The server request data being sent to where the interface to be tested;Receive the response data for the request data that the server returns;After when test assignment occurs, the combination producing of each task according to the dynamic call dependence of acquisition and by mark simultaneously exports origin journal file, and the journal file that will originate from carries out data processing, it is stored in interface description data library;It calls service logic to be verified and returned verification result to the received response data, generates interface testing report.The above method increases the coverage rate of abnormality test, reduces manual testing's investment, improves testing efficiency.

Description

Interface test method, system, computer equipment and storage medium
Technical field
The present invention relates to the field of test technology more particularly to a kind of interface test method, system, computer equipment and storages Medium.
Background technique
Web crawlers class testing is typically only capable to test to normal scene.Expired for account, return list data is boundary Value, returned data can not be covered with the abnormal scene such as spcial character.
Class database test, the data configuration scene of usual database is limited, is unable to satisfy normal data and abnormal data Needs.Api interface class testing, usual interface return need server side cooperation to return, some then depend on the return of network, It can not be realized by real scene.
Scene method be by with scene come the description of function point or operation flow to system, to improve test effect A kind of method.Scene method generally comprises basic flow and standby stream, since a process, by the path of description process come really Fixed process completes entire scene by traversing all basic flow and standby stream.
Summary of the invention
Based on this, it is necessary to which the drawbacks of being directed to existing interface test method provides a kind of interface test method, system, meter Calculate machine equipment and storage medium.
A kind of interface test method, the interface test method include: to generate the request data for being directed to interface to be tested;It will The request data is sent to the server where the interface to be tested;Receive the server return is directed to the request The response data of data;When test assignment occurs, appoint according to the dynamic call dependence of acquisition and by each of mark After the combination producing of business simultaneously exports origin journal file, and the journal file that will originate from carries out data processing, it is stored in interface description In database, the origin journal file records all data transmissions, received process, includes in the interface description data library Interface name and its description of corresponding response data;Service logic is called to verify and return the received response data Verification result generates interface testing report.
It is described when test assignment occurs in one of the embodiments, according to the dynamic call dependence of acquisition and The combination producing of each task by mark simultaneously exports origin journal file, and origin journal file is carried out data processing Afterwards, it is stored in interface description data library and includes:
Blocker is called according to service framework and invocation protocol design;
Blocker will be called to be built in invocation protocol;
When calling generation, blocker is called to intercept call request, obtains dynamic call dependence, and identify and each appoint The combination of business;
Call blocker according to origination data specification, according to the dynamic call dependence of acquisition and by each of mark The combination producing of task simultaneously exports origin journal file;
After the journal file that will originate from carries out data processing, it is stored in interface description data library.
The calling service logic is verified and is returned to the received response data in one of the embodiments, Verification result, generating interface testing report includes:
The interface testing report for the interface to be tested is generated according to the verification result, and establishes the interface testing The incidence relation of report and the interface name of the interface to be tested, the interface testing report includes the interface to be tested having verified that One of request data, verification result, verification result state and verification result Failure Causes Analysis or a variety of, the verifying Result phase includes successfully and failing.
Carrying out data processing to origin journal file in one of the embodiments, includes: to check in the journal file of origin The integrality of origination data information abandons undesirable data, then satisfactory origination data information norm, It is inserted into database, by origin journal file convergence and is stored in interface description data library.
In one of the embodiments, the method also includes: using the received response data as interface to be tested Test data, establish the incidence relation of the interface name of the interface testing data and the interface to be tested.
A kind of interface test system, the interface test system include:
Generation module is set as generating the request data for being directed to interface to be tested;
Sending module is set as the request data being sent to the server where the interface to be tested;
Receiving module is set as receiving the response data for the request data that the server returns;
Calling module is set as when test assignment occurs, according to the dynamic call dependence of acquisition and by identifying Each task combination producing and export origin journal file, and will origin journal file carry out data processing after, be stored in In interface description data library, the origin journal file records all data transmissions, received process, the interface description data It include that interface name and its corresponding response data describe in library;
Authentication module is set as that service logic is called to verify the received response data and returns to verifying knot Fruit generates interface testing report.
The calling module in one of the embodiments, further include:
Design cell is set as calling blocker according to service framework and invocation protocol design;
Built-in unit is set as blocker being called to be built in invocation protocol;
Interception unit is set as calling blocker to intercept call request when calling generation, obtains dynamic call and rely on pass System, and identify the combination of each task;
Call unit is set as calling blocker according to origination data specification, according to the dynamic call dependence of acquisition The combination producing of each task identified with process simultaneously exports origin journal file;
Storage unit is stored in interface description data library after the journal file that is set as originating from carries out data processing.
In one of the embodiments, the authentication module be also configured to be generated according to the verification result for it is described to The interface testing of test interface reports, and establishes being associated with for interface testing report and the interface name of the interface to be tested System, interface testing report include the request data of the interface to be tested having verified that, verification result, verification result state and test One of result Failure Causes Analysis or a variety of is demonstrate,proved, the verification result state includes successfully and failing.
A kind of computer equipment, including memory and processor are stored with computer-readable instruction in the memory, institute When stating computer-readable instruction and being executed by the processor, so that the step of processor executes above-mentioned interface test method.
A kind of storage medium being stored with computer-readable instruction, the computer-readable instruction are handled by one or more When device executes, so that the step of one or more processors execute above-mentioned interface test method.
Above-mentioned interface test method, system, computer equipment and storage medium, by generating asking for interface to be tested Data are sought, the server request data being sent to where the interface to be tested receives the needle that the server returns To the response data of the request data, when test assignment occurs, according to the dynamic call dependence of acquisition and by marking After the combination producing for each task known simultaneously exports origin journal file, and the journal file that will originate from carries out data processing, storage It include that interface name and its corresponding response data describe in interface description data library, in the interface description data library, root The interface testing for the interface to be tested is generated according to the verification result to report, and establish interface testing report with should be to The incidence relation of the interface name of test interface, the interface testing report include the number of request for the interface to be tested having verified that According to, one of verification result, verification result state and verification result Failure Causes Analysis or a variety of, the verification result state Including success and failure, increase the coverage rate of abnormality test, reduces manual testing's investment, improve testing efficiency.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention Limitation.
Fig. 1 is the flow chart of interface test method in one embodiment;
Fig. 2 is the flow chart for calling blocker to generate in one embodiment and exporting origin journal file;
Fig. 3 is the structural block diagram of interface test system in one embodiment;
Fig. 4 is the structural block diagram of calling module in one embodiment.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singular " one " used herein, " one It is a ", " described " and "the" may also comprise plural form.It is to be further understood that being arranged used in specification of the invention Diction " comprising " refer to that there are the feature, integer, step, operation, element and/or component, but it is not excluded that in the presence of or addition Other one or more features, integer, step, operation, element, component and/or their group.
As a preferable embodiment, as shown in Figure 1, a kind of interface test method, comprising:
Step S101 generates the request data for being directed to interface to be tested;
Step S102, the server request data being sent to where the interface to be tested;
The technical program provides a kind of test method of abnormal scene, by realizing anomalous field to message block is returned Simulation that message under scape returns and covering to abnormal flow chart branches can be realized by automatic test, can automate At the covering of abnormal scene, when regression test, is not necessarily to manpower intervention.Start client, call data generating tool, data generate Normal data source file of the tool based on abnormal data create-rule modification excel file format, it is defeated according to client user The rule entered is modified, and is ultimately generated modified excel file and is saved into specified directory.Mapping file CASE title corresponding with modification file is saved in folder, saves modified excel file in files file.The data Core Generator can be Quest Data Factory, it is that one kind is quick, is easy to generate test data tool, it can be modeled Complex data relationship, and have with gui interface, the data producer powerful as one, it allows developer not Arduously generate the significant test data of million rows.
There are three types of operation, these three operations to be respectively as follows: the first more newer command for the abnormal data create-rule: can be more The value of a certain column of certain new a line, also alternatively at the boundary value of this field, 0 value, the value of abnormal format;Second is deletion life It enables: discrete multirow can be deleted, with x1, x2 ... xn expression, continuous multirow can also be deleted, indicated with x-y;The third is multiple System increases order: reproducible multirow, and x1, x2 ... xn indicate to replicate these discrete rows to table finally, and x-y then indicates to replicate These continuous rows are last to table.Such as: the operation that the format after conversion can carry out has Update: row-column-value, Delete: { x1, x2 ... xn/x-y row }, Copy:{ x1, x2 ... xn/x-y row }.The normal data source file is the survey of code normal flow The data source file pinged is saved it with excel file format early period to be some valid datas.It is obtained Take process are as follows: corresponding web page address is crawled first, perhaps requests api interface address or the corresponding table structure of SQL query, Return message is converted into data frame format by python pandas packet and is saved into excel file.
Step S103 receives the response data for the request data that the server returns;
After request data is sent to the server, the server described in the interface to be tested by requesting Data carry out calculation process according to the required parameter value in the request data, and processing result namely response data are returned To the request data sender.
Step S104, when test assignment occurs, according to the dynamic call dependence of acquisition and by each of mark After the combination producing of task simultaneously exports origin journal file, and the journal file that will originate from carries out data processing, it is stored in interface and retouches It states in database, the origin journal file records all data transmissions, received process, the interface description data library Zhong Bao Include interface name and its description of corresponding response data;
When test assignment occurs, service call blocker is dynamic according to the service of acquisition according to service origin data standard State calls dependence and the Services Composition of each task by mark to generate and export origin journal file;Wherein service Source data specification be nine tuples, BasicProv (Token, InvokingService, ServiceInvoked, Location,Elapsedtime,Timestamp,Input,Output,Status);The data standard parameter of service origin contains Justice is as follows: Token :-a 32 character strings, for identifying a dynamic combined task, InvokingService: services Caller is referred to as service consumer.The character string that data format is one 32, Servicelnvoked: service quilt Caller is referred to as ISP.The character string that data format is one 32.Location: service call occurs Position, in cloud service environment, mainly IP address.Elapsed time: the time-consuming of service call, the time-consuming are to adjust from service The visual angle of user is seen, the time required for a service call is completed, and is contained the nested of called service and is executed the time.Data The integer that format is one eight, unit is millisecond.Timestamp: service call event occur timestamp, format be year/ Hour/minute the moon/day/second/millisecond, Input: the input parameter of service call, the character string that data memory format is 32. Output: the output data file of service call, generally an XML object or a json data object.Status: The state of service execution, data format be a Boolean, 1 indicates successfully, 0 expression fail, according to the dynamic call of acquisition according to The combination producing of the relationship of relying and each task by mark simultaneously exports origin journal file, and origin journal file is counted After processing, it is stored in interface description data library, the origin journal file records all data transmissions, received process, It include that interface name and its corresponding response data are retouched convenient for analysis test exception or fault origin, in interface description data library It states, realizes the scalability of acquisition.In the information process for collecting blocker, in order to provide the support to heterogeneous system, adopt The mode separated with blocker and blocker management, management module are responsible for registration, log collection and the processing of all interceptions, intercept Device is responsible for capture service origin and according to specification output journal, and different blockers can be designed according to different service agreements, Blocker and management module are loose coupling relations, and the strategy and mode of blocker operation are by reading an XML configuration file reality Existing, this document is managed and is safeguarded by management module, and by updating and modifying this document, blocker implements different sampling plans Summary and executive mode.All blockers use the data standard and transport protocol of public standard.Service call blocker intercepts clothes When business call request, according to different service call frequencies, the interception frequency of service call blocker is determined.
Step S105 calls service logic to be verified and returned verification result to the received response data, generates Interface testing report.
The abnormal data that abnormal data Core Generator is generated is held as the input of service code, normal call service code It goes and returns the result.By inquiry data-base recording, it will return the result and matched with related record, if successful match, this Secondary to be successfully tested, this test is verified as through (pass), if it fails to match, this time test crash, is verified as failure (fail).For matching result, what is success, what is failure, different according to each business, has different judgements, with specific industry Subject to logic of being engaged in.Service code refers to that the service logic to be executed in test case, such as test crawler are returned as sky, and test is climbed Worm returns to user name mistake.Return after having executed service code is to return the result.
As shown in Fig. 2, it is described when test assignment occurs in one of the embodiments, according to the dynamic call of acquisition The combination producing of dependence and each task by mark simultaneously exports origin journal file, and origin journal file is carried out After data processing, it is stored in interface description data library and includes:
Step S201 calls blocker according to service framework and invocation protocol design;
The design for calling blocker includes that creation plays the file of source information for storage service, and caller generates one only One Token value creates the parameter for reading and storing the calling time started as the mark of identification service dynamic dependency, The parameter for reading and storing current IP address is created, creation is for storing the parameter of called task names, creation For storing the parameter of the suction parameter of called task, above-mentioned parameter, file and Token value collectively form calling and intercept Device.Unique Token value is generated according to time and network interface card.
Step S202 will call blocker to be built in invocation protocol;
Service call blocker is built in service call agreement, when service call occurs, service call blocker Interception service call request obtains dynamic call dependence, and identifies the combination of each task.
Step S203 calls blocker to intercept call request when calling generation, obtains dynamic call dependence, and Identify the combination of each task;
Service call blocker is according to service origin data standard, according to the dynamic call dependence of acquisition and by marking The combination producing for each task known simultaneously exports origin journal file;Wherein service origin data standard is nine tuples, BasicProv(Token,InvokingService,ServiceInvoked,Location,Elapsed time, Timestamp, Input, Output, the character string that wherein Token is one 32 is appointed for identifying a dynamic combination Business, Invoking Service are service caller, also referred to as service consumer, the character that data format is one 32 String, Service Invoked are service callee, also referred to as ISP, the character that data format is one 32 String, Location are the position that service call occurs, and are IP address in cloud service environment.Elapsed time is service call Time-consuming, the time-consuming be in terms of the visual angle of service caller, complete the time required for a service call, contain called The nested of service executes time, the integer that data format is one 8;Timestamp be service call event occur when Between stab, Input is the input parameter of service call, and data memory format is 32 character strings, and Output is service call Output data file, is an XML object or a json data object, and Status is the state of service execution, data lattice Formula is a Boolean, and 1 indicates successfully, and 0 indicates failure.
Step S204 calls blocker according to origination data specification, according to the dynamic call dependence and process of acquisition The combination producing of each task of mark simultaneously exports origin journal file;
Blocker will be called according to origination data specification, according to the dynamic call dependence of acquisition and by the every of mark The combination producing of a task simultaneously exports origin journal file.Reading service origin log recording, checks whether and meets current clothes Business origination data specification, user can according to need the code requirement of setting service origin data, for example, when not needing distribution When debug, can not interception service output and input, when carrying out format checking do not check relevant information
Step S205 is stored in interface description data library after origin journal file is carried out data processing.
It after the journal file that will originate from carries out data processing, is stored in interface description data library, service origin log storage Onto the local server where service, by log collection tool, the reading, transmission and insertion database of data are realized.
The calling service logic is verified and is returned to the received response data in one of the embodiments, Verification result, generating interface testing report includes:
The interface testing report for the interface to be tested is generated according to the verification result, and establishes the interface testing The incidence relation of report and the interface name of the interface to be tested, the interface testing report includes the interface to be tested having verified that One of request data, verification result, verification result state and verification result Failure Causes Analysis or a variety of, the verifying Result phase includes successfully and failing.
The interface testing report for the interface to be tested is generated according to the verification result, and establishes the interface testing The incidence relation of report and the interface name of the interface to be tested, interface testing report include asking for the interface to be tested having verified that Ask one of data, verification result, verification result state and verification result Failure Causes Analysis or a variety of, verification result state Including success and failure
Carrying out data processing to origin journal file in one of the embodiments, includes: to check in the journal file of origin The integrality of origination data information abandons undesirable data, then satisfactory origination data information norm, It is inserted into database, by origin journal file convergence and is stored in interface description data library.
The integrality for checking origination data information in the journal file of origin, abandons undesirable data, then symbol Desired origination data information norm is closed, database is inserted into, by origin journal file convergence and is stored in database, this Kind structure realizes the scalability of acquisition.
The interface test method in one of the embodiments, further include: using the received response data as to The test data of test interface establishes the incidence relation of the interface testing data and the interface name of the interface to be tested.
Using received response data as the test data of interface to be tested, it is to be tested with this to establish the interface testing data The incidence relation of the interface name of interface.Interface refers to the rule of communication between same system different function layer, with the side of service Formula externally provides an interface, in interface system end to end, guarantees the quality and stability for the interface that front and back end interacts It is particularly important, and the quality and stability of interface during interface exploitation is verified by interface testing.
As shown in figure 3, in one embodiment, a kind of interface test system, the interface test system includes:
Generation module is set as generating the request data for being directed to interface to be tested;
Sending module is set as the request data being sent to the server where the interface to be tested;
Receiving module is set as receiving the response data for the request data that the server returns;
Calling module is set as when test assignment occurs, according to the dynamic call dependence of acquisition and by identifying Each task combination producing and export origin journal file, and will origin journal file carry out data processing after, be stored in In interface description data library, the origin journal file records all data transmissions, received process, the interface description data It include that interface name and its corresponding response data describe in library;
Authentication module is set as that service logic is called to verify the received response data and returns to verifying knot Fruit generates interface testing report.
As shown in figure 4, in one embodiment, the calling module further include:
Design cell is set as calling blocker according to service framework and invocation protocol design;
Built-in unit is set as blocker being called to be built in invocation protocol;
Interception unit is set as calling blocker to intercept call request when calling generation, obtains dynamic call and rely on pass System, and identify the combination of each task;
Call unit is set as calling blocker according to origination data specification, according to the dynamic call dependence of acquisition The combination producing of each task identified with process simultaneously exports origin journal file;
Storage unit is stored in interface description data library after the journal file that is set as originating from carries out data processing.
In one embodiment, the authentication module is also configured to be generated according to the verification result for described to be tested The interface testing of interface is reported, and establishes the incidence relation of interface testing report and the interface name of the interface to be tested, institute State request data, verification result, verification result state and the verifying knot that interface testing report includes the interface to be tested having verified that One of fruit Failure Causes Analysis is a variety of, and the verification result state includes successfully and failing.
In one embodiment it is proposed that a kind of computer equipment, the computer equipment includes memory and processor, Computer-readable instruction is stored in memory, when computer-readable instruction is executed by processor, so that described in processor execution The request data for generating and being directed to interface to be tested is performed the steps of when computer program;The request data is sent to institute State the server where interface to be tested;Receive the response data for the request data that the server returns;Work as survey When trial business occurs, the combination producing of each task according to the dynamic call dependence of acquisition and by mark is simultaneously exported Source log file, and after the journal file progress data processing that will originate from, it is stored in interface description data library, described Source log All data of file record send, received process, include interface name and its corresponding sound in the interface description data library Data are answered to describe;It calls service logic to be verified and returned verification result to the received response data, generates interface and survey Examination report.In the present embodiment, described when test assignment occurs, according to the dynamic call dependence of acquisition and by identifying Each task combination producing and export origin journal file, and will origin journal file carry out data processing after, be stored in Interface description data includes: in library
Blocker is called according to service framework and invocation protocol design;
Blocker will be called to be built in invocation protocol;
When calling generation, blocker is called to intercept call request, obtains dynamic call dependence, and identify and each appoint The combination of business;
Call blocker according to origination data specification, according to the dynamic call dependence of acquisition and by each of mark The combination producing of task simultaneously exports origin journal file;
After the journal file that will originate from carries out data processing, it is stored in interface description data library.
In the present embodiment, the calling service logic verifies the received response data and returns to verifying knot Fruit, generating interface testing report includes:
The interface testing report for the interface to be tested is generated according to the verification result, and establishes the interface testing The incidence relation of report and the interface name of the interface to be tested, the interface testing report includes the interface to be tested having verified that One of request data, verification result, verification result state and verification result Failure Causes Analysis or a variety of, the verifying Result phase includes successfully and failing.
In the present embodiment, carrying out data processing to origin journal file includes: to check the number that originates from the journal file of origin It is believed that the integrality of breath, abandons undesirable data, then satisfactory origination data information norm, then inserts Enter database, by origin journal file convergence and is stored in interface description data library.
In the present embodiment, the interface test method further include: try using the received response data as to be measured The test data of mouth establishes the incidence relation of the interface testing data and the interface name of the interface to be tested.
In one embodiment it is proposed that a kind of storage medium for being stored with computer-readable instruction, this is computer-readable When instruction is executed by one or more processors, so that one or more processors execute following steps: generating for be tested The request data of interface;The server request data being sent to where the interface to be tested;Receive the server The response data for the request data returned;When test assignment occurs, according to the dynamic call dependence of acquisition With by mark each task combination producing and export origin journal file, and will origin journal file carry out data processing Afterwards, it is stored in interface description data library, the origin journal file records all data transmissions, received process, described to connect It include that interface name and its corresponding response data describe in mouth descriptive data base;Call service logic to the received response Verification result is verified and returned to data, generates interface testing report.Wherein, the storage medium can be deposited to be non-volatile Storage media.
In the present embodiment, described when test assignment occurs, according to the dynamic call dependence of acquisition and by marking After the combination producing for each task known simultaneously exports origin journal file, and the journal file that will originate from carries out data processing, storage Include: in interface description data library
Blocker is called according to service framework and invocation protocol design;
Blocker will be called to be built in invocation protocol;
When calling generation, blocker is called to intercept call request, obtains dynamic call dependence, and identify and each appoint The combination of business;
Call blocker according to origination data specification, according to the dynamic call dependence of acquisition and by each of mark The combination producing of task simultaneously exports origin journal file;
After the journal file that will originate from carries out data processing, it is stored in interface description data library.
In the present embodiment, the calling service logic verifies the received response data and returns to verifying knot Fruit, generating interface testing report includes:
The interface testing report for the interface to be tested is generated according to the verification result, and establishes the interface testing The incidence relation of report and the interface name of the interface to be tested, the interface testing report includes the interface to be tested having verified that One of request data, verification result, verification result state and verification result Failure Causes Analysis or a variety of, the verifying Result phase includes successfully and failing.
In the present embodiment, carrying out data processing to origin journal file includes: to check the number that originates from the journal file of origin It is believed that the integrality of breath, abandons undesirable data, then satisfactory origination data information norm, then inserts Enter database, by origin journal file convergence and is stored in interface description data library.
In the present embodiment, the method also includes: using the received response data as the test of interface to be tested Data establish the incidence relation of the interface testing data and the interface name of the interface to be tested.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can It is completed with instructing relevant hardware by program, which can be stored in a computer readable storage medium, storage Medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or CD etc..
Each technical characteristic of embodiment described above can be combined arbitrarily, for simplicity of description, not to above-mentioned reality It applies all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited In contradiction, all should be considered as described in this specification.
Some exemplary embodiments of the invention above described embodiment only expresses, the description thereof is more specific and detailed, but It cannot be construed as a limitation to the scope of the present invention.It should be pointed out that for the ordinary skill people of this field For member, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to of the invention Protection scope.Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.

Claims (10)

1. a kind of interface test method characterized by comprising
Generate the request data for being directed to interface to be tested;
The server request data being sent to where the interface to be tested;
Receive the response data for the request data that the server returns;
When test assignment occurs, the combination producing of each task according to the dynamic call dependence of acquisition and by mark And origin journal file is exported, and after the journal file progress data processing that will originate from, be stored in interface description data library, it is described Origin journal file record all data send, received process, include in the interface description data library interface name and its Corresponding response data description;
It calls service logic to be verified and returned verification result to the received response data, generates interface testing report.
2. interface test method according to claim 1, which is characterized in that it is described when test assignment occurs, according to obtaining The combination producing of the dynamic call dependence and each task by mark that obtain simultaneously exports origin journal file, and will origin After journal file carries out data processing, it is stored in interface description data library and includes:
Blocker is called according to service framework and invocation protocol design;
Blocker will be called to be built in invocation protocol;
When calling generation, blocker is called to intercept call request, obtains dynamic call dependence, and identify each task Combination;
Call blocker according to origination data specification, each task according to the dynamic call dependence of acquisition and by mark Combination producing and export origin journal file;
After the journal file that will originate from carries out data processing, it is stored in interface description data library.
3. interface test method according to claim 1, which is characterized in that the calling service logic is to received described Verification result is verified and returned to response data, is generated interface testing report and is included:
The interface testing report for the interface to be tested is generated according to the verification result, and establishes interface testing report With the incidence relation of the interface name of the interface to be tested, the interface testing report includes asking for the interface to be tested having verified that Ask one of data, verification result, verification result state and verification result Failure Causes Analysis or a variety of, the verification result State includes successfully and failing.
4. interface test method according to claim 1, which is characterized in that carry out data processing packet to origin journal file It includes: checking the integrality of origination data information in the journal file of origin, abandon undesirable data, then meeting the requirements Origination data information norm, be inserted into database, origin journal file convergence and interface description data library will be stored in.
5. interface test method described in -4 according to claim 1, which is characterized in that the method also includes: by received institute Test data of the response data as interface to be tested is stated, the interface name of the interface testing data and the interface to be tested is established Incidence relation.
6. a kind of interface test system, which is characterized in that the interface test system includes:
Generation module is set as generating the request data for being directed to interface to be tested;
Sending module is set as the request data being sent to the server where the interface to be tested;
Receiving module is set as receiving the response data for the request data that the server returns;
Calling module is set as when test assignment occurs, according to the dynamic call dependence of acquisition and by the every of mark After the combination producing of a task simultaneously exports origin journal file, and the journal file that will originate from carries out data processing, it is stored in interface In descriptive data base, the origin journal file record all data send, received process, in the interface description data library It is described including interface name and its corresponding response data;
Authentication module is set as that service logic is called to be verified and returned verification result to the received response data, raw It is reported at interface testing.
7. interface test system according to claim 6, which is characterized in that the calling module further include:
Design cell is set as calling blocker according to service framework and invocation protocol design;
Built-in unit is set as blocker being called to be built in invocation protocol;
Interception unit is set as calling blocker to intercept call request when calling generation, obtains dynamic call dependence, And identify the combination of each task;
Call unit is set as calling blocker according to origination data specification, according to the dynamic call dependence and warp of acquisition It crosses the combination producing of each task of mark and exports origin journal file;
Storage unit is stored in interface description data library after the journal file that is set as originating from carries out data processing.
8. interface test system according to claim 6, which is characterized in that the authentication module is also configured to according to Verification result generates the interface testing for the interface to be tested and reports, and establishes interface testing report and to be measured try with this The incidence relation of the interface name of mouth, the interface testing report include the request data for the interface to be tested having verified that, verifying As a result, one of verification result state and verification result Failure Causes Analysis or a variety of, the verification result state include into Function and failure.
9. a kind of computer equipment, which is characterized in that including memory and processor, being stored with computer in the memory can Reading instruction, when the computer-readable instruction is executed by the processor, so that the processor executes such as claim 1 to 5 Any one of the method the step of.
10. a kind of storage medium for being stored with computer-readable instruction, which is characterized in that the computer-readable instruction is by one Or multiple processors are when executing, so that one or more processors execute the step such as any one of claims 1 to 5 the method Suddenly.
CN201810893803.2A 2018-08-08 2018-08-08 Interface test method, system, computer equipment and storage medium Pending CN109298997A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810893803.2A CN109298997A (en) 2018-08-08 2018-08-08 Interface test method, system, computer equipment and storage medium
PCT/CN2018/106403 WO2020029375A1 (en) 2018-08-08 2018-09-19 Interface testing method and system, and computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810893803.2A CN109298997A (en) 2018-08-08 2018-08-08 Interface test method, system, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN109298997A true CN109298997A (en) 2019-02-01

Family

ID=65172802

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810893803.2A Pending CN109298997A (en) 2018-08-08 2018-08-08 Interface test method, system, computer equipment and storage medium

Country Status (2)

Country Link
CN (1) CN109298997A (en)
WO (1) WO2020029375A1 (en)

Cited By (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110096395A (en) * 2019-03-12 2019-08-06 深圳壹账通智能科技有限公司 Interface joint debugging test method, device, computer equipment and storage medium
CN110096437A (en) * 2019-04-12 2019-08-06 平安普惠企业管理有限公司 The test method and Related product of micro services framework
CN110609781A (en) * 2019-08-29 2019-12-24 凡普数字技术有限公司 Interface test method, device and storage medium
CN110704218A (en) * 2019-08-30 2020-01-17 深圳壹账通智能科技有限公司 Data processing method, data processing device, computer equipment and storage medium
CN110730107A (en) * 2019-09-02 2020-01-24 深圳壹账通智能科技有限公司 Test data generation method and device, computer equipment and storage medium
CN110727580A (en) * 2019-09-03 2020-01-24 深圳壹账通智能科技有限公司 Response data generation method, full-flow interface data processing method and related equipment
CN110888805A (en) * 2019-11-11 2020-03-17 北京仁科互动网络技术有限公司 RESTful API playback test method and system
CN111209202A (en) * 2020-01-06 2020-05-29 北京字节跳动网络技术有限公司 Terminal application testing method and device
CN111556080A (en) * 2020-05-18 2020-08-18 网易(杭州)网络有限公司 Network node monitoring method, device, medium and electronic equipment
CN111796978A (en) * 2020-06-29 2020-10-20 苏州好玩友网络科技有限公司 Interface detection method, device, system, equipment and storage medium
CN111858296A (en) * 2019-12-31 2020-10-30 北京嘀嘀无限科技发展有限公司 Interface test method, device, equipment and storage medium
CN111881020A (en) * 2020-07-07 2020-11-03 上海中通吉网络技术有限公司 Payment center interface testing method, device and system
CN112286797A (en) * 2020-09-29 2021-01-29 长沙市到家悠享网络科技有限公司 Service monitoring method and device, electronic equipment and storage medium
CN112506807A (en) * 2021-02-07 2021-03-16 上海洋漪信息技术有限公司 Automatic test system for interface serving multiple systems
CN113220559A (en) * 2020-01-21 2021-08-06 北京沃东天骏信息技术有限公司 Service interface abnormity simulation method, device and system and client
CN113268421A (en) * 2021-05-21 2021-08-17 中国联合网络通信集团有限公司 Service call processing method, device, server and storage medium
CN113297157A (en) * 2020-02-24 2021-08-24 长鑫存储技术有限公司 Machine file processing method and system
CN113392004A (en) * 2021-06-15 2021-09-14 中国工商银行股份有限公司 Interface verification method, device, equipment, medium and program product
CN113760719A (en) * 2020-11-25 2021-12-07 北京京东振世信息技术有限公司 An interface testing method and tool
CN113835419A (en) * 2021-11-29 2021-12-24 湖南中车时代通信信号有限公司 Test method and system of train control equipment and storage medium
CN114253788A (en) * 2021-11-03 2022-03-29 北京云宽志业网络技术有限公司 Interface verification method and device, storage medium and electronic equipment
CN114328195A (en) * 2021-12-15 2022-04-12 深圳前海环融联易信息科技服务有限公司 Method for rapidly counting interface defect rate and estimating development quality
CN114356777A (en) * 2022-01-10 2022-04-15 中国民航信息网络股份有限公司 Service scene testing method and device, storage medium and electronic equipment
CN114666258A (en) * 2022-03-22 2022-06-24 阿波罗智联(北京)科技有限公司 Interface test method, device, electronic equipment and medium
CN114675989A (en) * 2022-02-28 2022-06-28 青岛海尔科技有限公司 Data verification method, device, electronic device and storage medium
CN115033397A (en) * 2022-05-27 2022-09-09 青岛海尔科技有限公司 Interface calling method, apparatus, device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090156198A1 (en) * 2007-12-14 2009-06-18 Ching-Hao Lee Method for evaluating mobile communication device utilizing field test logs and system thereof
CN104092755A (en) * 2014-07-07 2014-10-08 武汉科技大学 A method and device for capturing cloud service origin data
CN106155891A (en) * 2015-04-02 2016-11-23 阿里巴巴集团控股有限公司 Interface test method, interface description data library generating method and device
CN107276842A (en) * 2017-05-10 2017-10-20 北京金山安全软件有限公司 Interface test method and device and electronic equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050234680A1 (en) * 2004-04-14 2005-10-20 International Business Machines Corporation Simplified and optimized process for application user interface testing and validation
CN102957553B (en) * 2011-08-25 2018-04-27 中兴通讯股份有限公司 One kind excitation code automatic generation method and device
CN102981947B (en) * 2011-09-07 2015-07-08 阿里巴巴集团控股有限公司 Data preparation method in test and system provided with the same
CN107301122A (en) * 2017-05-10 2017-10-27 深圳市小牛在线互联网信息咨询有限公司 interface test method, device, storage medium and computer equipment
CN107171897A (en) * 2017-07-14 2017-09-15 上海瀚银信息技术有限公司 A kind of interface test method and data-interface test system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090156198A1 (en) * 2007-12-14 2009-06-18 Ching-Hao Lee Method for evaluating mobile communication device utilizing field test logs and system thereof
CN104092755A (en) * 2014-07-07 2014-10-08 武汉科技大学 A method and device for capturing cloud service origin data
CN106155891A (en) * 2015-04-02 2016-11-23 阿里巴巴集团控股有限公司 Interface test method, interface description data library generating method and device
CN107276842A (en) * 2017-05-10 2017-10-20 北京金山安全软件有限公司 Interface test method and device and electronic equipment

Cited By (34)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110096395A (en) * 2019-03-12 2019-08-06 深圳壹账通智能科技有限公司 Interface joint debugging test method, device, computer equipment and storage medium
CN110096437A (en) * 2019-04-12 2019-08-06 平安普惠企业管理有限公司 The test method and Related product of micro services framework
CN110609781A (en) * 2019-08-29 2019-12-24 凡普数字技术有限公司 Interface test method, device and storage medium
CN110704218A (en) * 2019-08-30 2020-01-17 深圳壹账通智能科技有限公司 Data processing method, data processing device, computer equipment and storage medium
CN110704218B (en) * 2019-08-30 2023-03-10 深圳壹账通智能科技有限公司 Data processing method, data processing device, computer equipment and storage medium
CN110730107A (en) * 2019-09-02 2020-01-24 深圳壹账通智能科技有限公司 Test data generation method and device, computer equipment and storage medium
CN110730107B (en) * 2019-09-02 2022-07-12 深圳壹账通智能科技有限公司 Test data generation method and device, computer equipment and storage medium
CN110727580A (en) * 2019-09-03 2020-01-24 深圳壹账通智能科技有限公司 Response data generation method, full-flow interface data processing method and related equipment
CN110888805A (en) * 2019-11-11 2020-03-17 北京仁科互动网络技术有限公司 RESTful API playback test method and system
CN111858296A (en) * 2019-12-31 2020-10-30 北京嘀嘀无限科技发展有限公司 Interface test method, device, equipment and storage medium
CN111209202A (en) * 2020-01-06 2020-05-29 北京字节跳动网络技术有限公司 Terminal application testing method and device
CN113220559A (en) * 2020-01-21 2021-08-06 北京沃东天骏信息技术有限公司 Service interface abnormity simulation method, device and system and client
CN113297157B (en) * 2020-02-24 2024-06-07 长鑫存储技术有限公司 Machine file processing method and processing system
CN113297157A (en) * 2020-02-24 2021-08-24 长鑫存储技术有限公司 Machine file processing method and system
CN111556080A (en) * 2020-05-18 2020-08-18 网易(杭州)网络有限公司 Network node monitoring method, device, medium and electronic equipment
CN111796978A (en) * 2020-06-29 2020-10-20 苏州好玩友网络科技有限公司 Interface detection method, device, system, equipment and storage medium
CN111881020A (en) * 2020-07-07 2020-11-03 上海中通吉网络技术有限公司 Payment center interface testing method, device and system
CN111881020B (en) * 2020-07-07 2024-04-09 上海中通吉网络技术有限公司 Payment center interface testing method, device and system
CN112286797A (en) * 2020-09-29 2021-01-29 长沙市到家悠享网络科技有限公司 Service monitoring method and device, electronic equipment and storage medium
CN112286797B (en) * 2020-09-29 2024-05-03 长沙市到家悠享网络科技有限公司 A service monitoring method, device, electronic device and storage medium
CN113760719A (en) * 2020-11-25 2021-12-07 北京京东振世信息技术有限公司 An interface testing method and tool
CN112506807A (en) * 2021-02-07 2021-03-16 上海洋漪信息技术有限公司 Automatic test system for interface serving multiple systems
CN113268421A (en) * 2021-05-21 2021-08-17 中国联合网络通信集团有限公司 Service call processing method, device, server and storage medium
CN113392004A (en) * 2021-06-15 2021-09-14 中国工商银行股份有限公司 Interface verification method, device, equipment, medium and program product
CN114253788A (en) * 2021-11-03 2022-03-29 北京云宽志业网络技术有限公司 Interface verification method and device, storage medium and electronic equipment
CN114253788B (en) * 2021-11-03 2023-04-28 北京云宽志业网络技术有限公司 Interface verification method and device, storage medium and electronic equipment
CN113835419B (en) * 2021-11-29 2022-02-25 湖南中车时代通信信号有限公司 Test method and system of train control equipment and storage medium
CN113835419A (en) * 2021-11-29 2021-12-24 湖南中车时代通信信号有限公司 Test method and system of train control equipment and storage medium
CN114328195A (en) * 2021-12-15 2022-04-12 深圳前海环融联易信息科技服务有限公司 Method for rapidly counting interface defect rate and estimating development quality
CN114356777A (en) * 2022-01-10 2022-04-15 中国民航信息网络股份有限公司 Service scene testing method and device, storage medium and electronic equipment
CN114675989A (en) * 2022-02-28 2022-06-28 青岛海尔科技有限公司 Data verification method, device, electronic device and storage medium
CN114666258B (en) * 2022-03-22 2023-11-07 阿波罗智联(北京)科技有限公司 Interface testing method, device, electronic equipment and medium
CN114666258A (en) * 2022-03-22 2022-06-24 阿波罗智联(北京)科技有限公司 Interface test method, device, electronic equipment and medium
CN115033397A (en) * 2022-05-27 2022-09-09 青岛海尔科技有限公司 Interface calling method, apparatus, device and storage medium

Also Published As

Publication number Publication date
WO2020029375A1 (en) 2020-02-13

Similar Documents

Publication Publication Date Title
CN109298997A (en) Interface test method, system, computer equipment and storage medium
US8959000B2 (en) Integrated testing systems and methods
US8578017B2 (en) Automatic correlation of service level agreement and operating level agreement
US8667147B2 (en) Monitoring related content requests
WO2020238066A1 (en) Software pressure test method and apparatus, and storage medium and server
CN108509392B (en) Multi-agency reconciliation method, system, computer equipment and storage medium
CN110222042B (en) Method, device, equipment and system architecture for determining checked business data
CN114745295A (en) Data acquisition method, device, equipment and readable storage medium
CN105260292B (en) A kind of log recording method, apparatus and system
CN105224296B (en) Web service Qos attribute evaluation system and its evaluation method based on independent third party
CN112631846A (en) Fault drilling method and device, computer equipment and storage medium
CN109831357A (en) A kind of service verification method, apparatus, storage medium and server
CN110535654A (en) Parallel system dispositions method, device and computer equipment based on block chain
CN103246606A (en) Method and system for testing performances of ESB (enterprises service bus) platform
US20070124726A1 (en) Automated QS interface testing framework
CN110399309A (en) A kind of test data generating method and device
CN112905437A (en) Method and device for testing case and storage medium
CN107003931A (en) Test checking is separated from test execution
CN111708712A (en) User behavior test case generation method, flow playback method and electronic equipment
US7797590B2 (en) Consensus testing of electronic system
CN112579437A (en) Program operation process conformance verification method
CN119149422A (en) Micro-service chaos test method and device based on Istio and link tracking
CN109189849A (en) A kind of standardization, the data entry method of procedure and system
Salva et al. Automated test case generation for service composition from event logs
US20080033995A1 (en) Identifying events that correspond to a modified version of a process

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190201