CN108563539A - Interface testing method, server, readable storage medium and system - Google Patents
Interface testing method, server, readable storage medium and system Download PDFInfo
- Publication number
- CN108563539A CN108563539A CN201810235812.2A CN201810235812A CN108563539A CN 108563539 A CN108563539 A CN 108563539A CN 201810235812 A CN201810235812 A CN 201810235812A CN 108563539 A CN108563539 A CN 108563539A
- Authority
- CN
- China
- Prior art keywords
- variable
- interface
- assignment
- interface testing
- code
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 135
- 238000000034 method Methods 0.000 claims abstract description 22
- 238000010998 test method Methods 0.000 claims description 30
- 230000002159 abnormal effect Effects 0.000 claims description 5
- 238000004590 computer program Methods 0.000 claims description 3
- 230000008569 process Effects 0.000 description 13
- 238000005516 engineering process Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 238000012544 monitoring process Methods 0.000 description 3
- 238000012797 qualification Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 210000003733 optic disk Anatomy 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
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/362—Software debugging
- G06F11/3628—Software debugging of optimised code
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2273—Test methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/26—Functional testing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention provides an interface testing method, a server, a readable storage medium and a system, wherein the method comprises the following steps: receiving and analyzing an interface test program to obtain target variables to be assigned and assignment codes of each target variable, wherein the target variables to be assigned comprise a first variable and a second variable; calling a corresponding variable value from a database to be assigned to each first variable according to the assignment code of each first variable; and inputting the assigned test program to an interface to be tested, and assigning the return value of the interface to be tested to the corresponding second variable according to the assignment code of each second variable. The interface testing method, the server, the readable storage medium and the system realize automatic assignment of the variables, save time and labor and greatly improve the efficiency of interface testing.
Description
Technical field
The present invention relates to electronic communication technology field, more particularly to a kind of interface test method, server, readable storage medium
Matter and system.
Background technology
In the processes such as the exploitation, maintenance of WEB (World Wide Web, abbreviation WWW) server, it usually needs
Each interface of WEB server is tested, with test these interfaces whether can normal response, such as test electronic business transaction
Whether the payment flow of website is unobstructed etc..
When testing interface, it usually needs give test program certain test data, it can be successfully to interface
It is tested, such as in the whether unobstructed process of test payment flow, then needs a known Bank Account Number or payment
The information such as account and password, then give the information in test program, with the test for the flow that completes charge.
In the prior art, the test data of interface testing is all prepared by programmer by hand at present, is compared and is taken time and effort, and
It is high to the qualification requirement of programmer, it is unfavorable for the fully under way of interface testing.Moreover, some are not known in advance (to need
The data that can be determined in conjunction with a upper test result) test data, existing interface test method can only be in test
Assignment, efficiency are low.
Invention content
Based on this, the object of the present invention is to provide a kind of interface test method, server, readable storage medium storing program for executing and system,
To improve the efficiency of interface testing.
A kind of interface test method according to the ... of the embodiment of the present invention is applied to interface testing server, including:
Interface testing program is received and parsed through, to obtain waiting for the target variable of assignment and the assignment of each target variable
Code, it is described to wait for that the target variable of assignment includes at least one first variable and at least one second variable;
The interface testing program is inputed into interface to be measured, so that the interface to be measured executes the interface testing journey
Sequence;
When the interface testing program goes to any current first variable, according to the assignment of current first variable
Code calls corresponding variate-value to give current first variable in database;And
When the interface testing program goes to any current second variable, according to the current bivariate assignment
The corresponding return value of the interface to be measured is assigned to current second variable by code.
In addition, a kind of interface test method according to the above embodiment of the present invention, can also have following additional technology
Feature:
Further, each of storage variate-value contains corresponding special tone pitch code in the database.
Further, the step of parsing interface testing program includes:
The interface testing program is traversed, the variable of tone pitch code will be contained as first variable;
All tone pitch codes in the interface testing program are obtained, to obtain the assignment of each first variable
Code.
Further, the step of parsing interface testing program includes:
The interface testing program is traversed, the variable of return value association code will be contained as second variable;
All return value association codes in the interface testing program are obtained, to obtain each second variable
Assignment code.
Further, the interface testing server connects a test client, and the interface testing program is via described
Test client is sent, and the interface test method further includes:
When detecting that the interface testing of the interface to be measured interrupts, currently performed variable is obtained;
A miscue information is sent to the test client, to prompt the currently performed variable assignments abnormal.
Further, the interface testing server connects a test client, and the interface testing program is via described
Test client is sent, and the interface test method further includes:
When detecting that the interface testing of the interface to be measured interrupts, currently performed variable is obtained;
A miscue information is sent to the test client, to prompt the currently performed variable assignments abnormal.
Further, the interface test method further includes:
Receive the newly-increased variate-value of input and the identification information of the newly-increased variate-value, the special tune of the newly-increased variate-value
It is worth in code comprising at least part identification information;
By the newly-increased variate-value and the update of identification information in the database.
A kind of interface testing server according to the ... of the embodiment of the present invention, including:
Program parsing module, for receiving and parsing through interface testing program, to obtain waiting for the target variable of assignment and each
The assignment code of the target variable, it is described to wait for that the target variable of assignment includes at least one first variable and at least one second
Variable;
Program input module, for the interface testing program to be inputed to interface to be measured, so that the interface to be measured is held
The row interface testing program;
First assignment module, for when the interface testing program goes to any current first variable, according to described
The assignment code of current first variable calls corresponding variate-value to give current first variable in database;And
Second assignment module, for when the interface testing program goes to any current second variable, according to described
The corresponding return value of the interface to be measured is assigned to current second variable by current bivariate assignment code.
The present invention also proposes a kind of computer readable storage medium, is stored thereon with computer program, which is handled
Such as above-mentioned interface test method is realized when device executes.
The present invention also proposes a kind of interface test system, including:
Test client, for writing test program for user;And
Above-mentioned interface testing server, for receiving the test program and testing interface to be measured.
Above-mentioned interface test method, server, readable storage medium storing program for executing and system, by the way that by known variate-value, (first becomes
The value of amount) it pre-deposits in database, when writing test program, it is only necessary to input the assignment code of this class variable (such as
Tone pitch code), in the process of program parsing, test server will obtain the assignment code of each variable automatically, and according to
These assignment codes, you can call corresponding variate-value to be given to each first variable in database, it is automatic to realize
Variable to variate-value is determined in advance carries out assignment;In addition, needing to combine a upper test result or certain section of test generation for some
The variate-value (bivariate value) that the return value of code can determine, then can increase this class variable when writing test program
Assignment association (assignment of the variable is associated with some return value), program parse process in, test server
The assignment association of each variable will be obtained automatically, and will be associated with according to these assignment, you can the return value for obtaining test process is certainly
It is dynamic to be given to each second variable, it realizes and assignment is carried out to the variable of prior uncertain variables value automatically, therefore, the interface is surveyed
Method for testing is time saving and energy saving, substantially increases the efficiency of interface testing, and programmer is only it should be understood that basic call by value code
, the qualification requirement to programmer is reduced, the fully under way of interface testing is conducive to.
Description of the drawings
Fig. 1 is the flow chart of the interface test method in first embodiment of the invention;
Fig. 2 is the flow chart of the interface test method in second embodiment of the invention;
Fig. 3 is the flow chart being stored in known variables value in database in second embodiment of the invention;
Fig. 4 is the flow chart of the interface test method in third embodiment of the invention;
Fig. 5 is the structural schematic diagram of the interface testing server in fourth embodiment of the invention;
Fig. 6 is the structural schematic diagram of the interface test system in fifth embodiment of the invention.
Main element symbol description:
Program parsing module | 11 | Program input module | 12 |
First assignment module | 13 | Second assignment module | 14 |
First Traversal Unit | 111 | First acquisition unit | 112 |
Second Traversal Unit | 113 | Second acquisition unit | 114 |
Variable acquisition module | 15 | Miscue module | 16 |
Restore judgment module | 17 | Data reception module | 18 |
Data update module | 19 | Interface test system | 100 |
Interface testing server | 10 | Test client | 20 |
Detailed description below will be further illustrated the present invention in conjunction with above-mentioned attached drawing.
Specific implementation mode
To facilitate the understanding of the present invention, below with reference to relevant drawings to invention is more fully described.In attached drawing
Give several embodiments of the present invention.But the present invention can realize in many different forms, however it is not limited to this paper institutes
The embodiment of description.On the contrary, purpose of providing these embodiments is make it is more thorough and comprehensive to the disclosure.
It should be noted that when element is referred to as " being fixedly arranged on " another element, it can be directly on another element
Or there may also be elements placed in the middle.When an element is considered as " connection " another element, it can be directly connected to
To another element or it may be simultaneously present centering elements.Term as used herein " vertical ", " horizontal ", " left side ",
" right side " and similar statement are for illustrative purposes only.
Unless otherwise defined, all of technologies and scientific terms used here by the article and belong to the technical field of the present invention
The normally understood meaning of technical staff is identical.Used term is intended merely to description tool in the description of the invention herein
The purpose of the embodiment of body, it is not intended that in the limitation present invention.Term " and or " used herein includes one or more phases
Any and all combinations of the Listed Items of pass.
Referring to Fig. 1, showing the interface test method in first embodiment of the invention, it is applied to interface testing service
Device, the interface test method include step S01 to step S03.
Step S01 receives and parses through interface testing program, is become with the target variable and each target that obtain waiting for assignment
The assignment code of amount, it is described to wait for that the target variable of assignment includes at least one first variable and at least one second variable.
In the specific implementation, the interface testing program can be saved in mobile memory after the completion of programming software is write
In the middle, it is copied to the interface testing server when needed, institute can also be transmitted directly to after the completion of programming software is write
State interface testing server.
It should be pointed out that assignment code is the assignment approach of target variable, which when executed, will complete
To the assignment of the target variable.Therefore when writing test program, it can give each target variable corresponding assignment code.
In addition, the first variable defined above is the variable of known variables value, such as the account of test, password, it is above-mentioned
Second variable of definition is that prior known variables value (needs to combine a upper test result or the return value of certain section of test code can
Determining variate-value) variable, such as a certain test section deadline.Both variables be interface test process in, it is common
Two class variables.
The interface testing program is inputed to interface to be measured by step S02, so that the interface to be measured executes the interface
Test program.
It should be pointed out that when the interface to be measured is to test program, the interface to be measured, which will start to execute, to be somebody's turn to do
Test program, to proceed by interface testing, while in the process of interface testing, interface testing server can be supervised constantly
Survey test process.
In the specific implementation, the interface testing program, which can be segmented, inputs to interface to be measured, so that interface to be measured is sequentially
Itself corresponding different function is tested, interface to be measured can also be disposably inputed to, so that interfacing order to be measured executes
The code of interface testing program, sequentially to test corresponding function.
Step S03 becomes when the interface testing program goes to any current first variable according to described current first
The assignment code of amount calls corresponding variate-value to give current first variable in database.
Wherein, the database is the memory module of the interface testing server, is usually used in storing variate-value, also referred to as become
Measure pond.
It in the specific implementation, before testing, can be advance by the global variable value of test for the variable of known variables value
It is deposited into database, so that being stored with the variate-value of each first variable in the database.
It should be understood that according to the assignment code of each first variable, you can obtaining each first variable needs
The variate-value to be called, you can corresponding variate-value is called to give each first variable in database.
Step S04 becomes when the interface testing program goes to any current second variable according to described current second
The corresponding return value of the interface to be measured is assigned to current second variable by the assignment code of amount.
In the specific implementation, since bivariate assignment needs to test returning for code in conjunction with a upper test result or certain section
Returning value can determine, therefore when writing program, can give and link one section of prog code on bivariate node, before the section
Sequence code should be the test code for generating a upper test result or certain section of test code.For example, if A variable assignments needs B interface
Test result, then the test code of B interface can be linked at the node of A variables, to represent the test that A variables need B interface
As a result assignment is carried out;If the implementing result of A variable assignments C code again, C code can be linked at the node of A variables, to represent
A variables need the implementing result of B-code to carry out assignment.
In addition it is also necessary to, it is noted that in the present embodiment, when to test program assignment in progress, only
The update of some variate-values, the test program are still at operating status, i.e., the described interface test method is executed using side
The mode of side assignment carries out interface testing.
To sum up, the interface test method in the above embodiment of the present invention, by by known variate-value (the first variable
Value) it pre-deposits in database, when writing test program, it is only necessary to input assignment code (such as tone pitch of this class variable
Code), in the process of program parsing, test server will obtain the assignment code of each variable automatically, and according to these
Assignment code, you can call corresponding variate-value to be given to each first variable in database, to realize automatically to thing
First determine that the variable of variate-value carries out assignment;In addition, needing to test code in conjunction with a upper test result or certain section for some
The variate-value (bivariate value) that return value can determine then can increase the tax of this class variable when writing test program
Value is associated with (assignment of the variable is associated with some return value), and in the process of program parsing, test server will be certainly
The dynamic assignment association for obtaining each variable, and be associated with according to these assignment, you can the return value that test process obtains is assigned automatically
It gives to each second variable, realizes and assignment, therefore, the interface testing side are carried out to the variable of prior uncertain variables value automatically
Method is time saving and energy saving, substantially increases the efficiency of interface testing, and programmer is only it should be understood that basic call by value code,
The qualification requirement to programmer is reduced, the fully under way of interface testing is conducive to.
Referring to Fig. 2, showing the interface test method in second embodiment of the invention, it is applied to interface testing service
Device, the interface testing server connect a test client, and the interface test method includes step S11 to step S17.
Step S11 receives the interface testing program that the test client is sent.
Wherein, the test client is used to for user write test program and the input of some known variables, can be with
For the ends Web.
Step S12 traverses the interface testing program, will contain the variable of tone pitch code as the first variable, and will contain
There is the variable of return value association code as the second variable.
Step S13 obtains all tone pitch codes in the interface testing program, is become with obtaining each described first
The assignment code of amount.
In the present embodiment, the assignment code of first variable is tone pitch code (the calling generation of corresponding variate-value
Code), the form of the tone pitch code can be that { variate-value name } is such as adjusted such as int variate-values method of calling { int variate-values }
With mode $ { dict.a } $ etc. of key assignments a.
Meanwhile in the specific implementation, known variables value can be compiled according to different test events and test plan
Number storage, such as additional plan ID, project Code, variate-value title, variate-value, remark information, founder, creation time etc. into
Row storage, so that the mark for adding corresponding variate-value according to the form of above-mentioned tone pitch code can form the tone pitch of the variate-value
Code also implies that each of storage variate-value contains corresponding special tone pitch code in database, greatly convenient
The programming of programmer.
Known variables value is stored in flow chart in database referring to Fig. 3, showing, including step S21 is to walking
Rapid S22.
Step S21 receives the newly-increased variate-value of the test client input and the identification information of the newly-increased variate-value,
Include at least part identification information in the special tone pitch code of the newly-increased variate-value.
It should be understood that newly-increased variate-value and its identification information are that user edits generation on the test client
, and identification information can be plan ID, project Code, variate-value title, variate-value, remark information, founder, creation time
Deng.
Step S22, by the newly-increased variate-value and the update of identification information in database.
Wherein, the process by data update in database is:First determine whether to store in database identical
Data, if so, the replacement of data is carried out, if otherwise directly storing data.
Step S14 obtains all return value association codes in the interface testing program, each described to obtain
Bivariate assignment code.
Wherein, in return value association code code is tested comprising the test code or certain section for generating a upper test result.
The interface testing program is inputed to interface to be measured by step S15, so that the interface to be measured executes the interface
Test program.
Step S16 becomes when the interface testing program goes to any current first variable according to described current first
The assignment code of amount calls corresponding variate-value to give current first variable in database.
Step S17 becomes when the interface testing program goes to any current second variable according to described current second
The corresponding return value of the interface to be measured is assigned to current second variable and works as the interface testing journey by the assignment code of amount
When sequence goes to any current second variable, according to the current bivariate assignment code, the interface to be measured is corresponded to
Return value be assigned to current second variable.
Fig. 4 is please referred to, the interface test method showing in third embodiment of the invention, the interface in the present embodiment is surveyed
Method for testing further comprises step S31 to step S32 on the basis of second embodiment.
Step S31 judges connecing for the interface to be measured in preset time when detecting that the interface testing to be measured interrupts
Mouth tests whether to restore normal.
Wherein, when determining when the test of preset time inner joint restores normal, there is no ask representative code variable assignments
Topic, then be failure to actuate and continue to monitor, when determine preset time inner joint test do not restore normal when, representative code variable assignments
There are problems, then follow the steps S32 to S33.
Step S32 obtains currently performed variable.
Step S33 sends a miscue information to the test client, to prompt the currently performed variable to assign
Value is abnormal.
It should be understood that if variable assignments mistake, will cause test program not execute normally, it is forced to interrupt, such as
In the whether unobstructed process of test payment flow, if the information assignment mistake such as Bank Account Number or payment accounts and password, will lead
Test program is caused to interrupt.Therefore, the present embodiment obtains currently performed variable automatically when detecting that test is interrupted, and to institute
The prompt that test client sends the currently performed variable assignments mistake is stated, is understood in time convenient for user.Further, since becoming
Amount assignment needs take some time, and test code and be in when executing in the case of assignment, may in implementation procedure
Can there are flashy interruption or pause, in order to avoid being happened at the phenomenon that assignment sends out miscue under normal circumstances, this reality
It applies example and is also provided with judgment mechanism, i.e., when monitoring that interface testing interrupts, persistently judge that interface testing is in preset time
It is no to restore normal, do not restore normally just to send out miscue only in preset time, has preferably evaded the phenomenon that accidentally prompting.
Another aspect of the present invention also provides a kind of interface testing server, please refers to Fig. 5, described to implement for the present invention the 4th
Interface testing server in example, the interface testing server 10 include:
Program parsing module 11, for receiving and parsing through interface testing program, to obtain waiting for the target variable of assignment and every
The assignment code of a target variable, it is described to wait for that the target variable of assignment includes at least one first variable and at least one
Two variables;
Program input module 12, for the interface testing program to be inputed to interface to be measured, so that the interface to be measured
Execute the interface testing program;
First assignment module 13, for when the interface testing program goes to any current first variable, according to institute
The assignment code for stating current first variable calls corresponding variate-value to give current first variable in database;With
And
Second assignment module 14, for when the interface testing program goes to any current second variable, according to institute
Current bivariate assignment code is stated, the corresponding return value of the interface to be measured is assigned to current second variable.
Further, each of storage variate-value contains corresponding special tone pitch code in the database.
Further, described program parsing module 11 includes:
First Traversal Unit 111 will contain the variable of tone pitch code as described in for traversing the interface testing program
First variable.
First acquisition unit 112, it is every to obtain for obtaining all tone pitch codes in the interface testing program
The assignment code of a first variable.
Further, described program parsing module 11 further includes:
Second Traversal Unit 113 will be made for traversing the interface testing program containing the variable of return value association code
For second variable;
Second acquisition unit 114, for obtaining all return value association codes in the interface testing program, with
Obtain each bivariate assignment code.
Further, the interface testing server 10 connects a test client, and the interface testing program is via institute
Test client transmission is stated, the interface testing server 10 further includes:
Variable acquisition module 15, for when monitoring that the interface testing to be measured interrupts, obtaining currently performed variable;
Miscue module 16, it is described current to prompt for sending a miscue information to the test client
The variable assignments of execution is abnormal.
Further, the interface testing server 10 further includes:
Restore judgment module 17, it is described in preset time for when monitoring that the interface testing to be measured interrupts, judging
Whether the interface testing of interface to be measured restores normal.
Wherein, when the interface testing for determining the interface to be measured in preset time does not restore normal, the variable
Acquisition module 15 obtains currently performed variable.
Further, the interface testing server 10 further includes:
Data reception module 18 receives the newly-increased variate-value of input and the identification information of the newly-increased variate-value, described new
Increase in the special tone pitch code of variate-value comprising at least part identification information;
Data update module 19, for working as the newly-increased variate-value and the update of identification information in the database
In.
The present invention also proposes a kind of computer readable storage medium, is stored thereon with computer program, which is handled
Such as above-mentioned interface test method is realized when device executes.
The present invention also proposes a kind of interface test system, please refers to Fig. 6, show connecing in fifth embodiment of the invention
Mouth test system 100, including:
Test client 20, for writing test program for user;And
Above-mentioned interface testing server 10, for receiving the test program and testing interface to be measured.
It will be understood by those skilled in the art that in flow charts indicate or logic described otherwise above herein and/or
Step may be embodied in and appoint for example, being considered the order list of the executable instruction for realizing logic function
In what computer-readable medium, for instruction execution system, device or equipment (such as computer based system including processor
System or other can be from instruction execution system, device or equipment instruction fetch and the system executed instruction) use, or combine this
A little instruction execution systems, device or equipment and use.For the purpose of this specification, " computer-readable medium " can be it is any can be with
Including, store, communicate, propagate, or transport program for instruction execution system, device or equipment or combine these instruction execution systems
System, device or equipment and the device used.
The more specific example (non-exhaustive list) of computer-readable medium includes following:It is connected up with one or more
Electrical connection section (electronic device), portable computer diskette box (magnetic device), random access memory (RAM), read-only memory
(ROM), erasable edit read-only storage (EPROM or flash memory), fiber device and portable optic disk is read-only deposits
Reservoir (CDROM).In addition, computer-readable medium can even is that the paper that can print described program on it or other are suitable
Medium, because can be for example by carrying out optical scanner to paper or other media, then into edlin, interpretation or when necessary with it
His suitable method is handled electronically to obtain described program, is then stored in computer storage.
It should be appreciated that each section of the present invention can be realized with hardware, software, firmware or combination thereof.Above-mentioned
In embodiment, software that multiple steps or method can in memory and by suitable instruction execution system be executed with storage
Or firmware is realized.It, and in another embodiment, can be under well known in the art for example, if realized with hardware
Any one of row technology or combination thereof are realized:With the logic gates for realizing logic function to data-signal
Discrete logic, with suitable combinational logic gate circuit application-specific integrated circuit, programmable gate array (PGA), scene
Programmable gate array (FPGA) etc..
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show
The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example
Point is included at least one embodiment or example of the invention.In the present specification, schematic expression of the above terms are not
Centainly refer to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be any
One or more embodiments or example in can be combined in any suitable manner.
Several embodiments of the invention above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously
Cannot the limitation to the scope of the claims of the present invention therefore be interpreted as.It should be pointed out that for those of ordinary skill in the art
For, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the guarantor of the present invention
Protect range.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.
Claims (10)
1. a kind of interface test method is applied to interface testing server, which is characterized in that including:
Interface testing program is received and parsed through, to obtain waiting for the target variable of assignment and the assignment generation of each target variable
Code, it is described to wait for that the target variable of assignment includes at least one first variable and at least one second variable;
The interface testing program is inputed into interface to be measured, so that the interface to be measured executes the interface testing program;
When the interface testing program goes to any current first variable, according to the assignment generation of current first variable
Code, calls corresponding variate-value to give current first variable in database;And
When the interface testing program goes to any current second variable, according to the current bivariate assignment generation
The corresponding return value of the interface to be measured is assigned to current second variable by code.
2. interface test method according to claim 1, which is characterized in that each of storage is described in the database
Variate-value contains corresponding special tone pitch code.
3. interface test method according to claim 2, which is characterized in that the step of parsing interface testing program wraps
It includes:
The interface testing program is traversed, the variable of tone pitch code will be contained as first variable;
All tone pitch codes in the interface testing program are obtained, to obtain the assignment generation of each first variable
Code.
4. interface test method according to claim 1, which is characterized in that the step of parsing interface testing program wraps
It includes:
The interface testing program is traversed, the variable of return value association code will be contained as second variable;
All return value association codes in the interface testing program are obtained, to obtain each bivariate tax
It is worth code.
5. interface test method according to claim 1, which is characterized in that one test of interface testing server connection
Client, the interface testing program are sent via the test client, and the interface test method further includes:
When detecting that the interface testing of the interface to be measured interrupts, currently performed variable is obtained;
A miscue information is sent to the test client, to prompt the currently performed variable assignments abnormal.
6. interface test method according to claim 5, which is characterized in that in the step for obtaining currently performed variable
Before rapid, further include:
Judge whether the interface testing of the interface to be measured in preset time restores normal;
If it is not, the step of then executing the acquisition currently performed variable.
7. interface test method according to claim 2, which is characterized in that further include:
Receive the newly-increased variate-value of input and the identification information of the newly-increased variate-value, the special tone pitch generation of the newly-increased variate-value
Include at least part identification information in code;
By the newly-increased variate-value and the update of identification information in the database.
8. a kind of interface testing server, which is characterized in that including:
Program parsing module, for receiving and parsing through interface testing program, to obtain waiting for the target variable of assignment and each described
The assignment code of target variable, it is described to wait for that the target variable of assignment includes that at least one first variable and at least one second become
Amount;
Program input module, for the interface testing program to be inputed to interface to be measured, so that the interface to be measured executes institute
State interface testing program;
First assignment module, for when the interface testing program goes to any current first variable, according to described current
The assignment code of first variable calls corresponding variate-value to give current first variable in database;And
Second assignment module, for when the interface testing program goes to any current second variable, according to described current
The corresponding return value of the interface to be measured is assigned to current second variable by bivariate assignment code.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is held by processor
The method as described in claim 1-7 is any is realized when row.
10. a kind of interface test system, which is characterized in that including:
Test client, for writing test program for user;And
Interface testing server according to any one of claims 8, for receiving the test program and testing interface to be measured.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810235812.2A CN108563539A (en) | 2018-03-21 | 2018-03-21 | Interface testing method, server, readable storage medium and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810235812.2A CN108563539A (en) | 2018-03-21 | 2018-03-21 | Interface testing method, server, readable storage medium and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108563539A true CN108563539A (en) | 2018-09-21 |
Family
ID=63533027
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810235812.2A Pending CN108563539A (en) | 2018-03-21 | 2018-03-21 | Interface testing method, server, readable storage medium and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108563539A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109359045A (en) * | 2018-10-16 | 2019-02-19 | 武汉斗鱼网络科技有限公司 | A kind of test method, device, equipment and storage medium |
CN110334023A (en) * | 2019-06-28 | 2019-10-15 | 京东数字科技控股有限公司 | A kind of testing process applied to website determines method and apparatus |
CN110879781A (en) * | 2019-11-06 | 2020-03-13 | 北京奇艺世纪科技有限公司 | Program debugging method and device, electronic equipment and computer readable storage medium |
CN110968500A (en) * | 2018-09-30 | 2020-04-07 | 北京国双科技有限公司 | Test case execution method and device |
CN111338958A (en) * | 2020-02-28 | 2020-06-26 | 中国平安人寿保险股份有限公司 | Parameter generation method and device of test case and terminal equipment |
CN111506492A (en) * | 2019-01-31 | 2020-08-07 | 百度在线网络技术(北京)有限公司 | Application program testing method and device, equipment and storage medium |
CN115687140A (en) * | 2022-11-10 | 2023-02-03 | 江苏衫数科技集团有限公司 | Test case compiling method and system based on automatic test |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101241466A (en) * | 2007-02-08 | 2008-08-13 | 深圳迈瑞生物医疗电子股份有限公司 | Embedded software test method and system |
CN102096631A (en) * | 2009-12-11 | 2011-06-15 | 华为技术有限公司 | Interface testing method and device |
CN106407111A (en) * | 2016-09-07 | 2017-02-15 | 努比亚技术有限公司 | Terminal test apparatus, terminal test device and variable maintenance method |
CN107026773A (en) * | 2017-05-16 | 2017-08-08 | 四川长虹电器股份有限公司 | Automatic correlation method for interface automatic test |
CN107480053A (en) * | 2017-07-21 | 2017-12-15 | 杭州销冠网络科技有限公司 | A kind of Software Test Data Generation Method and device |
-
2018
- 2018-03-21 CN CN201810235812.2A patent/CN108563539A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101241466A (en) * | 2007-02-08 | 2008-08-13 | 深圳迈瑞生物医疗电子股份有限公司 | Embedded software test method and system |
CN102096631A (en) * | 2009-12-11 | 2011-06-15 | 华为技术有限公司 | Interface testing method and device |
CN106407111A (en) * | 2016-09-07 | 2017-02-15 | 努比亚技术有限公司 | Terminal test apparatus, terminal test device and variable maintenance method |
CN107026773A (en) * | 2017-05-16 | 2017-08-08 | 四川长虹电器股份有限公司 | Automatic correlation method for interface automatic test |
CN107480053A (en) * | 2017-07-21 | 2017-12-15 | 杭州销冠网络科技有限公司 | A kind of Software Test Data Generation Method and device |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110968500A (en) * | 2018-09-30 | 2020-04-07 | 北京国双科技有限公司 | Test case execution method and device |
CN109359045B (en) * | 2018-10-16 | 2022-01-04 | 武汉斗鱼网络科技有限公司 | Test method, device, equipment and storage medium |
CN109359045A (en) * | 2018-10-16 | 2019-02-19 | 武汉斗鱼网络科技有限公司 | A kind of test method, device, equipment and storage medium |
CN111506492A (en) * | 2019-01-31 | 2020-08-07 | 百度在线网络技术(北京)有限公司 | Application program testing method and device, equipment and storage medium |
CN111506492B (en) * | 2019-01-31 | 2023-05-26 | 百度在线网络技术(北京)有限公司 | Application program testing method and device, equipment and storage medium |
CN110334023A (en) * | 2019-06-28 | 2019-10-15 | 京东数字科技控股有限公司 | A kind of testing process applied to website determines method and apparatus |
CN110334023B (en) * | 2019-06-28 | 2023-09-26 | 京东科技控股股份有限公司 | Test flow determining method and device applied to website |
CN110879781A (en) * | 2019-11-06 | 2020-03-13 | 北京奇艺世纪科技有限公司 | Program debugging method and device, electronic equipment and computer readable storage medium |
CN110879781B (en) * | 2019-11-06 | 2023-10-03 | 北京奇艺世纪科技有限公司 | Program debugging method, device, electronic equipment and computer readable storage medium |
CN111338958A (en) * | 2020-02-28 | 2020-06-26 | 中国平安人寿保险股份有限公司 | Parameter generation method and device of test case and terminal equipment |
CN111338958B (en) * | 2020-02-28 | 2024-09-13 | 中国平安人寿保险股份有限公司 | Parameter generation method and device for test cases and terminal equipment |
CN115687140A (en) * | 2022-11-10 | 2023-02-03 | 江苏衫数科技集团有限公司 | Test case compiling method and system based on automatic test |
CN115687140B (en) * | 2022-11-10 | 2024-01-30 | 江苏衫数科技集团有限公司 | Test case writing method and system based on automatic test |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108563539A (en) | Interface testing method, server, readable storage medium and system | |
US8452629B2 (en) | Work packet enabled active project schedule maintenance | |
US8375370B2 (en) | Application/service event root cause traceability causal and impact analyzer | |
CN103164328B (en) | The regression testing method of a kind of business function, Apparatus and system | |
US20100031234A1 (en) | Supporting a work packet request with a specifically tailored ide | |
CN108446223B (en) | Business scene automatic testing method based on dynamic compilation | |
US8219523B2 (en) | Data quality enrichment integration and evaluation system | |
CN103473342A (en) | Report data generating method and system | |
CN101339532A (en) | Web application system automatized test method and apparatus | |
Kirbas et al. | The relationship between evolutionary coupling and defects in large industrial software | |
CN108845940A (en) | A kind of enterprise information system automated function test method and system | |
US11544050B1 (en) | Software patch automation | |
Kobayashi et al. | Need-based requirements change management | |
CN112433944A (en) | Service testing method, device, computer equipment and storage medium | |
CN110413316A (en) | Non-intrusion type test macro and method towards block chain intelligence contract | |
CN103186463B (en) | Determine the method and system of the test specification of software | |
CN104133768A (en) | Program code review method and program code review device | |
CN102968371A (en) | Method and device for testing JAVA API unit component | |
CN106629277A (en) | Method, device and system for debugging operation instruction of elevator | |
CN104142959A (en) | Automated test device and method based on expert knowledge database | |
US20220269497A1 (en) | System and method using natural language processing to synthesize and build infrastructure platforms | |
CN116756046B (en) | Automatic interface testing method, device, equipment and storage medium | |
KR102111392B1 (en) | Test unified administration system and Controlling Method for the Same | |
Slyngstad et al. | The impact of test driven development on the evolution of a reusable framework of components–an industrial case study | |
Seehusen | A technique for risk-based test procedure identification, prioritization and selection |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180921 |
|
RJ01 | Rejection of invention patent application after publication |