CN109189668A - Interface test method, device, computer equipment and storage medium - Google Patents

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

Info

Publication number
CN109189668A
CN109189668A CN201810876414.9A CN201810876414A CN109189668A CN 109189668 A CN109189668 A CN 109189668A CN 201810876414 A CN201810876414 A CN 201810876414A CN 109189668 A CN109189668 A CN 109189668A
Authority
CN
China
Prior art keywords
interface
measured
test case
document
test
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.)
Withdrawn
Application number
CN201810876414.9A
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.)
Shenzhen Dingfeng Cattle Technology Co Ltd
Original Assignee
Shenzhen Dingfeng Cattle Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Dingfeng Cattle Technology Co Ltd filed Critical Shenzhen Dingfeng Cattle Technology Co Ltd
Priority to CN201810876414.9A priority Critical patent/CN109189668A/en
Publication of CN109189668A publication Critical patent/CN109189668A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test 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

The embodiment of the invention discloses a kind of interface test method, device, computer equipment and storage mediums.The described method includes: whether judging in interface document if receiving interface document comprising interface to be measured, wherein interface to be measured is not belonging to survey set of interfaces, and having surveyed set of interfaces includes the interface that test is completed;If it includes interface to be measured in interface document that judging result, which is, the test case of corresponding interface to be measured is obtained;And interface to be measured is tested according to test case, to realize the unified management to interface document, the retest to interface is avoided, the efficiency of interface testing is improved, more times is used in by tester, interface is carried out in service logic test and exploratory testing.

Description

Interface test method, device, 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, device, computer equipment and storages Medium.
Background technique
With the development of technology, the rise of micro services, the complexity of system become higher and higher.With the interaction of system Scene becomes increasingly complex, and the interface of system background service is more and more.In order to ensure system can normally be run, need to being The interface of system background service is tested.
In the prior art, when there is new interface to test, developer provides interface document, tester to tester Member carries out manual interface test according to interface document using testing tool.Also, in different interface documents, interface, which exists, to be repeated The case where, it is difficult to find by manual operation, so that waste of time is caused the case where interface a certain there are retest, The efficiency of test is reduced, so that more times can not be used in by tester carries out service logic test and exploration to interface Property test in.
Summary of the invention
The embodiment of the invention provides a kind of interface test method, device, computer equipment and storage mediums, it is intended to solve In the prior art to the inefficiency of interface testing the problem of.
In a first aspect, the embodiment of the invention provides a kind of interface test method, the interface test method includes:
If receiving interface document, whether judge in the interface document comprising interface to be measured, wherein the interface to be measured It is not belonging to survey set of interfaces, the set of interfaces of having surveyed includes the interface that test is completed;
If it includes interface to be measured in the interface document that judging result, which is, the test for obtaining the corresponding interface to be measured is used Example;And
The interface to be measured is tested according to the test case.
Its further technical solution is to carry out testing it to the interface to be measured according to the test case described Afterwards, the interface test method further include:
Described surveyed in set of interfaces is added in the interface to be measured.
Whether its further technical solution is, described to judge in the interface document comprising interface to be measured, comprising:
Parsing obtains the interface that the interface document includes;
Judge in interface that the interface document includes with the presence or absence of being not belonging to the interface for having surveyed set of interfaces;
It is not belonging to the interface for having surveyed set of interfaces if existing in the interface that judging result includes for the interface document, Then determine in the interface document comprising interface to be measured, and will be not belonging to described survey connecing for set of interfaces in the interface document Mouth is used as the interface to be measured;
If having surveyed connecing for set of interfaces described in being not belonging in the interface that judging result includes for the interface document Mouthful, then determine not including interface to be measured in the interface document.
Its further technical solution is the test case for obtaining the corresponding interface to be measured, comprising:
Judge in preset test case data library whether to include the test case for corresponding to the interface to be measured;
If judging result is the test case comprising the corresponding interface to be measured in preset test case data library, from The test case of the interface to be measured is obtained in the test case data library;
If judging result is not include the test case of the corresponding interface to be measured in preset test case data library, Prompting message is issued to provide the test case of the interface to be measured by user.
Its further technical solution is, in the sending prompting message to provide the test of the interface to be measured by user After use-case, the interface test method further include:
The test case of the customer-furnished interface to be measured is stored in the test case data library.
Second aspect, the embodiment of the invention also provides a kind of interface test device, the interface test device includes:
First judging unit, if judging in the interface document whether to include interface to be measured for receiving interface document, Wherein, the interface to be measured is not belonging to survey set of interfaces, and the set of interfaces of having surveyed includes the interface that test is completed;
First acquisition unit obtains described in corresponding to if being for judging result includes interface to be measured in the interface document The test case of interface to be measured;And
Test cell, for being tested according to the test case the interface to be measured.
Its further technical solution is the interface test device further include:
Adding unit, for described surveyed in set of interfaces to be added in the interface to be measured.
Its further technical solution is that first judging unit includes:
Resolution unit, for parsing the interface for obtaining the interface document and including;
Second judgment unit connects in interface that the interface document includes with the presence or absence of being not belonging to described surveyed for judging The interface of mouth set;
First judging unit, if for judging result be exist in interface that the interface document includes be not belonging to it is described The interface for surveying set of interfaces then determines comprising interface to be measured in the interface document, and will be not belonging to institute in the interface document The interface for having surveyed set of interfaces is stated as the interface to be measured;
Second judging unit, if being not belonging in the interface for including for the interface document for judging result described The interface of set of interfaces has been surveyed, then has determined not including interface to be measured in the interface document.
Its further technical solution is that the first acquisition unit includes:
Third judging unit, for whether judging in preset test case data library comprising the corresponding interface to be measured Test case;
Second acquisition unit, if being described to be measured to be connect in preset test case data library comprising corresponding for judging result The test case of mouth, then obtain the test case of the interface to be measured from the test case data library;
Prompt unit, if being not include the corresponding interface to be measured in preset test case data library for judging result Test case, then issue prompting message to provide the test case of the interface to be measured by user.
Its further technical solution is the interface test device further include:
Storage unit, for the test case of the customer-furnished interface to be measured to be stored in the test case data In library.
The third aspect, the embodiment of the invention also provides a kind of computer equipments comprising memory and processor, it is described Computer program is stored on memory, the processor realizes the above method when executing the computer program.
Fourth aspect, the embodiment of the invention also provides a kind of computer readable storage medium, the storage medium storage There is computer program, the computer program can realize the above method when being executed by a processor.
By the technical solution of the application embodiment of the present invention, when receiving interface document, judge in interface document whether Include interface to be measured;When including interface to be measured in interface document, the test case of corresponding interface to be measured is obtained;And according to the survey Example on probation tests interface to be measured, to realize the unified management to interface document, avoids the repetition to interface and surveys Examination, improves the efficiency of interface testing, and more times are used in by tester and carry out service logic survey to interface In examination and exploratory testing.
Detailed description of the invention
Technical solution in order to illustrate the embodiments of the present invention more clearly, below will be to needed in embodiment description Attached drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the invention, general for this field For logical technical staff, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of flow diagram of interface test method provided in an embodiment of the present invention;
Fig. 2 is a kind of sub-process schematic diagram of interface test method provided in an embodiment of the present invention;
Fig. 3 is a kind of sub-process schematic diagram of interface test method provided in an embodiment of the present invention;
Fig. 4 be another embodiment of the present invention provides interface test method flow diagram;
Fig. 5 is a kind of schematic block diagram of interface test device provided in an embodiment of the present invention;
Fig. 6 is a kind of schematic block diagram of first judging unit of interface test device provided in an embodiment of the present invention;
Fig. 7 is a kind of schematic block diagram of the first acquisition unit of interface test device provided in an embodiment of the present invention;
Fig. 8 be another embodiment of the present invention provides a kind of interface test device schematic block diagram;And
Fig. 9 is the schematic block diagram of computer equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
It should be appreciated that ought use in this specification and in the appended claims, term " includes " and "comprising" instruction Described feature, entirety, step, operation, the presence of element and/or component, but one or more of the other feature, whole is not precluded Body, step, operation, the presence or addition of element, component and/or its set.
It is also understood that mesh of the term used in this description of the invention merely for the sake of description specific embodiment And be not intended to limit the present invention.As description of the invention and it is used in the attached claims, unless on Other situations are hereafter clearly indicated, otherwise " one " of singular, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in description of the invention and the appended claims is Refer to any combination and all possible combinations of one or more of associated item listed, and including these combinations.
As used in this specification and in the appended claims, term " if " can be according to context quilt Be construed to " when ... " or " once " or " in response to determination " or " in response to detecting ".Similarly, phrase " if it is determined that " or " if detecting [described condition or event] " can be interpreted to mean according to context " once it is determined that " or " in response to true It is fixed " or " once detecting [described condition or event] " or " in response to detecting [described condition or event] ".
Fig. 1 is the flow diagram of interface testing provided in an embodiment of the present invention.As shown, this method includes following step Rapid S1-S3.
Whether S1 judges in interface document if receiving interface document comprising interface to be measured.
Wherein, interface to be measured is not belonging to survey set of interfaces, and having surveyed set of interfaces includes the interface that test is completed.
Interface document refers in project development (web project or APP exploitation), before the record write by project engineer The document of back end interface.Interface document records the information of interface involved in project development process.Since project is by multistage Duan Jinhang exploitation, therefore can all there be interface document in each stage.The interface being related in interface document is tested.
In the embodiment of the present invention, interface document is managed collectively, after the completion of to interface testing in interface document, The interface crossed after tested is added to and has been surveyed in set of interfaces.Having surveyed set of interfaces includes all interfaces that test is completed.
In specific implementation, when receiving interface document, whether judge in the interface document comprising interface to be measured, wherein Interface to be measured refers to the interface for being not belonging to survey set of interfaces, i.e., also without the interface of test.
In one embodiment, as shown in Fig. 2, the step S1 may include step S11-S14.
S11, parsing obtain the interface that interface document includes.
In specific implementation, parsing obtains the interface for including in interface document first.For example, in one embodiment, existing in advance Identifier is added before the interface of interface document, then can find the interface in interface document by searching for position identifiers.
S12 judges in interface that interface document includes with the presence or absence of being not belonging to survey the interface of set of interfaces.
In specific implementation, after the total interface for including in obtaining interface document, the interface that interface document includes is judged In with the presence or absence of the interface for being not belonging to have surveyed set of interfaces.
S13 sentences if there is the interface for being not belonging to survey set of interfaces in the interface that judging result includes for interface document Include interface to be measured in stationary interface document, and will be not belonging to survey the interface of set of interfaces in interface document as interface to be measured.
In specific implementation, it is not belonging to survey set of interfaces if it is judged that existing in the interface for including for interface document Interface then includes interface to be measured in determining interface document, and will be not belonging to have surveyed in interface document the interface of set of interfaces as Interface to be measured.Later, interface to be measured is tested.
S14, if being not belonging to survey the interface of set of interfaces in the interface that judging result includes for interface document, Interface to be measured is not included in determining interface document.
In specific implementation, if it is judged that being not belonging to survey set of interfaces in the interface for including for interface document Interface, then in determining interface document do not include interface to be measured.
S2 obtains the test case of corresponding interface to be measured if it includes interface to be measured in interface document that judging result, which is,.
In specific implementation, if it is judged that include interface to be measured in interface document, it can be according to interface to be measured preparatory The test case data of storage searches the test case of corresponding interface to be measured.Alternatively, prompt information is issued the user with, it is defeated by user Enter the test case of interface to be measured.
If it is judged that not handled then not include interface to be measured in interface document.
In one embodiment, as shown in figure 3, the step S2 may include step S21-S23.
Whether S21 judges in preset test case data library to include the test case for corresponding to interface to be measured.
In specific implementation, judge whether the test comprising corresponding interface to be measured is used in preset test case data library Example.Test case data library is used for the test case of memory interface.
S22, if judging result is the test case comprising corresponding interface to be measured in preset test case data library, from The test case of interface to be measured is obtained in test case data library.
In specific implementation, if it is judged that for the test comprising corresponding interface to be measured in preset test case data library Use-case then directly obtains the test case of interface to be measured from test case data library.
S23, if judging result is not include the test case of corresponding interface to be measured in preset test case data library, Prompting message is issued to provide the test case of interface to be measured by user.
In specific implementation, if it is judged that not include the survey of corresponding interface to be measured in preset test case data library Example on probation, then issue prompting message to provide the test case of interface to be measured by user.
It should be noted that also user is provided after getting the test case of interface to be measured of user's offer In the test case deposit test case data library of interface to be measured.It needs next time to test identical interface to be measured as a result, When, can test case directly be called from test case data library.
S3 tests interface to be measured according to test case.
In specific implementation, after the test case for getting interface to be measured, directly according to the test case to interface to be measured It is tested.
It should be noted that ripe for those skilled in the art according to the method that test case tests interface to be measured Know, this embodiment of the present invention is not especially limited.
By the technical solution of the application embodiment of the present invention, when receiving interface document, judge in interface document whether Include interface to be measured;When including interface to be measured in interface document, the test case of corresponding interface to be measured is obtained;And according to the survey Example on probation tests interface to be measured, to realize the unified management to interface document, avoids the repetition to interface and surveys Examination, improves the efficiency of interface testing, and more times are used in by tester and carry out service logic survey to interface In examination and exploratory testing.
Fig. 4 be another embodiment of the present invention provides a kind of interface test method flow diagram.As shown in figure 4, this The interface test method of embodiment includes step S210-S240.
Whether S210 judges in interface document if receiving interface document comprising interface to be measured.
Wherein, interface to be measured is not belonging to survey set of interfaces, and having surveyed set of interfaces includes the interface that test is completed.
Interface document refers in project development (web project or APP exploitation), before the record write by project engineer The document of back end interface.Interface document records the information of interface involved in project development process.Since project is by more What the stage was developed, therefore each stage all can be by interface document.The interface being related in interface document is tested.
In the embodiment of the present invention, interface document is managed collectively, after the completion of to interface testing in interface document, The interface crossed after tested is added to and has been surveyed in set of interfaces.Having surveyed set of interfaces includes all interfaces that test is completed.
In specific implementation, when receiving interface document, whether judge in the interface document comprising interface to be measured, wherein Interface to be measured refers to the interface for being not belonging to survey set of interfaces, i.e., also without the interface of test.
S220 obtains the test case of corresponding interface to be measured if it includes interface to be measured in interface document that judging result, which is,.
In specific implementation, if it is judged that include interface to be measured in interface document, it can be according to interface to be measured preparatory The test case data of storage searches the test case of corresponding interface to be measured.Alternatively, prompt information is issued the user with, it is defeated by user Enter the test case of interface to be measured.
If it is judged that not handled then not include interface to be measured in interface document.
S230 tests interface to be measured according to test case.
In specific implementation, after the test case for getting interface to be measured, directly according to the test case to interface to be measured It is tested.
It should be noted that ripe for those skilled in the art according to the method that test case tests interface to be measured Know, this embodiment of the present invention is not specifically limited.
S240 has surveyed interface to be measured addition in set of interfaces.
In specific implementation, after completing to the test of interface to be measured, interface to be measured addition is surveyed in set of interfaces, to keep away Exempt to repeat to test interface to be measured.
Fig. 5 is a kind of schematic block diagram of interface test device 50 provided in an embodiment of the present invention.As shown in figure 5, corresponding In the above interface test method, the present invention also provides a kind of interface test devices 50.The interface test device 50 includes for holding The unit of the above-mentioned interface test method of row, the device can be configured in desktop computer, tablet computer, laptop computer, etc. terminals In.The device can also be configured in server.Specifically, referring to Fig. 5, the interface test device 50 includes the first judgement Unit 51, first acquisition unit 52 and test cell 53.
First judging unit 51, if judging whether connect comprising to be measured in the interface document for receiving interface document Mouthful, wherein the interface to be measured is not belonging to survey set of interfaces, and the set of interfaces of having surveyed includes the interface that test is completed;
First acquisition unit 52, if the judging result for the first judging unit 51 is in the interface document comprising to be measured Interface obtains the test case of the corresponding interface to be measured;And
Test cell 53, for being tested according to the test case the interface to be measured.
In one embodiment, as shown in fig. 6, first judging unit 51 includes resolution unit 511, second judgment unit 512, the first judging unit 513 and the second judging unit 514.
Resolution unit 511, for parsing the interface for obtaining the interface document and including;
Second judgment unit 512, for judge in interface that the interface document includes with the presence or absence of be not belonging to it is described Survey the interface of set of interfaces;
First judging unit 513, if the judging result for second judgment unit 512 connects for what the interface document included Exist in mouthful and be not belonging to the interface for having surveyed set of interfaces, then determine comprising interface to be measured in the interface document, and by institute It states and has surveyed the interface of set of interfaces as the interface to be measured described in being not belonging in interface document;
Second judging unit 514, if the judging result for second judgment unit 512 connects for what the interface document included It is not belonging to the interface for having surveyed set of interfaces in mouthful, then determines not including interface to be measured in the interface document.
In one embodiment, as shown in fig. 7, the first acquisition unit 52 is obtained including third judging unit 521, second Unit 522 and prompt unit 523.
Third judging unit 521, for judging in preset test case data library whether described to be measured to connect comprising corresponding The test case of mouth;
Second acquisition unit 522, if the judging result for third judging unit 521 is preset test case data library In the test case comprising the corresponding interface to be measured, then the survey of the interface to be measured is obtained from the test case data library Example on probation;
Prompt unit 523, if for third judging unit 521 judging result be preset test case data library in not Test case comprising the correspondence interface to be measured issues prompting message then to provide the test of the interface to be measured use by user Example.
Fig. 8 be another embodiment of the present invention provides a kind of interface test device 50 schematic block diagram.As shown in fig. 7, The interface test device 50 of the present embodiment is to increase adding unit 54 and storage unit 55 on the basis of above-described embodiment.
Adding unit 54, for described surveyed in set of interfaces to be added in the interface to be measured.
Storage unit 55, for the test case of the customer-furnished interface to be measured to be stored in the test case number According in library.
It should be noted that it is apparent to those skilled in the art that, above-mentioned 50 He of interface test device The specific implementation process of each unit can refer to the corresponding description in preceding method embodiment, for convenience of description and succinctly, Details are not described herein.
Above-mentioned interface test device can be implemented as a kind of form of computer program, which can such as scheme It is run in computer equipment shown in 8.
Referring to Fig. 9, Fig. 9 is a kind of schematic block diagram of computer equipment provided by the embodiments of the present application.The computer Equipment 500 can be terminal, be also possible to server, wherein terminal can be smart phone, tablet computer, laptop, Desktop computer, personal digital assistant and wearable device etc. have the electronic equipment of communication function.Server can be independent Server is also possible to the server cluster of multiple server compositions.
Refering to Fig. 9, which includes processor 502, memory and the net connected by system bus 501 Network interface 505, wherein memory may include non-volatile memory medium 503 and built-in storage 504.
The non-volatile memory medium 503 can storage program area 5031 and computer program 5032.The computer program 5032 are performed, and processor 502 may make to execute a kind of interface test method.
The processor 502 is for providing calculating and control ability, to support the operation of entire computer equipment 500.
The built-in storage 504 provides environment for the operation of the computer program 5032 in non-volatile memory medium 503, should When computer program 5032 is executed by processor 502, processor 502 may make to execute a kind of interface test method.
The network interface 505 is used to carry out network communication with other equipment.It will be understood by those skilled in the art that in Fig. 9 The structure shown, only the block diagram of part-structure relevant to application scheme, does not constitute and is applied to application scheme The restriction of computer equipment 500 thereon, specific computer equipment 500 may include more more or fewer than as shown in the figure Component perhaps combines certain components or with different component layouts.
Wherein, the processor 502 is for running computer program 5032 stored in memory, to realize following step It is rapid:
If receiving interface document, whether judge in the interface document comprising interface to be measured, wherein the interface to be measured It is not belonging to survey set of interfaces, the set of interfaces of having surveyed includes the interface that test is completed;
If it includes interface to be measured in the interface document that judging result, which is, the test for obtaining the corresponding interface to be measured is used Example;And
The interface to be measured is tested according to the test case.
In one embodiment, processor 502 described is surveyed the interface to be measured according to the test case realizing After try is rapid, following steps are also realized:
Described surveyed in set of interfaces is added in the interface to be measured.
In one embodiment, whether processor 502 described judge in the interface document comprising interface to be measured step realizing When rapid, it is implemented as follows step:
Parsing obtains the interface that the interface document includes;
Judge in interface that the interface document includes with the presence or absence of being not belonging to the interface for having surveyed set of interfaces;
It is not belonging to the interface for having surveyed set of interfaces if existing in the interface that judging result includes for the interface document, Then determine in the interface document comprising interface to be measured, and will be not belonging to described survey connecing for set of interfaces in the interface document Mouth is used as the interface to be measured;
If having surveyed connecing for set of interfaces described in being not belonging in the interface that judging result includes for the interface document Mouthful, then determine not including interface to be measured in the interface document.
In one embodiment, whether processor 502 described judge in the interface document comprising interface to be measured step realizing When rapid, it is implemented as follows step:
Judge in preset test case data library whether to include the test case for corresponding to the interface to be measured;
If judging result is the test case comprising the corresponding interface to be measured in preset test case data library, from The test case of the interface to be measured is obtained in the test case data library;
If judging result is not include the test case of the corresponding interface to be measured in preset test case data library, Prompting message is issued to provide the test case of the interface to be measured by user.
In one embodiment, processor 502 is realizing the sending prompting message to provide the interface to be measured by user Test case after after step, also realization following steps:
The test case of the customer-furnished interface to be measured is stored in the test case data library.
It should be appreciated that in the embodiment of the present application, processor 502 can be central processing unit (Central Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic Device, discrete gate or transistor logic, discrete hardware components etc..Wherein, general processor can be microprocessor or Person's processor is also possible to any conventional processor etc..
Those of ordinary skill in the art will appreciate that be realize above-described embodiment method in all or part of the process, It is that relevant hardware can be instructed to complete by computer program.The computer program can be stored in a storage medium, The storage medium is computer readable storage medium.The computer program is held by least one processor in the computer system Row, to realize the process step of the embodiment of the above method.
Therefore, the present invention also provides a kind of storage mediums.The storage medium can be computer readable storage medium.This is deposited Storage media is stored with computer program.The computer program makes processor execute following steps when being executed by processor:
If receiving interface document, whether judge in the interface document comprising interface to be measured, wherein the interface to be measured It is not belonging to survey set of interfaces, the set of interfaces of having surveyed includes the interface that test is completed;
If it includes interface to be measured in the interface document that judging result, which is, the test for obtaining the corresponding interface to be measured is used Example;And
The interface to be measured is tested according to the test case.
In one embodiment, the processor is realized described according to the test case in the execution computer program After carrying out testing procedure to the interface to be measured, following steps are also realized:
Described surveyed in set of interfaces is added in the interface to be measured.
In one embodiment, the processor realizes the judgement interface document executing the computer program In whether include interface step to be measured when, be implemented as follows step:
Parsing obtains the interface that the interface document includes;
Judge in interface that the interface document includes with the presence or absence of being not belonging to the interface for having surveyed set of interfaces;
It is not belonging to the interface for having surveyed set of interfaces if existing in the interface that judging result includes for the interface document, Then determine in the interface document comprising interface to be measured, and will be not belonging to described survey connecing for set of interfaces in the interface document Mouth is used as the interface to be measured;
If having surveyed connecing for set of interfaces described in being not belonging in the interface that judging result includes for the interface document Mouthful, then determine not including interface to be measured in the interface document.
In one embodiment, the processor realizes the judgement interface document executing the computer program In whether include interface step to be measured when, be implemented as follows step:
Judge in preset test case data library whether to include the test case for corresponding to the interface to be measured;
If judging result is the test case comprising the corresponding interface to be measured in preset test case data library, from The test case of the interface to be measured is obtained in the test case data library;
If judging result is not include the test case of the corresponding interface to be measured in preset test case data library, Prompting message is issued to provide the test case of the interface to be measured by user.
In one embodiment, the processor execute the computer program and realize the sending prompting message with by User is provided after the test case of the interface to be measured after step, also realization following steps:
The test case of the customer-furnished interface to be measured is stored in the test case data library.
The storage medium can be USB flash disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), magnetic disk Or the various computer readable storage mediums that can store program code such as CD.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware With the interchangeability of software, each exemplary composition and step are generally described according to function in the above description.This A little functions are implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Specially Industry technical staff can use different methods to achieve the described function each specific application, but this realization is not It is considered as beyond the scope of this invention.
In several embodiments provided by the present invention, it should be understood that disclosed device and method can pass through it Its mode is realized.For example, the apparatus embodiments described above are merely exemplary.For example, the division of each unit, only Only a kind of logical function partition, there may be another division manner in actual implementation.Such as multiple units or components can be tied Another system is closed or is desirably integrated into, or some features can be ignored or not executed.
The steps in the embodiment of the present invention can be sequentially adjusted, merged and deleted according to actual needs.This hair Unit in bright embodiment device can be combined, divided and deleted according to actual needs.In addition, in each implementation of the present invention Each functional unit in example can integrate in one processing unit, is also possible to each unit and physically exists alone, can also be with It is that two or more units are integrated in one unit.
If the integrated unit is realized in the form of SFU software functional unit and when sold or used as an independent product, It can store in one storage medium.Based on this understanding, technical solution of the present invention is substantially in other words to existing skill The all or part of part or the technical solution that art contributes can be embodied 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 a People's computer, terminal or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in some embodiment Part, reference can be made to the related descriptions of other embodiments.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art Mind and range.In this way, the even these modifications and changes of the present invention range that belongs to the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.
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 readily occur in various equivalent modifications or replace It changes, these modifications or substitutions should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with right It is required that protection scope subject to.

Claims (10)

1. a kind of interface test method characterized by comprising
If receiving interface document, whether judge in the interface document comprising interface to be measured, wherein the interface to be measured does not belong to In having surveyed set of interfaces, the set of interfaces of having surveyed includes the interface that test is completed;
If it includes interface to be measured in the interface document that judging result, which is, the test case of the corresponding interface to be measured is obtained;With And
The interface to be measured is tested according to the test case.
2. interface test method according to claim 1, which is characterized in that it is described according to the test case to described After interface to be measured is tested, the interface test method further include:
Described surveyed in set of interfaces is added in the interface to be measured.
3. interface test method according to claim 1, which is characterized in that described to judge whether wrap in the interface document Containing interface to be measured, comprising:
Parsing obtains the interface that the interface document includes;
Judge in interface that the interface document includes with the presence or absence of being not belonging to the interface for having surveyed set of interfaces;
It is not belonging to the interface for having surveyed set of interfaces if existing in the interface that judging result includes for the interface document, is sentenced Include interface to be measured in the fixed interface document, and the interface for having surveyed set of interfaces will be not belonging in the interface document and made For the interface to be measured;
If being not belonging to the interface for having surveyed set of interfaces in the interface that judging result includes for the interface document, Determine not including interface to be measured in the interface document.
4. interface test method according to claim 1, which is characterized in that the survey for obtaining the corresponding interface to be measured Example on probation, comprising:
Judge in preset test case data library whether to include the test case for corresponding to the interface to be measured;
If judging result is the test case comprising the corresponding interface to be measured in preset test case data library, from described The test case of the interface to be measured is obtained in test case data library;
If judging result is not include the test case of the corresponding interface to be measured in preset test case data library, issue Prompting message is to provide the test case of the interface to be measured by user.
5. interface test method according to claim 4, which is characterized in that in the sending prompting message to be mentioned by user After the test case of the interface to be measured, the interface test method further include:
The test case of the customer-furnished interface to be measured is stored in the test case data library.
6. a kind of interface test device characterized by comprising
First judging unit, if judging in the interface document whether to include interface to be measured for receiving interface document, In, the interface to be measured is not belonging to survey set of interfaces, and the set of interfaces of having surveyed includes the interface that test is completed;
It is described to be measured to obtain correspondence if being for judging result includes interface to be measured in the interface document for first acquisition unit The test case of interface;And
Test cell, for being tested according to the test case the interface to be measured.
7. interface test device according to claim 6, which is characterized in that first judging unit includes:
Resolution unit, for parsing the interface for obtaining the interface document and including;
Second judgment unit, for judging in interface that the interface document includes with the presence or absence of being not belonging to described survey sets of interfaces The interface of conjunction;
First judging unit connects if existing in the interface for including for the interface document for judging result and being not belonging to described surveyed The interface of mouthful set, then determine in the interface document comprising interface to be measured, and will be not belonging in the interface document it is described The interface of set of interfaces is surveyed as the interface to be measured;
Second judging unit, if being not belonging to described surveyed in the interface for including for the interface document for judging result The interface of set of interfaces then determines not including interface to be measured in the interface document.
8. interface test device according to claim 6, which is characterized in that the first acquisition unit includes:
Third judging unit, for judging in preset test case data library whether to include the test for corresponding to the interface to be measured Use-case;
Second acquisition unit, if being in preset test case data library comprising the corresponding interface to be measured for judging result Test case then obtains the test case of the interface to be measured from the test case data library;
Prompt unit, if being not include the survey of the corresponding interface to be measured in preset test case data library for judging result Example on probation, then issue prompting message to provide the test case of the interface to be measured by user.
9. a kind of computer equipment, which is characterized in that the computer equipment includes memory and processor, on the memory It is stored with computer program, the processor is realized as described in any one of claim 1-5 when executing the computer program Method.
10. a kind of storage medium, which is characterized in that the storage medium is stored with computer program, and the computer program is worked as Method according to any one of claims 1 to 5 can be realized when being executed by processor.
CN201810876414.9A 2018-08-03 2018-08-03 Interface test method, device, computer equipment and storage medium Withdrawn CN109189668A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810876414.9A CN109189668A (en) 2018-08-03 2018-08-03 Interface test method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810876414.9A CN109189668A (en) 2018-08-03 2018-08-03 Interface test method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN109189668A true CN109189668A (en) 2019-01-11

Family

ID=64920027

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810876414.9A Withdrawn CN109189668A (en) 2018-08-03 2018-08-03 Interface test method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109189668A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109919753A (en) * 2019-01-16 2019-06-21 平安普惠企业管理有限公司 Agent bank's changed test method, apparatus, computer equipment and storage medium
CN110162467A (en) * 2019-04-23 2019-08-23 平安科技(深圳)有限公司 Method for testing software, device, computer equipment and readable storage medium storing program for executing
CN110609781A (en) * 2019-08-29 2019-12-24 凡普数字技术有限公司 Interface test method, device and storage medium
CN110716864A (en) * 2019-09-05 2020-01-21 恩亿科(北京)数据科技有限公司 Management method for page test and computer storage medium
CN113157595A (en) * 2021-05-25 2021-07-23 中国平安人寿保险股份有限公司 Interface test management method, device, equipment and storage medium based on microservice

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109919753A (en) * 2019-01-16 2019-06-21 平安普惠企业管理有限公司 Agent bank's changed test method, apparatus, computer equipment and storage medium
CN110162467A (en) * 2019-04-23 2019-08-23 平安科技(深圳)有限公司 Method for testing software, device, computer equipment and readable storage medium storing program for executing
CN110162467B (en) * 2019-04-23 2023-12-19 平安科技(深圳)有限公司 Software testing method, device, computer equipment and readable storage medium
CN110609781A (en) * 2019-08-29 2019-12-24 凡普数字技术有限公司 Interface test method, device and storage medium
CN110716864A (en) * 2019-09-05 2020-01-21 恩亿科(北京)数据科技有限公司 Management method for page test and computer storage medium
CN113157595A (en) * 2021-05-25 2021-07-23 中国平安人寿保险股份有限公司 Interface test management method, device, equipment and storage medium based on microservice

Similar Documents

Publication Publication Date Title
CN109189668A (en) Interface test method, device, computer equipment and storage medium
CN107193750B (en) Script recording method and device
AU2016250350B2 (en) Orchestrating and providing a regression test
CN106557424A (en) Internal storage testing method, measured terminal, test client and system
CN110096437A (en) The test method and Related product of micro services framework
CN109992498B (en) Test case generation method and system and computer system
CN106951364A (en) Method of testing and device
CN108920370B (en) Compatibility problem detection method, device and equipment
CN105468508B (en) code detection method and device
CN109858528A (en) Recommender system training method, device, computer equipment and storage medium
CN108470004A (en) Test script generation method, test method, device, equipment and storage medium
CN109885474A (en) Test case edit methods and device, terminal and computer readable storage medium
CN109144869A (en) Automated testing method, device, computer equipment and storage medium
CN109800367A (en) Webpage loading method, device, computer equipment and storage medium
CN113778890B (en) Code testing method and device, electronic equipment and storage medium
CN105656996B (en) The detection method and device of back end survival
CN109086427A (en) Data comparison method, apparatus, computer equipment and storage medium
CN112181419B (en) Interface generation method and device and storage medium
CN111538659B (en) Interface testing method, system, electronic equipment and storage medium of business scene
CN111694735B (en) Page performance testing method and device, electronic equipment and storage medium
CN112561690A (en) Method, system, equipment and storage medium for testing credit card staging service interface
JP2016514326A (en) Method and system for analyzing a trace timeline of computer system activity
CN113704114A (en) Automatic testing method, device, equipment and medium for functional interface
CN110083525A (en) Localization method, device, computer equipment and the storage medium of RAM leakage
CN106294104B (en) Test case execution method and mobile terminal

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20190111

WW01 Invention patent application withdrawn after publication