CN108549606A - interface test method and device - Google Patents
interface test method and device Download PDFInfo
- Publication number
- CN108549606A CN108549606A CN201810340747.XA CN201810340747A CN108549606A CN 108549606 A CN108549606 A CN 108549606A CN 201810340747 A CN201810340747 A CN 201810340747A CN 108549606 A CN108549606 A CN 108549606A
- Authority
- CN
- China
- Prior art keywords
- interface
- measured
- case
- testing use
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
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)
- User Interface Of Digital Computer (AREA)
Abstract
An embodiment of the present invention provides a kind of interface test method and devices, belong to field of computer technology.This method is first when detecting that user initiates interface call request to be measured, it obtains the interface testing use-case of interface to be measured and obtains the request results that server is returned according to the interface call request to be measured, then the interface to be measured is tested using the interface testing use-case, to obtain test result, the request results are compared with the test result, obtain a comparison result, then judge whether the interface to be measured is qualified according to the comparison result, wherein, when the determination result is yes, show that the interface to be measured is qualification, when the judgment result is No, show that the interface to be measured is unqualified, in this method, by automatically obtaining interface testing use-case, automatic butt mouth carries out test and whether automatic decision interface is qualified, and then improve interface testing efficiency.
Description
Technical field
The present invention relates to field of computer technology, in particular to a kind of interface test method and device.
Background technology
As software technology develops, more and more softwares provide service to the user by hardware and software platform, and third party can basis
Platform, which provides interface and customizes, oneself to be needed to service, therefore nowadays software frequently involves interface testing.Interface is that some are pre-defined
Function, it is therefore an objective to application program and developer are provided and are able to access the ability of one group of routine based on certain software or hardware, and
It is not necessarily to access source code again, or understands the details of internal work mechanism.Interface testing is to submit input data to interface, obtains and returns
As a result and whether analysis result meets expected test.It may be related to various system commands, testing tool in interface testing, very
To programming technique.
Most of at present is all to complete use-case by the various types of interface use-cases of hand-coding in software development process
Use-case is manually then run with the existing tool in some markets after writing, inefficiency is caused, influences project process
A series of problems, such as equal.
Invention content
In view of this, the embodiment of the present invention is designed to provide a kind of interface test method and device, it is above-mentioned to improve
Problem.
In a first aspect, an embodiment of the present invention provides a kind of interface test method, the method includes:Detecting user
When initiating interface call request to be measured, obtains the interface testing use-case of interface to be measured and obtain server and to be measured connect according to described
The request results that mouth call request returns;The interface to be measured is tested using the interface testing use-case, is surveyed with obtaining
Test result;The request results are compared with the test result, obtain a comparison result;Sentenced according to the comparison result
Whether the interface to be measured that breaks is qualified, wherein when the determination result is yes, shows that the interface to be measured is qualification, is judging to tie
When fruit is no, show that the interface to be measured is unqualified.
Further, user initiate interface call request to be measured when, obtain interface to be measured interface testing use-case and
After obtaining request results of the server according to the interface call request return to be measured, the method further includes:According to described
The type of interface to be measured classifies to the interface testing use-case, with according to of a sort interface testing use-case to corresponding same
The interface to be measured of type test obtaining the coverage rate for having surveyed interface.
Further, when detecting that user initiates interface call request to be measured, the interface testing for obtaining interface to be measured is used
Example, including:When detecting that user initiates interface call request to be measured, the data of the interface to be measured are obtained;It will be described to be measured
The data of interface are converted according to preset rules, to obtain interface testing use-case.
Further, when detecting that user initiates interface call request to be measured, the interface testing for obtaining interface to be measured is used
After the request results of example and acquisition server according to the interface call request return to be measured, the method further includes:It obtains
The verification returned after taking database to be verified to the interface testing use-case of acquisition according to the interface call request to be measured
As a result;Judge whether the interface testing use-case is perfect according to the verification result.
Further, after judging whether the interface testing use-case improves according to the verification result, the method is also
Including:When judging that the interface testing use-case is not perfect, the interface testing is improved using the flash back operation of the database
Use-case.
Second aspect, an embodiment of the present invention provides a kind of interface test device, described device includes:Data acquisition mould
Block, for when detecting that user initiates interface call request to be measured, obtaining interface testing use-case and the acquisition of interface to be measured
The request results that server is returned according to the interface call request to be measured;Test module, for being used using the interface testing
Example tests the interface to be measured, to obtain test result;As a result comparing module, for by the request results with it is described
Test result is compared, and obtains a comparison result;Judgment module, for judging the interface to be measured according to the comparison result
It is whether qualified, wherein when the determination result is yes, to show that the interface to be measured is qualification, when the judgment result is No, show institute
It is unqualified to state interface to be measured.
Further, described device further includes:Use-case sort module is used for the type according to the interface to be measured to described
Interface testing use-case is classified, to be surveyed to the interface to be measured of corresponding same type according to of a sort interface testing use-case
The coverage rate of interface has been surveyed in examination to obtain.
Further, the data acquisition module, specifically for detect user initiate interface call request to be measured when,
Obtain the data of the interface to be measured;The data of the interface to be measured are converted according to preset rules, to obtain interface survey
Example on probation.
Further, described device further includes:Check results acquisition module to be measured connects for obtaining database root according to described
The verification result that mouth call request returns after being verified to the interface testing use-case of acquisition;Judgment module is improved, is used for
Judge whether the interface testing use-case is perfect according to the verification result.
Further, described device further includes:Flash back operation module, for judging that the interface testing use-case is not perfect
When, improve the interface testing use-case using the flash back operation of the database.
The advantageous effect of the embodiment of the present invention is:
An embodiment of the present invention provides a kind of interface test method and device, this method first detect user initiate wait for
When surveying interface call request, obtains the interface testing use-case of interface to be measured and obtain server and called according to the interface to be measured
The request results returned are asked, then the interface to be measured is tested using the interface testing use-case, to obtain test
As a result, the request results are compared with the test result, a comparison result is obtained, then according to the comparison result
Judge whether the interface to be measured is qualified, wherein when the determination result is yes, show that the interface to be measured is qualification, judging
When being as a result no, show that the interface to be measured is unqualified, it is automatic right by automatically obtaining interface testing use-case in this method
Interface carries out test and whether automatic decision interface is qualified, and then improves interface testing efficiency.
Other features and advantages of the present invention will be illustrated in subsequent specification, also, partly be become from specification
It is clear that by implementing understanding of the embodiment of the present invention.The purpose of the present invention and other advantages can be by saying what is write
Specifically noted structure is realized and is obtained in bright book, claims and attached drawing.
Description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached
Figure is briefly described, it should be understood that the following drawings illustrates only certain embodiments of the present invention, therefore is not construed as pair
The restriction of range for those of ordinary skill in the art without creative efforts, can also be according to this
A little attached drawings obtain other relevant attached drawings.
Fig. 1 shows a kind of structure diagram can be applied to the electronic equipment in the embodiment of the present application;
Fig. 2 is a kind of flow chart of interface test method provided in an embodiment of the present invention;
Fig. 3 is a kind of structure diagram of interface test device provided in an embodiment of the present invention.
Specific implementation mode
Below in conjunction with attached drawing in the embodiment of the present invention, technical solution in the embodiment of the present invention carries out clear, complete
Ground describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Usually exist
The component of the embodiment of the present invention described and illustrated in attached drawing can be arranged and be designed with a variety of different configurations herein.Cause
This, the detailed description of the embodiment of the present invention to providing in the accompanying drawings is not intended to limit claimed invention below
Range, but it is merely representative of the selected embodiment of the present invention.Based on the embodiment of the present invention, those skilled in the art are not doing
The every other embodiment obtained under the premise of going out creative work, shall fall within the protection scope of the present invention.
It should be noted that:Similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi
It is defined, then it further need not be defined and explained in subsequent attached drawing in a attached drawing.Meanwhile the present invention's
In description, term " first ", " second " etc. are only used for distinguishing description, are not understood to indicate or imply relative importance.
Fig. 1 is please referred to, Fig. 1 shows a kind of structure diagram for the electronic equipment 100 that can be applied in the embodiment of the present application.
Electronic equipment 100 may include interface test device, memory 101, storage control 102, processor 103, Peripheral Interface
104。
The memory 101, storage control 102, processor 103,104 each element of Peripheral Interface between each other directly or
It is electrically connected indirectly, to realize the transmission or interaction of data.For example, these elements between each other can be logical by one or more
It interrogates bus or signal wire is realized and is electrically connected.The interface test device include it is at least one can be with software or firmware
(firmware) form is stored in the memory 101 or is solidificated in the operating system of the interface test device
Software function module in (operating system, OS).The processor 103 is used to execute to store in memory 101
Module is can perform, such as the software function module or computer program that the interface test device includes.
Wherein, memory 101 may be, but not limited to, random access memory (Random Access Memory,
RAM), read-only memory (Read Only Memory, ROM), programmable read only memory (Programmable Read-Only
Memory, PROM), erasable read-only memory (Erasable Programmable Read-Only Memory, EPROM),
Electricallyerasable ROM (EEROM) (Electric Erasable Programmable Read-Only Memory, EEPROM) etc..
Wherein, memory 101 is for storing program, and the processor 103 executes described program after receiving and executing instruction, aforementioned
The method performed by server that the stream process that any embodiment of the embodiment of the present invention discloses defines can be applied to processor 103
In, or realized by processor 103.
Processor 103 can be a kind of IC chip, the processing capacity with signal.Above-mentioned processor 103 can
To be general processor, including central processing unit (Central Processing Unit, abbreviation CPU), network processing unit
(Network Processor, abbreviation NP) etc.;Can also be digital signal processor (DSP), application-specific integrated circuit (ASIC),
Ready-made programmable gate array (FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hard
Part component.It may be implemented or execute disclosed each method, step and the logic diagram in the embodiment of the present invention.General processor
Can be microprocessor or the processor 103 can also be any conventional processor etc..
The Peripheral Interface 104 couples various input/output devices to processor 103 and memory 101.At some
In embodiment, Peripheral Interface 104, processor 103 and storage control 102 can be realized in one single chip.Other one
In a little examples, they can be realized by independent chip respectively.
The Peripheral Interface 104 couples various input/output devices to processor 103 and memory 101.At some
In embodiment, Peripheral Interface 104, processor 103 and storage control 102 can be realized in one single chip.Other one
In a little examples, they can be realized by independent chip respectively.
It is appreciated that structure shown in FIG. 1 is only to illustrate, the electronic equipment 100 may also include more than shown in Fig. 1
Either less component or with the configuration different from shown in Fig. 1.Hardware, software may be used in each component shown in Fig. 1
Or combinations thereof realize.
Fig. 2 is please referred to, Fig. 2 is a kind of flow chart of interface test method provided in an embodiment of the present invention, and this method includes
Following steps:
Step S110:When detecting that user initiates interface call request to be measured, the interface testing for obtaining interface to be measured is used
The request results that example and acquisition server are returned according to the interface call request to be measured.
Interface encapsulation is often function by the test for interface, then by calling the function to realize that interface function is surveyed
The automation of examination.Wherein, Client-initiated interface call request to be measured, as calls the function of the interface encapsulation to be measured, electronics
Equipment can obtain the interface to be measured when detecting that user initiates interface call request to be measured according to the mark of the interface to be measured
Relevant interface data obtain the data of the interface to be measured, such as that is, when detecting that user initiates interface call request to be measured
The data such as the title of the interface to be measured, the test data that need to be transmitted, test content, expected results, then preserve these data
For local document, then the data of the interface to be measured are converted according to preset rules, to obtain interface testing use-case, example
Such as, these data are carried out being converted to interface testing use-case according to some preset call formats.
Interface testing use-case need to be used to the test of interface to be measured, and obtaining interface testing use-case also needs to obtain dependency number
According to, for example, function module, use-case ID, interface name, required parameter, result verification etc. belonging to the interface to be measured, so,
After above-mentioned acquisition interface data, interface testing use-case is obtained after being converted to the interface data, is to be based on interface data in fact
Interface testing use-case is automatically generated according to the interface testing use-case template write in advance, so as to avoid interface testing is write manually
The complex operations that use-case is brought.
Certainly, interface testing use-case can be generated in advance and preserve later, that is to say, that for each interface,
Can previously according to this interface data conversion at being stored after interface testing use-case, obtaining interface call request to be measured
Afterwards, the corresponding interface testing of interface to be measured can be obtained from the interface testing use-case of preservation according to the mark of the interface to be measured
Use-case.
Client-initiated interface call request to be measured can be sent to server, and server returns to a request according to the request
As a result, for example, user initiates that the interface call request for showing picture, server is called to receive the request to electricity to hair server
Sub- equipment returns to request results, such as asks successfully or ask unsuccessfully.
Step S120:The interface to be measured is tested using the interface testing use-case, to obtain test result.
The interface testing use-case is the test case required with certain format that user writes, for example, interface is surveyed
Example on probation includes interface name to be measured, test title, test content, calls filename, transmission field, expected results etc..
Interface testing use-case includes anticipated output as a result, after being tested interface to be measured using interface testing use-case
After obtaining the output result that the interface to be measured returns, which is compared with anticipated output result, if output result
It is consistent with anticipated output result, then it is preserved using the output result as test result, if output result and anticipated output knot
When fruit is inconsistent, the output result that interface to be measured returns is preserved as test result.
Step S130:The request results are compared with the test result, obtain a comparison result.
The request results are the request results that above-mentioned server is returned according to the interface call request to be measured, test knot
Fruit is the test result obtained after being tested the interface to be measured using interface testing use-case, since server receives use
After the interface call request to be measured that family is initiated, if the interface to be measured can not be run, server returns to asking for request failure
If asking as a result, the interface to be measured can be returned with normal operation, server asks successful request results, for example, user initiates
Interface call request to be measured be picture display interface call request, if the interface can be with normal call, what server returned ask
It is ask successfully to seek result, the test result after being tested the interface using interface testing use-case to be successfully tested, so,
Request results are being compared with the test result, are obtaining comparison result, comparison result can be to compare consistent or ratio
To inconsistent.
Step S140:Judge whether the interface to be measured is qualified according to the comparison result.
Wherein, when the determination result is yes, show that the interface to be measured is qualification, when the judgment result is No, show institute
It is unqualified to state interface to be measured, and even comparison result is when comparing inconsistent, it is determined that the interface to be measured is unqualified, if than
It is when comparing consistent to result, it is determined that the interface to be measured is qualification, when interface to be measured is unqualified, then can be repaiied again
Change the relative program of interface to be measured, or other measures is taken to save etc., if interface to be measured is qualified, this is to be measured to connect
Mouth can be used normally, and there is no problem, to be tested by automatic butt mouth, largely improve testing efficiency.
In addition, as an implementation, when interface to be measured is multiple, in order to effectively be surveyed to multiple interfaces to be measured
Examination, then the method further includes:
Classified to the interface testing use-case according to the type of the interface to be measured, to be surveyed according to of a sort interface
Example on probation to the interface to be measured of corresponding same type test obtaining the coverage rate for having surveyed interface.For example, for a certain
The interface type to be measured of type may be used the same interface testing use-case and be tested, and such as uses the interface to be measured and presses work(
Type division can be carried out, the interface for carrying out login function is divided into same type of interface, for carrying out registering functional
Interface is divided into same type of interface, and wherein belongs to same type of interface and can correspond to different interface testing use-cases,
For example, the interface logged in using local service and the interface for using outer net service to be logged in are clearly different, institute
With interface testing sample is also different, specifically, can be identical using the addresses URL of defining interface, which connects as same type
Mouthful, so, the corresponding interface testing sample of the interface of these same types is divided into one kind, as a result, to the interface of same type into
When row test, the coverage rate of test interface can be obtained, for example, belonging to there are five the interfaces for logging in type, then using connecing
Mouthful test case tests three interfaces therein, then its test interface coverage rate is 3/5ths, so as to open up
Open up range, the coverage area etc. of test.
As an implementation, because certain interfaces need to carry out initialization operation to database when test,
So first database is initialized, in order to the interface testing use-case to acquisition carry out it is perfect, so, obtain interface
After test case, also obtains database root and the interface testing use-case of acquisition is carried out according to the interface call request to be measured
Then the verification result returned after verification judges whether the interface testing use-case is perfect according to the verification result.
Specifically, the related data of interface to be measured is stored in the database, due in the interface testing use-case of acquisition
Including data be not very perfect, so database also needs to verify interface test case, for example, by interface testing use-case
In related data be compared with the interface data of storage, compare it is consistent when, back-checking by verification result, than
To it is inconsistent when, back-checking failure verification result, verification result be verification pass through when judge the interface testing use-case
To be perfect, judge that the interface testing use-case is not perfect when verification result is verification failure, then utilizes the flash back of database
The interface testing use-case is improved in operation.
Flash back operation refers to abundant data recovery solution with unique, can selectively cancel a mistake
Influence, restore from mistake.Before using Flashback Technology, damage database only needs several minutes, and to restore it then
A few hours are needed, there is Flashback Technology, correct the time that mistake only needs several minutes.Flashback Technology is supported so level is enterprising
Row restores, including row, affairs, table and entire database.
So by automatically obtaining interface testing use-case, automatic conversion interface testing use-case, automatic in the embodiment of the present invention
The technologies such as sort interface test case, fast automatic calibration database, interface back-checking and database flash back, improve
Efficiency, accuracy, the integrality of background test have adapted to growing background test demand, be greatly saved research and development when
Between cost.
Fig. 3 is please referred to, Fig. 3 is a kind of structure diagram of interface test device 200 provided in an embodiment of the present invention, the dress
Set including:
Data acquisition module 210, for when detecting that user initiates interface call request to be measured, obtaining interface to be measured
The request results that interface testing use-case and acquisition server are returned according to the interface call request to be measured.
Test module 220, for being tested the interface to be measured using the interface testing use-case, to obtain test
As a result.
As a result comparing module 230 obtain one and compare knot for the request results to be compared with the test result
Fruit.
Judgment module 240, for judging whether the interface to be measured is qualified according to the comparison result, wherein judging
As a result it is to show that the interface to be measured is qualification when being, when the judgment result is No, shows that the interface to be measured is unqualified.
Further, described device further includes:Use-case sort module is used for the type according to the interface to be measured to described
Interface testing use-case is classified, to be surveyed to the interface to be measured of corresponding same type according to of a sort interface testing use-case
The coverage rate of interface has been surveyed in examination to obtain.
Further, the data acquisition module 210, specifically for detecting user's initiation interface call request to be measured
When, obtain the data of the interface to be measured;The data of the interface to be measured are converted according to preset rules, to obtain interface
Test case.
Further, described device further includes:Check results acquisition module to be measured connects for obtaining database root according to described
The verification result that mouth call request returns after being verified to the interface testing use-case of acquisition;Judgment module 240 is improved, is used
In judging whether the interface testing use-case is perfect according to the verification result.
Further, described device further includes:Flash back operation module, for judging that the interface testing use-case is not perfect
When, improve the interface testing use-case using the flash back operation of the database.
It is apparent to those skilled in the art that for convenience and simplicity of description, the device of foregoing description
Specific work process, can refer to preceding method in corresponding process, no longer excessively repeat herein.
In conclusion an embodiment of the present invention provides a kind of interface test method and device, this method is detecting first
When user initiates interface call request to be measured, obtains the interface testing use-case of interface to be measured and obtain server and waited for according to
The request results that interface call request returns are surveyed, then the interface to be measured is tested using the interface testing use-case,
To obtain test result, the request results are compared with the test result, a comparison result are obtained, then according to institute
It states comparison result and judges whether the interface to be measured is qualified, wherein when the determination result is yes, show that the interface to be measured is to close
Lattice show that the interface to be measured is unqualified when the judgment result is No, in this method, are used by automatically obtaining interface testing
Example, automatic butt mouth carries out test and whether automatic decision interface is qualified, and then improves interface testing efficiency.
In several embodiments provided herein, it should be understood that disclosed device and method can also pass through
Other modes are realized.The apparatus embodiments described above are merely exemplary, for example, the flow chart in attached drawing and block diagram
Show the device of multiple embodiments according to the present invention, the architectural framework in the cards of method and computer program product,
Function and operation.In this regard, each box in flowchart or block diagram can represent the one of a module, section or code
Part, a part for the module, section or code, which includes that one or more is for implementing the specified logical function, to be held
Row instruction.It should also be noted that at some as in the realization method replaced, the function of being marked in box can also be to be different from
The sequence marked in attached drawing occurs.For example, two continuous boxes can essentially be basically executed in parallel, they are sometimes
It can execute in the opposite order, this is depended on the functions involved.It is also noted that every in block diagram and or flow chart
The combination of box in a box and block diagram and or flow chart can use function or the dedicated base of action as defined in executing
It realizes, or can be realized using a combination of dedicated hardware and computer instructions in the system of hardware.
In addition, each function module in each embodiment of the present invention can integrate to form an independent portion
Point, can also be modules individualism, can also two or more modules be integrated to form an independent part.
It, can be with if the function is realized and when sold or used as an independent product in the form of software function module
It is stored in a computer read/write memory medium.Based on this understanding, technical scheme of the present invention is substantially in other words
The part of the part that contributes to existing technology or the technical solution can be expressed in the form of software products, the meter
Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be
People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention.
And storage medium above-mentioned includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited
The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic disc or CD.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field
For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, any made by repair
Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.It should be noted that:Similar label and letter exist
Similar terms are indicated in following attached drawing, therefore, once being defined in a certain Xiang Yi attached drawing, are then not required in subsequent attached drawing
It is further defined and is explained.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain
Lid is within protection scope of the present invention.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
It should be noted that herein, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also include other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
Claims (10)
1. a kind of interface test method, which is characterized in that the method includes:
When detecting that user initiates interface call request to be measured, obtains the interface testing use-case of interface to be measured and obtain service
The request results that device is returned according to the interface call request to be measured;
The interface to be measured is tested using the interface testing use-case, to obtain test result;
The request results are compared with the test result, obtain a comparison result;
Judge whether the interface to be measured is qualified according to the comparison result, wherein when the determination result is yes, show described wait for
It is qualification to survey interface, when the judgment result is No, shows that the interface to be measured is unqualified.
2. according to the method described in claim 1, it is characterized in that, when user initiates interface call request to be measured, acquisition waits for
After surveying the interface testing use-case of interface and obtaining request results of the server according to the interface call request return to be measured,
The method further includes:
Classified to the interface testing use-case according to the type of the interface to be measured, to be used according to of a sort interface testing
Example to the interface to be measured of corresponding same type test obtaining the coverage rate for having surveyed interface.
3. according to the method described in claim 1, it is characterized in that, detect user initiate interface call request to be measured when,
The interface testing use-case of interface to be measured is obtained, including:
When detecting that user initiates interface call request to be measured, the data of the interface to be measured are obtained;
The data of the interface to be measured are converted according to preset rules, to obtain interface testing use-case.
4. according to the method described in claim 1, it is characterized in that, detect user initiate interface call request to be measured when,
It obtains the interface testing use-case of interface to be measured and obtains the request knot that server is returned according to the interface call request to be measured
After fruit, the method further includes:
It obtains after database root verifies the interface testing use-case of acquisition according to the interface call request to be measured and returns
Verification result;
Judge whether the interface testing use-case is perfect according to the verification result.
5. according to the method described in claim 4, it is characterized in that, judging the interface testing use-case according to the verification result
Whether after improving, the method further includes:
When judging that the interface testing use-case is not perfect, improves the interface testing using the flash back operation of the database and use
Example.
6. a kind of interface test device, which is characterized in that described device includes:
Data acquisition module, the interface for when detecting that user initiates interface call request to be measured, obtaining interface to be measured are surveyed
The request results that example on probation and acquisition server are returned according to the interface call request to be measured;
Test module, for being tested the interface to be measured using the interface testing use-case, to obtain test result;
As a result comparing module obtains a comparison result for the request results to be compared with the test result;
Judgment module, for according to the comparison result judging whether the interface to be measured is qualified, wherein in judging result be yes
When, show that the interface to be measured is qualification, when the judgment result is No, shows that the interface to be measured is unqualified.
7. device according to claim 6, which is characterized in that described device further includes:
Use-case sort module, for being classified to the interface testing use-case according to the type of the interface to be measured, with basis
Of a sort interface testing use-case to the interface to be measured of corresponding same type test obtaining the coverage rate for having surveyed interface.
8. device according to claim 6, which is characterized in that the data acquisition module, specifically for detecting use
When interface call request to be measured is initiated at family, the data of the interface to be measured are obtained;By the data of the interface to be measured according to default
Rule is converted, to obtain interface testing use-case.
9. device according to claim 6, which is characterized in that described device further includes:
Check results acquisition module surveys the interface of acquisition according to the interface call request to be measured for obtaining database root
The verification result that example on probation returns after being verified;
Judgment module is improved, for judging whether the interface testing use-case is perfect according to the verification result.
10. device according to claim 9, which is characterized in that described device further includes:
Flash back operation module, for when judging that the interface testing use-case is not perfect, being operated using the flash back of the database
Improve the interface testing use-case.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810340747.XA CN108549606A (en) | 2018-04-16 | 2018-04-16 | interface test method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810340747.XA CN108549606A (en) | 2018-04-16 | 2018-04-16 | interface test method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108549606A true CN108549606A (en) | 2018-09-18 |
Family
ID=63515203
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810340747.XA Pending CN108549606A (en) | 2018-04-16 | 2018-04-16 | interface test method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108549606A (en) |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109446068A (en) * | 2018-09-26 | 2019-03-08 | 平安健康保险股份有限公司 | Interface test method, device, computer equipment and storage medium |
CN109739700A (en) * | 2018-12-12 | 2019-05-10 | 中国联合网络通信集团有限公司 | A kind of interface test method and device |
CN110188036A (en) * | 2019-05-10 | 2019-08-30 | 深圳前海微众银行股份有限公司 | A kind of method for testing software and device |
CN110764998A (en) * | 2019-09-06 | 2020-02-07 | 平安健康保险股份有限公司 | Data comparison method, device and equipment based on Django framework and storage medium |
CN111090575A (en) * | 2018-10-23 | 2020-05-01 | 亿度慧达教育科技(北京)有限公司 | Test method |
CN111198810A (en) * | 2018-11-16 | 2020-05-26 | 鸿合科技股份有限公司 | Software testing method and device and electronic equipment |
CN111209189A (en) * | 2019-12-26 | 2020-05-29 | 航天科工防御技术研究试验中心 | HIL automatic diagnosis test method, device, equipment and storage medium |
CN111240981A (en) * | 2020-01-14 | 2020-06-05 | 成都库珀区块链科技有限公司 | Interface testing method, system and platform |
CN111274153A (en) * | 2020-02-14 | 2020-06-12 | 香港乐蜜有限公司 | Automatic testing method and device and electronic equipment |
CN111694734A (en) * | 2020-05-26 | 2020-09-22 | 五八有限公司 | Software interface checking method and device and computer equipment |
CN111884882A (en) * | 2020-07-29 | 2020-11-03 | 北京千丁互联科技有限公司 | Monitoring coverage rate detection method and device |
CN113535559A (en) * | 2021-07-14 | 2021-10-22 | 杭州默安科技有限公司 | Application interface coverage rate statistical method and system |
WO2022134915A1 (en) * | 2020-12-25 | 2022-06-30 | 中兴通讯股份有限公司 | Interface testing method, and computer device and computer-readable storage medium |
-
2018
- 2018-04-16 CN CN201810340747.XA patent/CN108549606A/en active Pending
Cited By (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109446068A (en) * | 2018-09-26 | 2019-03-08 | 平安健康保险股份有限公司 | Interface test method, device, computer equipment and storage medium |
CN109446068B (en) * | 2018-09-26 | 2024-04-05 | 平安健康保险股份有限公司 | Interface test method, device, computer equipment and storage medium |
CN111090575A (en) * | 2018-10-23 | 2020-05-01 | 亿度慧达教育科技(北京)有限公司 | Test method |
CN111090575B (en) * | 2018-10-23 | 2021-07-30 | 亿度慧达教育科技(北京)有限公司 | Test method |
CN111198810A (en) * | 2018-11-16 | 2020-05-26 | 鸿合科技股份有限公司 | Software testing method and device and electronic equipment |
CN109739700B (en) * | 2018-12-12 | 2023-03-28 | 中国联合网络通信集团有限公司 | Interface testing method and device |
CN109739700A (en) * | 2018-12-12 | 2019-05-10 | 中国联合网络通信集团有限公司 | A kind of interface test method and device |
CN110188036A (en) * | 2019-05-10 | 2019-08-30 | 深圳前海微众银行股份有限公司 | A kind of method for testing software and device |
CN110764998A (en) * | 2019-09-06 | 2020-02-07 | 平安健康保险股份有限公司 | Data comparison method, device and equipment based on Django framework and storage medium |
CN110764998B (en) * | 2019-09-06 | 2024-04-02 | 平安健康保险股份有限公司 | Data comparison method, device, equipment and storage medium based on Django framework |
CN111209189A (en) * | 2019-12-26 | 2020-05-29 | 航天科工防御技术研究试验中心 | HIL automatic diagnosis test method, device, equipment and storage medium |
CN111240981A (en) * | 2020-01-14 | 2020-06-05 | 成都库珀区块链科技有限公司 | Interface testing method, system and platform |
CN111274153A (en) * | 2020-02-14 | 2020-06-12 | 香港乐蜜有限公司 | Automatic testing method and device and electronic equipment |
CN111694734A (en) * | 2020-05-26 | 2020-09-22 | 五八有限公司 | Software interface checking method and device and computer equipment |
CN111884882A (en) * | 2020-07-29 | 2020-11-03 | 北京千丁互联科技有限公司 | Monitoring coverage rate detection method and device |
WO2022134915A1 (en) * | 2020-12-25 | 2022-06-30 | 中兴通讯股份有限公司 | Interface testing method, and computer device and computer-readable storage medium |
CN113535559A (en) * | 2021-07-14 | 2021-10-22 | 杭州默安科技有限公司 | Application interface coverage rate statistical method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108549606A (en) | interface test method and device | |
CN109302522B (en) | Test method, test device, computer system, and computer medium | |
CN110413506A (en) | Test case recommended method, device, equipment and storage medium | |
US7522884B2 (en) | Apparatus and method for analyzing drive test data for communications system | |
TWI533123B (en) | Method and system for automated test and result comparison | |
US20050204241A1 (en) | Method and device for analyzing software error | |
TW201732789A (en) | Disk failure prediction method and apparatus | |
CN109062809A (en) | Method for generating test case, device and electronic equipment on a kind of line | |
US7293204B2 (en) | Computer peripheral connecting interface system configuration debugging method and system | |
CN107797919A (en) | The method and computing device of a kind of automatic test | |
CN107705819A (en) | A kind of storage chip sorting technique, sorter and categorizing system | |
CN109726830A (en) | Equipment routing inspection method, apparatus, electronic equipment and storage medium | |
CN110688063A (en) | Method, device, equipment and medium for screening Raid slow disc | |
US20070299717A1 (en) | Test man-hour estimating apparatus and recording medium recording computer-readable program | |
CN113448834A (en) | Buried point testing method and device, electronic equipment and storage medium | |
CN105159826B (en) | A kind of method and apparatus of wrong sentence in positioning target program | |
CN109558315A (en) | The determination method, device and equipment of test scope | |
CN110888809B (en) | Risk prediction method and device for test task | |
CN111124894B (en) | Code coverage rate processing method and device and computer equipment | |
CN105843716A (en) | IO function test method based on MLTT | |
CN107229567A (en) | A kind of IPMI firmwares automatization test system | |
CN111382051A (en) | API automatic test method and test device | |
CN115684882A (en) | Test method, system, medium and computing device for system-on-chip | |
CN114064510A (en) | Function testing method and device, electronic equipment and storage medium | |
CN111078549B (en) | Code coverage rate processing method and device and computer equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180918 |