CN107391379A - Interface automatic test approach and device - Google Patents
Interface automatic test approach and device Download PDFInfo
- Publication number
- CN107391379A CN107391379A CN201710630085.5A CN201710630085A CN107391379A CN 107391379 A CN107391379 A CN 107391379A CN 201710630085 A CN201710630085 A CN 201710630085A CN 107391379 A CN107391379 A CN 107391379A
- Authority
- CN
- China
- Prior art keywords
- script
- interface
- test
- tested
- test case
- 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.)
- Granted
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/3688—Test management for test execution, e.g. scheduling of test suites
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The present invention, which provides a kind of interface automatic test approach and device, method, to be included:The type of interface to be tested and the input parameter of the interface to be tested are obtained, and using the input parameter as the first parameter;First parameter is handled, obtains the second parameter of data format and the type matching;Based on default script template and second parameter generation test case script and store into the test case set of scripts of the interface to be tested;Show each test case script in the test case set of scripts of the interface to be tested;The operation of response first, selects target script execution corresponding with the described first operation in each test case script and the implementing result based on the target script generates the first test report.In this way, the own level of test program personnel may not necessarily be limited to, reliable test result is obtained by the automatic test of interface to be tested.
Description
Technical field
The present invention relates to software testing technology field, in particular to a kind of interface automatic test approach and device.
Background technology
Existing interface testing, generally tested by programming personnel according to the programming of the actual conditions of interface to be tested.So
And the level of programming personnel differs, the reliable test result degree for causing write test code to run to obtain is inadequate.Even,
The relatively low personnel of some programming levels can not treat test interface and carry out functional test.
The content of the invention
In view of this, it is an object of the invention to provide a kind of interface automatic test approach and device, to improve above-mentioned ask
Topic.
In order to achieve the above object, the embodiment of the present invention provides a kind of interface automatic test approach, including:
The type of interface to be tested and the input parameter of the interface to be tested are obtained, and using the input parameter as
One parameter;
First parameter is handled, obtains the second parameter of data format and the type matching;
Based on default script template and second parameter generation test case script and store to the interface to be tested
Test case set of scripts in;
Show each test case script in the test case set of scripts of the interface to be tested;
The operation of response first, selects target script corresponding with the described first operation to hold in each test case script
Row and implementing result the first test report of generation based on the target script.
Alternatively, in the above-mentioned methods, methods described also includes:
The operation of response second, obtains each test case script in the test case set of scripts of the interface to be tested;
Based on each test case script generation automatic returning script;
The automatic returning script is performed at interval of preset duration and the second test report is generated based on implementing result.
Alternatively, in the above-mentioned methods, based on each test case script generation automatic returning script the step of, bag
Include:
The first script file is generated, by first script file and the interface conjunctionn to be tested;
Each test case script is added in first script file, obtains the automatic returning script.
Alternatively, in the above-mentioned methods, test case script is generated based on default script template and second parameter
Step, including:
Generate the second script file, and by second script file and the interface conjunctionn to be tested;
The default script template is added in second script file, and by the survey in the default script template
Examination instruction and the interface conjunctionn to be tested;
Second parameter is passed into the default script template, obtains the test case pin based on second parameter
This.
Alternatively, in the above-mentioned methods, the implementing result based on the target script generates the step of the first test report,
Including:
The expected execution result of the target script is obtained, by the actual implementing result of the target script and the expection
Implementing result is contrasted;
Result and the actual implementing result based on the contrast generate first test report.
The embodiment of the present invention also provides a kind of interface automatic testing equipment, and the interface automatic testing equipment includes:
First acquisition module, for obtaining the type of interface to be tested and the input parameter of the interface to be tested, and will
The input parameter is as the first parameter;
Format analysis processing module, for handling first parameter, obtain data format and the type matching
Second parameter;
First script generation module, for generating test case script simultaneously based on default script template and second parameter
Store into the test case set of scripts of the interface to be tested;
Display module, each test case script in test case set of scripts for showing the interface to be tested;
First execution module, for responding the first operation, selection and the described first behaviour in each test case script
Target script corresponding to work performs and the implementing result based on the target script generates the first test report.
Alternatively, in said apparatus, second script generation module is based on each test case script generation certainly
The dynamic mode for returning script, including:
The first script file is generated, by first script file and the interface conjunctionn to be tested;
Each test case script is added in first script file, obtains the automatic returning script.
Alternatively, in said apparatus, first script generation module is based on default script template and second ginseng
The mode of number generation test case script, including:
Generate the second script file, and by second script file and the interface conjunctionn to be tested;
The default script template is added in second script file, and by the survey in the default script template
Examination instruction and the interface conjunctionn to be tested;
Second parameter is passed into the default script template, obtains the test case pin based on second parameter
This.
Alternatively, in said apparatus, implementing result generation the of first execution module based on the target script
The mode of one test report, including:
The expected execution result of the target script is obtained, by the actual implementing result of the target script and the expection
Implementing result is contrasted;
Result and the actual implementing result based on the contrast generate first test report.
Interface automatic test approach and device provided in an embodiment of the present invention, can be according to the class of the interface to be tested of acquisition
The input parameter of type and interface to be tested, the test case script of interface to be tested is generated, and based on the first operation to be tested
Test case script is selected to perform automatically in the test case set of scripts of interface.Pass through above-mentioned design, it is not necessary to by test program
The limitation of personnel's own level, reliable test result can be obtained by the automatic test of interface to be tested.
To enable the above objects, features and advantages of the present invention to become apparent, preferred embodiment cited below particularly, and coordinate
Appended accompanying drawing elaborates.
Brief description of the drawings
Scheme in order to illustrate the embodiments of the present invention more clearly is right below in conjunction with the accompanying drawing in the embodiment of the present invention
Technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is a part of the invention
Embodiment, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art are not making wound
The every other embodiment obtained under the premise of the property made work, belongs to the scope of protection of the invention.
Fig. 1 is a kind of block diagram of electric terminal provided in an embodiment of the present invention.
Fig. 2 is a kind of schematic flow sheet of interface automatic test approach provided in an embodiment of the present invention.
Fig. 3 is the sub-step schematic diagram of step S103 shown in Fig. 2.
Fig. 4 is another schematic flow sheet of interface automatic test approach provided in an embodiment of the present invention.
Fig. 5 is a kind of functional block diagram of interface automatic testing equipment provided in an embodiment of the present invention.
Icon:100- electric terminals;110- interface automatic testing equipments;The acquisition modules of 111- first;112- format analysis processings
Module;The script generation modules of 113- first;114- display modules;The execution modules of 115- first;The acquisition modules of 116- second;117-
Second script generation module;The execution modules of 118- second;120- memories;130- processors;140- display units.
Embodiment
Below in conjunction with accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Ground describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.Generally exist
The component described in accompanying drawing with the embodiment of the present invention of displaying can be configured to arrange and design with a variety of herein.
Therefore, below the detailed description of the embodiments of the invention to providing in the accompanying drawings be not intended to limit it is claimed
The scope of the present invention, but be merely representative of the present invention selected embodiment.Based on embodiments of the invention, people in the art
The every other embodiment that member is obtained on the premise of creative work is not made, belongs to the scope of protection of the invention.
It should be noted that:Similar label and letter represents similar terms in following accompanying drawing, therefore, once a certain Xiang Yi
It is defined, then it further need not be defined and explained in subsequent accompanying drawing in individual accompanying drawing.Meanwhile the present invention's
In description, term " first ", " second " etc. are only used for distinguishing description, and it is not intended that instruction or hint relative importance.
As shown in figure 1, it is a kind of block diagram of electric terminal 100 provided in an embodiment of the present invention.The electronics is whole
End 100 can be any equipment with data processing function, e.g., PC (personal computer, PC), intelligence
Mobile phone, tablet personal computer, personal digital assistant (personal digital assistant, PDA), mobile internet surfing equipment
(mobile Internat device, MID) etc..The electric terminal 100 includes interface automatic testing equipment 110, memory
120th, processor 130 and display unit 140.
The memory 120, processor 130 and 140 each element of display unit directly or indirectly electrically connect between each other
Connect, to realize the transmission of data or interaction.For example, these elements can pass through one or more communication bus or signal between each other
Line, which is realized, to be electrically connected with.The interface automatic testing equipment 110 include it is at least one can be with software or firmware (firmware)
Form is solidificated in the software function module in the operating system (operating system, OS) of the electric terminal 100.It is described
Processor 130 is used to perform the executable module stored in the memory 120, such as the interface automatic testing equipment 110
Included software function module and computer program etc..
Wherein, the memory 120 may be, but not limited to, random access memory (Random Access
Memory, RAM), read-only storage (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..
The processor 130 can be a kind of IC chip, have the disposal ability of signal.The processor 130
Can 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),
Field programmable gate array (FPGA) either other PLDs, discrete gate or transistor logic, discrete hard
Part component.It can realize or perform disclosed each method, step and the logic diagram in the embodiment of the present invention.General processor
Can be microprocessor or the processor can also be any conventional processor etc..
The display unit 140 is used for the interactive interface established between the electric terminal 100 and user or for showing
Data to be displayed (e.g., test case script, test report etc.).In the present embodiment, the display unit 140 can be, but
It is not limited to, LCDs or touching display screen.
It should be appreciated that structure shown in Fig. 1 is only to illustrate, the electric terminal 100 can have it is more more than shown in Fig. 1 or
Less component, it is possible to have the configuration different from shown in Fig. 1.Wherein, each component shown in Fig. 1 can be by software, hard
Part or its combination are realized.
Interface refers to the interaction point between the module between system and system or in system and module.Interface testing is mainly used
Whether correct in data interaction, transmission and the logic function of detection interaction point, interface testing is substantially to send one
Request messages ask interface to be tested to service end, and receive the Response messages that service end response returns, based on this
Whether the function of the Response message analysis interface to be tested is correctly realized.It should be appreciated that service end described herein refers to
System where interface to be tested.
In actual applications, interface testing is realized by test script.Common practice is that tester is according to be tested
The testing requirement of interface determines test case, and writes test case script based on the test case, by interface institute to be tested
The input parameter needed is transferred to the interface to be tested, and then the interface to be tested is performed simultaneously based on the input parameter received
Return to implementing result.Finally, tester judges that this is to be measured according to caused data message in implementing result and implementation procedure
Whether the business function of mouth of trying correctly is realized.
Found however, being studied through inventor, write test script requirement tester and be familiar with method of testing, possess programming energy
Power etc..Also, test case determined by the tester of varying level is different, and the test script write is also different, may lead
The test result for causing to finally give can not effectively reflect the actual conditions of interface to be tested.
Interface automatic test approach and device provided in an embodiment of the present invention, can automatically generate test case script, real
The automatic test of existing interface, avoiding test result caused by tester's level differs can not true interface feelings to be tested
The problem of condition.
As shown in Fig. 2 be a kind of schematic flow sheet of interface automatic test approach provided in an embodiment of the present invention, the side
Method can be realized based on the electric terminal 100 shown in Fig. 1.The idiographic flow of method shown in Fig. 1 and step will be done in detail below
Illustrate.
Step S101, obtains the type of interface to be tested and the input parameter of the interface to be tested, and by the input
Parameter is as the first parameter.
In actual applications, the type of interface has a variety of, for example, json types, xml types etc., different types of interface
There is different requirements to the data format of input parameter.In the present embodiment, the data lattice of all types of interfaces can be prestored
Formula handles code, and the input parameter got is processed into the data of data format needed for the interface of the type.
Alternatively, code is handled for the data format of each style interface, the data format processing generation can be established
Corresponding relation between code and the type interface.As a kind of embodiment, data that can be by label to all types of interfaces
Format analysis processing code is identified.
Step S102, first parameter is handled, obtain the second parameter of data format and the type matching.
During implementation, data format corresponding to the type can be called to handle code, first parameter is handled.
Step S103, generate test case script based on default script template and second parameter and store to described and treat
In the test case set of scripts of test interface.
In the present embodiment, the default script template of test case script can be previously stored with electric terminal 100.It is real
Shi Shi, the second parameter that processing obtains is transferred in the default script template, you can obtain a test case script, herein
Obtained test case script is the test case script based on second parameter, that is, using second parameter as input
The test case script of parameter.
Alternatively, the test case script based on second parameter, the step can be generated by the step shown in Fig. 3
S103 can include step S201, step S202 and the sub-steps of step S203 tri-.
Step S201, the second script file is generated, and by second script file and the interface conjunctionn to be tested.
After being handled to obtain the second parameter to the first parameter of input, the second script file can be generated, for holding
Test code corresponding to carrying.In the present embodiment, second script file and the interface conjunctionn to be tested can be had more
Kind.As a kind of embodiment, the second script file of generation can be named with the entitled label of interface to be measured.Example
Such as, it is assumed that interface to be measured is that user profile obtains interface, and the user profile obtains the entitled userInfoGet of interface, then may be used
Using userInfoGet as keyword as the second script file name corresponding to user profile acquisition interface, for example, can incite somebody to action
Second script file is named as userInfoGet_test.Also said process can be interpreted as, generates a script file, and
The script file of generation is named as userInfoGet_test.
Step S202, the default script template is added in second script file, and by the default script
Test instruction and the interface conjunctionn to be tested in template.
Wherein, test instruction can be included in the default script template.Can be by the survey in the default script template
Examination instruction with above-mentioned keyword userInfoGet name, and then establish the test in the default script template instruction with it is described
Association between interface to be tested.
Step S203, second parameter is passed into the default script template, obtained based on second parameter
Test case script.
By above-mentioned design, the test case script with interface conjunctionn to be tested can be generated, and then characterizes test use
Case script is used to test the interface to be tested, avoids the test case script with other interfaces to be tested from obscuring.
Step S104, show each test case script in the test case set of scripts of the interface to be tested.
Alternatively, in the present embodiment, the test case script write directly can be imported electric terminal 100 by user
And store in the test case set of scripts for the interface tested to the test case script.When user needs to carry out interface testing
When, both voluntarily input test use-case information new test case script can be generated, also can be in the test case of interface to be tested
The target script that needs are chosen in set of scripts performs.
Step S105, the operation of response first, selected in each test case script corresponding with the described first operation
Target script performs and the implementing result based on the target script generates the first test report.
In the present embodiment, the first operation refers to that user chooses the operation of target script in multiple test case scripts.
Alternatively, during the target script is performed, the electric terminal 100 can be to producing in implementation procedure
Data caught and recorded, and perform complete when, based on implementing result and the data of record generation it is described first survey
Examination report.Wherein, caused data include the abnormal data dished out in implementation procedure in the implementation procedure.
Alternatively, in the present embodiment, the step S105 may include steps of.
The expected execution result of the target script is obtained, by the actual implementing result of the target script and the expection
Implementing result is contrasted, and the result based on the contrast and actual implementing result generation the first test report
Accuse.
Alternatively, for each test case script of each interface to be tested, can be stored in the electric terminal 100
There is the expected execution result of the test case script.Inputted it should be noted that the expected execution result can be user
Prestored in electric terminal 100 inputted in the lump during the input parameter of interface to be tested or described.
Alternatively, as shown in figure 4, the interface automatic test approach can also include step S106, step S107 and
Step S108.
Step S106, the operation of response second, each test obtained in the test case set of scripts of the interface to be tested are used
Case script.
In the present embodiment, the second operation refers to determine to need the operation for generating automatic returning script.Alternatively, in user
Input during the input parameter needed for interface to be tested, the electric terminal 100 can provide an option, for selection by the user
Whether need to generate automatic returning script.If user's selection needs to generate, the test for obtaining the interface to be tested automatically is used
All test case scripts that case script is concentrated.
Step S107, based on each test case script generation automatic returning script.
Alternatively, in the present embodiment, step S107 can be achieved by the steps of:
The first script file is generated, by first script file and the interface conjunctionn to be tested.By each test
It is added to case script in first script file, obtains the automatic returning script.
As a kind of embodiment, can be named with the first script file described in the name nominating of interface to be tested, Jin Erjian
Vertical associating between first script file and the interface to be tested.
In the present embodiment, when user's selection needs to generate the automatic returning script of interface to be tested, electric terminal 100
All test case scripts being stored in the test case set of scripts of the interface to be tested are extracted, and are added to institute
State in the first script file, generate the automatic returning script of the interface to be tested.
In other words, all tests in test case set of scripts of the automatic returning script based on the interface to be tested
Use-case is treated test interface and tested.
Step S108, the automatic returning script is performed and based on the test of implementing result generation second at interval of preset duration
Report.
It is alternatively possible to be the execution cycle of the preset duration of automatic returning script setting one, the automatic returning pin
Originally can be performed according to the execution cycle clocked flip.The preset duration can flexibly be set according to actual conditions.
Alternatively, in the present embodiment, the script being related in the above can use the scripts such as Python
Write.
As shown in figure 5, be a kind of interface automatic testing equipment 110 provided in an embodiment of the present invention, can be based on shown in Fig. 1
Electric terminal 100 is realized.The interface automatic testing equipment 110 includes the first acquisition module 111, format analysis processing module 112, the
One script generation module 113, the execution module 115 of display module 114 and first.
Wherein, first acquisition module 111 is used to obtaining the defeated of the type of interface to be tested and the interface to be tested
Enter parameter, and using the input parameter as the first parameter.
In the present embodiment, the description as described in first acquisition module 111 is specifically referred to step S101 shown in Fig. 2
Detailed description, that is, step S101 can be performed by first acquisition module 111.
The format analysis processing module 112 is used to handle first parameter, obtains data format and the type
Second parameter of matching.
In the present embodiment, the description as described in the format analysis processing module 112 is specifically referred to step S102 shown in Fig. 2
Detailed description, that is, the step S102 can be performed by the format analysis processing module 112.
First script generation module 113 is used for based on default script template and second parameter generation test case
Script is simultaneously stored into the test case set of scripts of the interface to be tested.
In the present embodiment, the description as described in first script generation module 113 is specifically referred to step shown in Fig. 2
S103 detailed description, that is, the step S103 can be performed by first script generation module 113.
Alternatively, first script generation module 113 is based on default script template and second parameter generation test
With the mode of case script, can include:
Generate the second script file, and by second script file and the interface conjunctionn to be tested.Will be described default
Script template is added in second script file, and by the default script template test instruction with it is described to be tested
Interface conjunctionn.Second parameter is passed into the default script template, obtains the test case based on second parameter
Script.
The display module 114 is used to show each test case pin in the test case set of scripts of the interface to be tested
This.
In the present embodiment, the description as described in the display module 114 is specifically referred to step S104 as shown in Fig. 2
It is described in detail, that is, the step S104 can be performed by the display module 114.
First execution module 115 be used for respond first operation, in each test case script selection with it is described
Target script corresponding to first operation performs and the implementing result based on the target script generates the first test report.
In the present embodiment, the description as described in first execution module 115 is specifically referred to step S105 shown in Fig. 2
Detailed description, that is, the step S104 can be performed by first execution module 115.
Alternatively, in the present embodiment, implementing result generation of first execution module 115 based on the target script
The mode of first test report, it can include:
The expected execution result of the target script is obtained, by the actual implementing result of the target script and the expection
Implementing result is contrasted, and the result based on the contrast and actual implementing result generation the first test report
Accuse.
Alternatively, referring again to Fig. 5, the interface automatic testing equipment 110 can also include the second acquisition module 116,
Second script generation module 117 and the second execution module 118.
Wherein, second acquisition module 116 is used to respond the second operation, obtains the test case of the interface to be tested
Each test case script in set of scripts.
In the present embodiment, the description as described in second acquisition module 116 is specifically referred to step S201 shown in Fig. 3
Detailed description, that is, the step S201 can be performed by second acquisition module 116.
Second script generation module 117 is used for based on each test case script generation automatic returning script.
In the present embodiment, the description as described in second script generation module 117 is specifically referred to step shown in Fig. 3
S202 detailed description, that is, the step S202 can be performed by second script generation module 117.
Alternatively, in the present embodiment, second script generation module 117 is based on each test case script generation
The mode of automatic returning script, it can include:
The first script file is generated, is respectively surveyed by first script file and the interface conjunctionn to be tested, and by described
Case script on probation is added in first script file, obtains the automatic returning script.
Second execution module 118 is used to perform the automatic returning script at interval of preset duration and is based on performing knot
Fruit generates the second test report.
In the present embodiment, the description as described in second execution module 118 is specifically referred to step S203 shown in Fig. 3
Detailed description, that is, the step S203 can be performed by second execution module 118.
In summary, interface automatic test approach and device provided in an embodiment of the present invention, can be according to the to be measured of acquisition
The type of mouth of trying and the input parameter of interface to be tested, the test case script of interface to be tested is generated, and based on the first behaviour
Make to select test case script to perform automatically in the test case set of scripts of interface to be tested.Pass through above-mentioned design, it is not necessary to by
To the limitation of test program personnel's own level, reliable test result can be obtained by the automatic test of interface to be tested.
In several embodiments provided herein, it should be understood that disclosed apparatus and method, can also pass through
Other modes are realized.Device embodiment described above is only schematical, for example, flow chart and block diagram in accompanying drawing
Show the device of multiple embodiments according to the present invention, method and computer program product architectural framework in the cards,
Function and operation.At this point, each square frame in flow chart or block diagram can represent the one of a module, program segment or code
Part, a part for the module, program segment or code include one or more and are used to realize holding for defined logic function
Row instruction.It should also be noted that at some as in the implementation replaced, the function that is marked in square frame can also with different from
The order marked in accompanying drawing occurs.For example, two continuous square frames can essentially perform substantially in parallel, they are sometimes
It can perform in the opposite order, this is depending on involved function.It is it is also noted that every in block diagram and/or flow chart
The combination of individual square frame and block diagram and/or the square frame in flow chart, function or the special base of action as defined in performing can be used
Realize, or can be realized with the combination of specialized hardware and computer instruction in the system of hardware.
In addition, each functional module in each embodiment of the present invention can integrate to form an independent portion
Point or modules individualism, can also two or more modules be integrated to form an independent part.
If the function is realized in the form of software function module and is used as independent production marketing or in use, can be with
It is stored in a computer read/write memory medium.Based on such understanding, technical scheme is substantially in other words
The part to be contributed to prior art or the part of the technical scheme can be embodied in the form of software product, the meter
Calculation machine software product is stored in a storage medium, including some instructions are causing a computer equipment (can be
People's computer, server, or network equipment etc.) perform all or part of step of each embodiment methods described of the present invention.
And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), arbitrary access are deposited
Reservoir (RAM, Random Access Memory), magnetic disc or CD etc. are various can be with the medium of store program codes.Need
Illustrate, herein, such as first and second or the like relational terms be used merely to by an entity or operation with
Another entity or operation make a distinction, and not necessarily require or imply between these entities or operation any this reality be present
The relation or order on border.Moreover, term " comprising ", "comprising" or its any other variant are intended to the bag of nonexcludability
Contain, so that process, method, article or equipment including a series of elements not only include those key elements, but also including
The other element being not expressly set out, or also include for this process, method, article or the intrinsic key element of equipment.
In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including the key element
Process, method, other identical element also be present in article or equipment.
The foregoing is only a specific embodiment of the invention, but protection scope of the present invention is not limited thereto, any
Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, should all be contained
Cover within protection scope of the present invention.Therefore, protection scope of the present invention described should be defined by scope of the claims.
Claims (10)
- A kind of 1. interface automatic test approach, it is characterised in that including:The type of interface to be tested and the input parameter of the interface to be tested are obtained, and using the input parameter as the first ginseng Number;First parameter is handled, obtains the second parameter of data format and the type matching;Based on default script template and second parameter generation test case script and store to the survey of the interface to be tested Case script on probation is concentrated;Show each test case script in the test case set of scripts of the interface to be tested;The operation of response first, selects target script corresponding with the described first operation to perform simultaneously in each test case script Implementing result based on the target script generates the first test report.
- 2. interface automatic test approach according to claim 1, it is characterised in that methods described also includes:The operation of response second, obtains each test case script in the test case set of scripts of the interface to be tested;Based on each test case script generation automatic returning script;The automatic returning script is performed at interval of preset duration and the second test report is generated based on implementing result.
- 3. interface automatic test approach according to claim 2, it is characterised in that given birth to based on each test case script The step of into automatic returning script, including:The first script file is generated, by first script file and the interface conjunctionn to be tested;Each test case script is added in first script file, obtains the automatic returning script.
- 4. the interface automatic test approach according to any one of claims 1 to 3, it is characterised in that based on default script mould The step of plate and second parameter generation test case script, including:Generate the second script file, and by second script file and the interface conjunctionn to be tested;The default script template is added in second script file, and the test in the default script template is referred to Order and the interface conjunctionn to be tested;Second parameter is passed into the default script template, obtains the test case script based on second parameter.
- 5. the interface automatic test approach according to any one of claims 1 to 3, it is characterised in that based on the target pin This implementing result generates the step of the first test report, including:The expected execution result of the target script is obtained, by the actual implementing result of the target script and the expected execution As a result contrasted;Result and the actual implementing result based on the contrast generate first test report.
- 6. a kind of interface automatic testing equipment, it is characterised in that the interface automatic testing equipment includes:First acquisition module, for obtaining the type of interface to be tested and the input parameter of the interface to be tested, and by described in Input parameter is as the first parameter;Format analysis processing module, for handling first parameter, obtain the second of data format and the type matching Parameter;First script generation module, for generating test case script based on default script template and second parameter and storing Into the test case set of scripts of the interface to be tested;Display module, each test case script in test case set of scripts for showing the interface to be tested;First execution module, for responding the first operation, selection and the described first operation pair in each test case script The target script answered performs and the implementing result based on the target script generates the first test report.
- 7. interface automatic testing equipment according to claim 6, it is characterised in that the interface automatic testing equipment also wraps Include:Second acquisition module, for responding the second operation, obtain each survey in the test case set of scripts of the interface to be tested Case script on probation;Second script generation module, for based on each test case script generation automatic returning script;Second execution module, for performing the automatic returning script and based on implementing result generation second at interval of preset duration Test report.
- 8. interface automatic testing equipment according to claim 7, it is characterised in that second script generation module is based on The mode of each test case script generation automatic returning script, including:The first script file is generated, by first script file and the interface conjunctionn to be tested;Each test case script is added in first script file, obtains the automatic returning script.
- 9. the interface automatic testing equipment according to any one of claim 6~8, it is characterised in that the first script life Into mode of the module based on default script template and second parameter generation test case script, including:Generate the second script file, and by second script file and the interface conjunctionn to be tested;The default script template is added in second script file, and the test in the default script template is referred to Order and the interface conjunctionn to be tested;Second parameter is passed into the default script template, obtains the test case script based on second parameter.
- 10. the interface automatic testing equipment according to any one of claim 6~8, it is characterised in that described first performs mould Implementing result of the block based on the target script generates the mode of the first test report, including:The expected execution result of the target script is obtained, by the actual implementing result of the target script and the expected execution As a result contrasted;Result and the actual implementing result based on the contrast generate first test report.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710630085.5A CN107391379B (en) | 2017-07-28 | 2017-07-28 | Automatic interface testing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710630085.5A CN107391379B (en) | 2017-07-28 | 2017-07-28 | Automatic interface testing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107391379A true CN107391379A (en) | 2017-11-24 |
CN107391379B CN107391379B (en) | 2021-01-01 |
Family
ID=60341861
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710630085.5A Active CN107391379B (en) | 2017-07-28 | 2017-07-28 | Automatic interface testing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107391379B (en) |
Cited By (28)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108153670A (en) * | 2017-11-30 | 2018-06-12 | 北京奇艺世纪科技有限公司 | A kind of interface test method, device and electronic equipment |
CN108170604A (en) * | 2017-12-29 | 2018-06-15 | 成都市共维科技有限公司 | Test method, device, computer equipment and storage medium |
CN108388514A (en) * | 2018-02-24 | 2018-08-10 | 平安科技(深圳)有限公司 | Automatic interface testing method, device, equipment and computer readable storage medium |
CN108959067A (en) * | 2018-05-31 | 2018-12-07 | 康键信息技术(深圳)有限公司 | Test method, device and the computer readable storage medium of search engine |
CN109032956A (en) * | 2018-09-11 | 2018-12-18 | 郑州云海信息技术有限公司 | A kind of interface test method and device |
CN109032015A (en) * | 2018-08-01 | 2018-12-18 | 惠州志顺电子实业有限公司 | MCU interface control method and device |
CN109408370A (en) * | 2018-09-18 | 2019-03-01 | 深圳壹账通智能科技有限公司 | Interface testing document generating method, device, computer equipment and storage medium |
CN109522211A (en) * | 2018-09-29 | 2019-03-26 | 中国平安人寿保险股份有限公司 | Interface parameters transmission method, device, electronic equipment and storage medium |
CN109558290A (en) * | 2018-11-12 | 2019-04-02 | 平安科技(深圳)有限公司 | Server, automatic interface testing method and storage medium |
CN109655706A (en) * | 2018-12-11 | 2019-04-19 | 中国航空工业集团公司成都飞机设计研究所 | A kind of remote interface units automatic test equipment |
CN109710532A (en) * | 2018-12-28 | 2019-05-03 | 北京金山安全软件有限公司 | Test case management method and device and electronic equipment |
CN109710537A (en) * | 2019-01-02 | 2019-05-03 | 郑州云海信息技术有限公司 | A kind of intelligent automation test method and system |
CN109871314A (en) * | 2019-01-02 | 2019-06-11 | 石化盈科信息技术有限责任公司 | The automatic generation method of test script |
CN109933531A (en) * | 2019-03-19 | 2019-06-25 | 湖南国科微电子股份有限公司 | Automatic testing method, device and electronic equipment |
CN109933535A (en) * | 2019-03-26 | 2019-06-25 | 北京金山云网络技术有限公司 | Generation method, device and the server of test case |
WO2019134677A1 (en) * | 2018-01-08 | 2019-07-11 | 深圳市中兴微电子技术有限公司 | Detection method and device and storage medium |
CN110502420A (en) * | 2018-05-17 | 2019-11-26 | 北京京东尚科信息技术有限公司 | A kind of method and apparatus for realizing test script selfreparing |
CN110737575A (en) * | 2018-07-20 | 2020-01-31 | 北京金山云网络技术有限公司 | interface testing method, device, electronic equipment and storage medium |
CN110750442A (en) * | 2019-09-06 | 2020-02-04 | 平安医疗健康管理股份有限公司 | Test case generation method, device, equipment and storage medium |
CN110955600A (en) * | 2019-11-27 | 2020-04-03 | 中国银行股份有限公司 | Interface test method and device |
CN110968517A (en) * | 2019-12-04 | 2020-04-07 | 上海华兴数字科技有限公司 | Automatic test method, device, platform and computer readable storage medium |
CN111786855A (en) * | 2020-06-30 | 2020-10-16 | 曙光信息产业(北京)有限公司 | Network card pressure testing method and device, electronic equipment and storage medium |
CN111782533A (en) * | 2020-07-01 | 2020-10-16 | 江苏云柜网络技术有限公司 | Test method, test device, electronic equipment and storage medium |
CN112395184A (en) * | 2019-08-19 | 2021-02-23 | 中移(苏州)软件技术有限公司 | Information acquisition method, equipment and computer storage medium |
CN113360408A (en) * | 2021-07-15 | 2021-09-07 | 中国工商银行股份有限公司 | Automatic testing method and device based on dragging type machine learning platform |
CN113377669A (en) * | 2021-06-29 | 2021-09-10 | 南京苏宁软件技术有限公司 | Automatic testing method and device, computer equipment and storage medium |
CN113434395A (en) * | 2021-06-22 | 2021-09-24 | 中国平安人寿保险股份有限公司 | Automatic generation method, device, equipment and medium of test case |
CN113886221A (en) * | 2021-09-13 | 2022-01-04 | 前海飞算云智软件科技(深圳)有限公司 | Test script generation method and device, storage medium and electronic equipment |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103150249A (en) * | 2011-12-07 | 2013-06-12 | 北京新媒传信科技有限公司 | Automatic testing method and system |
EP2667306A3 (en) * | 2012-05-23 | 2014-01-01 | Sap Ag | Software systems testing interface |
US20140075242A1 (en) * | 2012-09-07 | 2014-03-13 | Elena Dolinina | Testing rest api applications |
US8893087B2 (en) * | 2011-08-08 | 2014-11-18 | Ca, Inc. | Automating functionality test cases |
CN105117335A (en) * | 2015-08-26 | 2015-12-02 | 卡斯柯信号有限公司 | Method for automated verification and regression test of software unit |
CN105335293A (en) * | 2015-11-30 | 2016-02-17 | 努比亚技术有限公司 | Automatic testing system and method based on parallel ports |
CN105824926A (en) * | 2016-03-17 | 2016-08-03 | 浪潮通用软件有限公司 | Method for dynamically selecting and calling external system interface |
CN106815140A (en) * | 2015-12-02 | 2017-06-09 | 北京奇虎科技有限公司 | A kind of interface test method and device |
-
2017
- 2017-07-28 CN CN201710630085.5A patent/CN107391379B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8893087B2 (en) * | 2011-08-08 | 2014-11-18 | Ca, Inc. | Automating functionality test cases |
US20150007149A1 (en) * | 2011-08-08 | 2015-01-01 | Ca, Inc. | Automating functionality test cases |
CN103150249A (en) * | 2011-12-07 | 2013-06-12 | 北京新媒传信科技有限公司 | Automatic testing method and system |
EP2667306A3 (en) * | 2012-05-23 | 2014-01-01 | Sap Ag | Software systems testing interface |
US20140075242A1 (en) * | 2012-09-07 | 2014-03-13 | Elena Dolinina | Testing rest api applications |
CN105117335A (en) * | 2015-08-26 | 2015-12-02 | 卡斯柯信号有限公司 | Method for automated verification and regression test of software unit |
CN105335293A (en) * | 2015-11-30 | 2016-02-17 | 努比亚技术有限公司 | Automatic testing system and method based on parallel ports |
CN106815140A (en) * | 2015-12-02 | 2017-06-09 | 北京奇虎科技有限公司 | A kind of interface test method and device |
CN105824926A (en) * | 2016-03-17 | 2016-08-03 | 浪潮通用软件有限公司 | Method for dynamically selecting and calling external system interface |
Non-Patent Citations (1)
Title |
---|
李刚毅 等: ""自动化回归测试的技术和实现"", 《计算机应用研究》 * |
Cited By (39)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108153670A (en) * | 2017-11-30 | 2018-06-12 | 北京奇艺世纪科技有限公司 | A kind of interface test method, device and electronic equipment |
CN108170604A (en) * | 2017-12-29 | 2018-06-15 | 成都市共维科技有限公司 | Test method, device, computer equipment and storage medium |
CN108170604B (en) * | 2017-12-29 | 2021-01-15 | 成都市共维科技有限公司 | Test method, test device, computer equipment and storage medium |
WO2019134677A1 (en) * | 2018-01-08 | 2019-07-11 | 深圳市中兴微电子技术有限公司 | Detection method and device and storage medium |
CN108388514A (en) * | 2018-02-24 | 2018-08-10 | 平安科技(深圳)有限公司 | Automatic interface testing method, device, equipment and computer readable storage medium |
WO2019161619A1 (en) * | 2018-02-24 | 2019-08-29 | 平安科技(深圳)有限公司 | Automatic interface test method and apparatus, and device and computer-readable storage medium |
CN108388514B (en) * | 2018-02-24 | 2021-02-23 | 平安科技(深圳)有限公司 | Interface automation test method, device, equipment and computer readable storage medium |
CN110502420A (en) * | 2018-05-17 | 2019-11-26 | 北京京东尚科信息技术有限公司 | A kind of method and apparatus for realizing test script selfreparing |
CN108959067A (en) * | 2018-05-31 | 2018-12-07 | 康键信息技术(深圳)有限公司 | Test method, device and the computer readable storage medium of search engine |
CN108959067B (en) * | 2018-05-31 | 2023-04-07 | 康键信息技术(深圳)有限公司 | Method and device for testing search engine and computer readable storage medium |
CN110737575A (en) * | 2018-07-20 | 2020-01-31 | 北京金山云网络技术有限公司 | interface testing method, device, electronic equipment and storage medium |
CN110737575B (en) * | 2018-07-20 | 2023-09-01 | 北京金山云网络技术有限公司 | Interface testing method and device, electronic equipment and storage medium |
CN109032015A (en) * | 2018-08-01 | 2018-12-18 | 惠州志顺电子实业有限公司 | MCU interface control method and device |
CN109032956A (en) * | 2018-09-11 | 2018-12-18 | 郑州云海信息技术有限公司 | A kind of interface test method and device |
CN109408370A (en) * | 2018-09-18 | 2019-03-01 | 深圳壹账通智能科技有限公司 | Interface testing document generating method, device, computer equipment and storage medium |
CN109522211B (en) * | 2018-09-29 | 2023-07-18 | 中国平安人寿保险股份有限公司 | Interface parameter transmission method and device, electronic equipment and storage medium |
CN109522211A (en) * | 2018-09-29 | 2019-03-26 | 中国平安人寿保险股份有限公司 | Interface parameters transmission method, device, electronic equipment and storage medium |
CN109558290A (en) * | 2018-11-12 | 2019-04-02 | 平安科技(深圳)有限公司 | Server, automatic interface testing method and storage medium |
CN109558290B (en) * | 2018-11-12 | 2023-06-02 | 平安科技(深圳)有限公司 | Server, interface automatic test method and storage medium |
CN109655706A (en) * | 2018-12-11 | 2019-04-19 | 中国航空工业集团公司成都飞机设计研究所 | A kind of remote interface units automatic test equipment |
CN109710532A (en) * | 2018-12-28 | 2019-05-03 | 北京金山安全软件有限公司 | Test case management method and device and electronic equipment |
CN109710537A (en) * | 2019-01-02 | 2019-05-03 | 郑州云海信息技术有限公司 | A kind of intelligent automation test method and system |
CN109871314A (en) * | 2019-01-02 | 2019-06-11 | 石化盈科信息技术有限责任公司 | The automatic generation method of test script |
CN109933531A (en) * | 2019-03-19 | 2019-06-25 | 湖南国科微电子股份有限公司 | Automatic testing method, device and electronic equipment |
CN109933535B (en) * | 2019-03-26 | 2022-09-13 | 北京金山云网络技术有限公司 | Test case generation method and device and server |
CN109933535A (en) * | 2019-03-26 | 2019-06-25 | 北京金山云网络技术有限公司 | Generation method, device and the server of test case |
CN112395184A (en) * | 2019-08-19 | 2021-02-23 | 中移(苏州)软件技术有限公司 | Information acquisition method, equipment and computer storage medium |
CN110750442A (en) * | 2019-09-06 | 2020-02-04 | 平安医疗健康管理股份有限公司 | Test case generation method, device, equipment and storage medium |
CN110955600A (en) * | 2019-11-27 | 2020-04-03 | 中国银行股份有限公司 | Interface test method and device |
CN110955600B (en) * | 2019-11-27 | 2023-11-10 | 中国银行股份有限公司 | Interface testing method and device |
CN110968517B (en) * | 2019-12-04 | 2023-05-12 | 上海华兴数字科技有限公司 | Automatic test method, apparatus, platform and computer readable storage medium |
CN110968517A (en) * | 2019-12-04 | 2020-04-07 | 上海华兴数字科技有限公司 | Automatic test method, device, platform and computer readable storage medium |
CN111786855A (en) * | 2020-06-30 | 2020-10-16 | 曙光信息产业(北京)有限公司 | Network card pressure testing method and device, electronic equipment and storage medium |
CN111782533A (en) * | 2020-07-01 | 2020-10-16 | 江苏云柜网络技术有限公司 | Test method, test device, electronic equipment and storage medium |
CN113434395A (en) * | 2021-06-22 | 2021-09-24 | 中国平安人寿保险股份有限公司 | Automatic generation method, device, equipment and medium of test case |
CN113434395B (en) * | 2021-06-22 | 2024-04-30 | 中国平安人寿保险股份有限公司 | Automatic generation method, device, equipment and medium for test cases |
CN113377669A (en) * | 2021-06-29 | 2021-09-10 | 南京苏宁软件技术有限公司 | Automatic testing method and device, computer equipment and storage medium |
CN113360408A (en) * | 2021-07-15 | 2021-09-07 | 中国工商银行股份有限公司 | Automatic testing method and device based on dragging type machine learning platform |
CN113886221A (en) * | 2021-09-13 | 2022-01-04 | 前海飞算云智软件科技(深圳)有限公司 | Test script generation method and device, storage medium and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN107391379B (en) | 2021-01-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107391379A (en) | Interface automatic test approach and device | |
CN104331373A (en) | Monkey test system and method | |
CN110908909B (en) | Automatic test method, device, storage medium and equipment | |
CN111401722B (en) | Intelligent decision method and intelligent decision system | |
CN107741911A (en) | Interface test method, device, client and computer-readable recording medium | |
CN108628748B (en) | Automatic test management method and automatic test management system | |
CN105786695B (en) | Data test method and system | |
CN103175570A (en) | Measuring device with screen capture function | |
CN103093713A (en) | Chip validation method and device and system based on field programmable gate array (FPGA) | |
CN109389492A (en) | Method, system, equipment and the storage medium of probability of cheating are calculated based on micro- expression | |
CN106843912A (en) | Page info acquisition methods and device | |
CN107741902A (en) | Program application detection method and program application detection means | |
CN109408304A (en) | Block chain introduces test method, device, equipment and readable storage medium storing program for executing | |
CN113850603A (en) | Method and device for determining reason of payment failure | |
CN107870851A (en) | Application performance test method, apparatus, computer-readable recording medium and system | |
CN107909952A (en) | Detect the method and gauge of display screen | |
CN108255687A (en) | Application program internal memory monitoring test method, device and the electronic equipment of terminal | |
CN109361192B (en) | Terminal equipment, and constant value modification method and device | |
CN113901852A (en) | Detection method and device for electronic equipment | |
CN103186789A (en) | Method for automatically identifying part correctness | |
CN114968696A (en) | Index monitoring method, electronic equipment and chip system | |
CN106502743A (en) | The upgrade method of the touch-screen firmware of electronic equipment and update device, electronic equipment | |
CN112306838A (en) | Page layout compatibility testing method, device and equipment and readable storage medium | |
CN114281614A (en) | Server production test method, system, device and readable storage medium | |
CN107895029A (en) | Information statistical method and information statistical device |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |