CN110196809A - Interface test method and device - Google Patents
Interface test method and device Download PDFInfo
- Publication number
- CN110196809A CN110196809A CN201910461244.2A CN201910461244A CN110196809A CN 110196809 A CN110196809 A CN 110196809A CN 201910461244 A CN201910461244 A CN 201910461244A CN 110196809 A CN110196809 A CN 110196809A
- Authority
- CN
- China
- Prior art keywords
- interface
- source code
- tested
- testing
- data
- 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/362—Software debugging
- G06F11/3644—Software debugging by instrumenting at runtime
Abstract
The embodiment of the present invention provides a kind of interface test method and device, and method includes: the entrance using default exploitation environment registration target plug-in and the interface message for parsing source code to be tested, and interface message includes the execution route and parameter of interface;The interface testing select command for treating any means selected in test source code is received, the interface testing selection instruction is responded, by target plug-in, the interface message of source code to be tested is shown;Receiving interface test execution order, pass through target plug-in, the data for receiving parameter of the user based on the interface in the interface message of displaying and inputting, and the execution route based on interface and the data of input treat method selected in test source code and carry out interface testing operation.The trouble of tool switching can be saved, plug and play solves the problems, such as interface testing in developing instrument, promotes interface testing efficiency, can automatically parse interface execution route and parameter, effectively save parameter and copy step back and forth.
Description
Technical field
The present embodiments relate to field of computer technology more particularly to a kind of interface test methods and device.
Background technique
The most important link of software project development is exactly the unit testing of project data interface, but many exploit persons
Member is since project duration or testing process are comparatively laborious, so neglect such a important link, directly just having developed
Function submits to tester's test, eventually leads to the version poor quality of submission, since system bug (loophole) is relatively more, surveys
Examination progress is slow, can seriously affect project later period fltting speed in this way.
Currently, this link of interface testing is mainly by third parties' interface testing tool such as POSTMAN, RESLET_CLIENT
It supports, but at present using needs when third parties' interface testing tools such as POSTMAN, RESLET_CLIENT and developing instrument
Between toggle, the process CIMS for carrying out interface testing is cumbersome;Moreover, using the thirds such as POSTMAN, RESLET_CLIENT
When square interface testing tool carries out interface testing, need parameter and path manual copy to these third party's interface testing tools
The inside can waste the plenty of time when parameter is more.
Summary of the invention
In view of the problems of the existing technology, the embodiment of the present invention provides a kind of interface test method and device.
The embodiment of the present invention provides a kind of interface test method, comprising:
The custom menu registering functional provided using default exploitation environment, registers the entrance of target plug-in;
Using default exploitation environment, the interface message of source code to be tested is parsed, the interface message includes: interface
The parameter of execution route and interface;
The interface testing select command to any means selected in the source code to be tested is received, the interface is responded
The interface message of the source code to be tested is shown by test selection instruction by the target plug-in;
Receiving interface test execution order receives user based in the interface message shown by the target plug-in
Interface parameter and the data that input, and the execution route of the data based on user's input and the interface parsed, to described
Method selected in source code to be tested carries out interface testing operation.
Optionally, the interface message further include: the request method of interface;
Correspondingly, the execution route of the data and the interface parsed based on user's input, to the source to be tested
Method selected in code carries out interface testing operation, comprising:
The execution route of data and the interface parsed based on user's input, utilizes the requesting party of the interface parsed
Formula carries out interface testing operation to method selected in the source code to be tested.
Optionally, the default exploitation environment is the exploitation environment for supporting customized exploitation plug-in unit, comprising: intellij
Idea develops environment.
Optionally, described using default exploitation environment, parse the interface message of source code to be tested, comprising:
The openapi.jar packet provided using intellij idea exploitation environment, parses the interface of source code to be tested
Information.
Optionally, interface testing select command of the reception to any means selected in the source code to be tested,
The interface testing selection instruction is responded, by the target plug-in, the interface message of the source code to be tested is opened up
Show, comprising:
The interface testing select command to any means selected in the source code to be tested is received, the interface is responded
Selection instruction is tested, the interface message of the source code to be tested is opened up in the user of the target plug-in using interface
Show.
Optionally, in the execution route of the data inputted based on user and the interface parsed, to the source generation to be tested
After method selected in code carries out interface testing operation, the method also includes:
The test result data of data and the operation of this interface testing that this user inputs is stored, and again
When receiving the interface testing select command to the method that the operation of this interface testing had been tested in the source code to be tested,
The data this user of storage inputted by the target plug-in and the test result data of this interface testing operation into
Row is shown.
Optionally, the data that this user is inputted and the test result data of this interface testing operation are deposited
Storage, comprising:
Using Redis database, the test result data of the data that this user is inputted and the operation of this interface testing
It is stored.
The embodiment of the present invention provides a kind of interface test device, comprising:
Registration module, the custom menu registering functional for using default exploitation environment to provide, registers target plug-in
Entrance;
Parsing module, for parsing the interface message of source code to be tested, the interface letter using default exploitation environment
Breath includes: the execution route of interface and the parameter of interface;
Display module, for receiving the interface testing selection life to any means selected in the source code to be tested
It enables, responds the interface testing selection instruction, by the target plug-in, the interface message of the source code to be tested is carried out
It shows;
Test module is used for the order of receiving interface test execution, receives user by the target plug-in and is based on being shown
Interface message in interface parameter and the data that input, and the execution of the data based on user's input and the interface parsed
Path carries out interface testing operation to method selected in the source code to be tested.
The embodiment of the present invention provides a kind of electronic equipment, including memory, processor and storage are on a memory and can be
The computer program run on processor, the processor are realized when executing described program such as the step of the above method.
Interface test method and device provided in an embodiment of the present invention are provided customized by using default exploitation environment
The entrance of menu registration function register target plug-in parses the interface message of source code to be tested using default exploitation environment,
Interface message includes: the execution route of interface and the parameter of interface, receives and treats any means selected in test source code
Interface testing select command responds the interface testing selection instruction, is believed the interface of source code to be tested by target plug-in
Breath is shown, receiving interface test execution order, receives user based in the interface message shown by target plug-in
The parameter of interface and the data inputted, and the execution route of the data based on user's input and the interface parsed treats test source
Method selected in code carries out interface testing operation, thereby, it is possible to develop environment exploitation target plug-in using default, not
On the basis of influencing developer's normal operation process, using target plug-in plug and play, the trouble of tool switching is saved, is being opened
Just solves the problems, such as interface testing inside hair tool, promotes interface testing efficiency, can automatically parse the execution route of outgoing interface with
Parameter effectively saves the step of parameter copies back and forth between developing instrument and third party's interface testing tool in the prior art.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is this hair
Bright some embodiments for those of ordinary skill in the art without creative efforts, can be with root
Other attached drawings are obtained according to these attached drawings.
Fig. 1 is a kind of flow diagram for interface test method that one embodiment of the invention provides;
Fig. 2 is use of the interface message provided in an embodiment of the present invention by the source code to be tested in the target plug-in
A kind of example schematic that family is shown using interface;
Fig. 3 is a kind of structural schematic diagram for interface test device that one embodiment of the invention provides;
Fig. 4 is the entity structure schematic diagram for the electronic equipment that one embodiment of the invention provides.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
Every other embodiment obtained without creative efforts, shall fall within the protection scope of the present invention.
Fig. 1 shows a kind of flow diagram of interface test method of one embodiment of the invention offer, as shown in Figure 1,
The interface test method of the present embodiment, comprising:
S1, the custom menu registering functional provided using default exploitation environment, register the entrance of target plug-in.
It is understood that presetting exploitation environment described in the present embodiment is the exploitation environment for supporting customized exploitation plug-in unit.
It should be noted that the executing subject of the present embodiment the method is processor.
S2, using default exploitation environment, parse the interface message of source code to be tested, the interface message can wrap
It includes: the execution route of interface and the parameter of interface etc..
In a particular application, for example, the parameter of the interface may include: label (label), keyword (crucial
Word), type (type), nationId (country identification), userCode (user code), platform (platform), pageNo (page
Number), pageSize (page-size) etc., the present embodiment is not limited.
S3, interface testing select command to any means selected in the source code to be tested is received, described in response
The interface message of the source code to be tested is shown by interface testing selection instruction by the target plug-in.
It is understood that the present embodiment be by the interface message of the source code to be tested the target plug-in use
Family is shown using interface, for example, the user is carried out using the SWING development kit that JAVA can be used in interface
It writes, the present embodiment is not limited.
S4, receiving interface test execution order receive user based on the interface message shown by the target plug-in
In interface parameter and the data that input, and the execution route of the data based on user's input and the interface parsed, to institute
It states method selected in source code to be tested and carries out interface testing operation.
It is understood that the interface message of the source code to be tested is shown it by the target plug-in
Afterwards, user based on the interface message shown, can input the value of the parameters of setting interface, receiving interface test execution life
It enables, by the target plug-in, can receive the value that user inputs the parameters for the interface being arranged, setting is inputted according to user
The execution route of the value of the parameters of interface and the interface parsed, to method selected in the source code to be tested into
Line interface test operation obtains interface testing result.
It is understood that needing the parameter of execution route and interface based on interface to be connect when executing interface testing
Mouth test operation;And interface testing needs are executed in the prior art, parameter and path manual copy are connect to used third party
Inside mouth testing tool, the plenty of time can be wasted when parameter is more.The present embodiment using default exploitation environment, parse to
The interface messages such as the execution route of the interface of source code and the parameter of interface are tested, parameter in the prior art can be effectively saved and exist
The step of copying back and forth between developing instrument and third party's interface testing tool, effectively improves interface testing efficiency.
Interface test method provided in an embodiment of the present invention is infused by using the custom menu that default exploitation environment provides
The entrance of volume function register target plug-in parses the interface message of source code to be tested, interface letter using default exploitation environment
Breath includes: the execution route of interface and the parameter of interface, receives the interface survey for treating any means selected in test source code
Select command is tried, the interface testing selection instruction is responded, is carried out the interface message of source code to be tested by target plug-in
It shows, receiving interface test execution order, user is received based on the interface in the interface message shown by target plug-in
Parameter and the data inputted, and the execution route of the data based on user's input and the interface parsed is treated in test source code
Selected method carries out interface testing operation, and thereby, it is possible to not influence out using default exploitation environment exploitation target plug-in
On the basis of hair personnel's normal operation process, using target plug-in plug and play, the trouble of tool switching is saved, in developing instrument
The inside just solves the problems, such as interface testing, promotes interface testing efficiency, can automatically parse the execution route and parameter of outgoing interface, have
Effect saves the step of parameter copies back and forth between developing instrument and third party's interface testing tool in the prior art.
Further, on the basis of the above embodiments, the interface message can also include: the request method of interface
Deng the present embodiment is not limited.When the interface message further include: correspondingly, described when the request method of interface
Data based on user's input and the execution route of interface parsed, to method selected in the source code to be tested into
Line interface test operation, may particularly include: the execution route of data and the interface parsed based on user's input utilizes parsing
The request method of interface out carries out interface testing operation to method selected in the source code to be tested.
In a particular application, can by taking Fig. 2 as an example in the present embodiment by the interface message of the source code to be tested in institute
The user for stating target plug-in is shown using interface to be further illustrated.Fig. 2 is connecing the source code to be tested
A kind of example schematic that message breath is shown in the user of the target plug-in using interface.Interface in Fig. 2 is target
The main interface of plug-in unit and the execution interface of interface testing, in figure: first behavior URL (uniform resource locator) subsequent record
Entering frame and being defaulted as local interface host (host) can change, and typing frame is followed by the interface execution route obtained automatically;Second row
Record is executed for interface host, will be updated the first row data when choosing;3rd the-the 10 row of row is all that target plug-in is automatic
The parameter of the interface parsed, tester only need behind face correspond to typing frame filling parameter value, then click ok (really
Recognize) button can test interface, click cancel (cancellation) button then cancel test interface;The text box field of 11st row is ginseng
Several executes record, and click chooses parameter value that can be filled into automatically behind corresponding parameter, this record includes other of project
The test record of developer realizes the effect of shared test data with this.The last one text box field is connect for showing
The result that mouth executes;Last row is operation button and comprising some requests are time-consuming and status status information.
In this way, the present embodiment can use the interface message of the source code to be tested in the user of the target plug-in
Interface is shown.
Further, on the basis of the above embodiments, the default exploitation environment is to support customized exploitation plug-in unit
Environment is developed, may include: intellij idea exploitation environment etc., the present embodiment is not limited.
It is understood that functional development target of the present embodiment using the default customized exploitation plug-in unit of exploitation Environmental Support
Plug-in unit, can be on the basis of not influencing developer's normal operation process, and using target plug-in plug and play, the tool of saving is cut
The trouble changed just solves the problems, such as interface testing inside developing instrument, promotes interface testing efficiency.
Further, when the default exploitation environment is that intellij idea develops environment, the step S2 be can wrap
It includes: being provided using intellij idea exploitation environment, parse the interface message of source code to be tested.
It is understood that existing intellij idea exploitation environment is provided with open platform openapi.jar packet,
The present embodiment utilizes openapi.jar packet, can parse the interface message of source code to be tested.
Further, on the basis of the above embodiments, after the step S4, the present embodiment the method can be with
Include:
The test result data of data and the operation of this interface testing that this user inputs is stored, and again
When receiving the interface testing select command to the method that the operation of this interface testing had been tested in the source code to be tested,
The data this user of storage inputted by the target plug-in and the test result data of this interface testing operation into
Row is shown.
In a particular application, for example, can use Redis database, the data that this user is inputted and this
The test result data of interface testing operation is stored, and the present embodiment is not limited.
It is understood that the data that this user is inputted and the test result data of this interface testing operation carry out
After storage, the interface parameters value that this interface testing can be made to operate is shared automatically, this interface can be used directly in other staff
The test case of test operation effectively improves developer's interface testing rate and testing efficiency.
Interface test method provided in an embodiment of the present invention, can be using default exploitation environment exploitation target plug-in, not
On the basis of influencing developer's normal operation process, using target plug-in plug and play, the trouble of tool switching is saved, is being opened
Just solves the problems, such as interface testing inside hair tool, promotes interface testing efficiency, can automatically parse the execution route of outgoing interface with
Parameter effectively saves the step of parameter copies back and forth between developing instrument and third party's interface testing tool in the prior art.
Fig. 3 shows a kind of structural schematic diagram of interface test device of one embodiment of the invention offer, as shown in figure 3,
The interface test device of the present embodiment, comprising: registration module 31, parsing module 32, display module 33 and test module 34;Its
In:
The registration module 31, the custom menu registering functional for using default exploitation environment to provide, registers target
The entrance of plug-in unit;
The parsing module 32, it is described for parsing the interface message of source code to be tested using default exploitation environment
Interface message includes: the execution route of interface and the parameter of interface;
The display module 33, for receiving the interface testing choosing to any means selected in the source code to be tested
Order is selected, the interface testing selection instruction is responded, by the target plug-in, by the interface message of the source code to be tested
It is shown;
The test module 34 is used for the order of receiving interface test execution, by the target plug-in, receives user and is based on
The parameter of the interface in interface message shown and the data inputted, and the data based on user's input and the interface parsed
Execution route, to method selected in the source code to be tested carry out interface testing operation.
Specifically, the custom menu registering functional that the registration module 31 is provided using default exploitation environment, registers mesh
Mark the entrance of plug-in unit;The parsing module 32 parses the interface message of source code to be tested using default exploitation environment, described
Interface message includes: the execution route of interface and the parameter of interface;The display module 33 is received to the source code to be tested
The interface testing select command of any means of middle selection responds the interface testing selection instruction, by the target plug-in,
The interface message of the source code to be tested is shown;The 34 receiving interface test execution order of test module, passes through
The target plug-in receives parameter of the user based on the interface in the interface message shown and the data that input, and based on using
The data of family input and the execution route of the interface parsed, carry out interface to method selected in the source code to be tested
Test operation.
It is understood that presetting exploitation environment described in the present embodiment is the exploitation environment for supporting customized exploitation plug-in unit.
It should be noted that the present embodiment described device is applied to processor.
In a particular application, for example, the parameter of the interface may include: label (label), keyword (crucial
Word), type (type), nationId (country identification), userCode (user code), platform (platform), pageNo (page
Number), pageSize (page-size) etc., the present embodiment is not limited.
It is understood that the present embodiment be by the interface message of the source code to be tested the target plug-in use
Family is shown using interface, for example, the user is carried out using the SWING development kit that JAVA can be used in interface
It writes, the present embodiment is not limited.
It is understood that the interface message of the source code to be tested is shown it by the target plug-in
Afterwards, user based on the interface message shown, can input the value of the parameters of setting interface, receiving interface test execution life
It enables, by the target plug-in, can receive the value that user inputs the parameters for the interface being arranged, setting is inputted according to user
The execution route of the value of the parameters of interface and the interface parsed, to method selected in the source code to be tested into
Line interface test operation obtains interface testing result.
It is understood that needing the parameter of execution route and interface based on interface to be connect when executing interface testing
Mouth test operation;And interface testing needs are executed in the prior art, parameter and path manual copy are connect to used third party
Inside mouth testing tool, the plenty of time can be wasted when parameter is more.The present embodiment using default exploitation environment, parse to
The interface messages such as the execution route of the interface of source code and the parameter of interface are tested, parameter in the prior art can be effectively saved and exist
The step of copying back and forth between developing instrument and third party's interface testing tool, effectively improves interface testing efficiency.
Interface test device provided in an embodiment of the present invention, can be using default exploitation environment exploitation target plug-in, not
On the basis of influencing developer's normal operation process, using target plug-in plug and play, the trouble of tool switching is saved, is being opened
Just solves the problems, such as interface testing inside hair tool, promotes interface testing efficiency, can automatically parse the execution route of outgoing interface with
Parameter effectively saves the step of parameter copies back and forth between developing instrument and third party's interface testing tool in the prior art.
Further, on the basis of the above embodiments, the interface message can also include: the request method of interface
Deng the present embodiment is not limited.When the interface message further include: correspondingly, described when the request method of interface
Test module 34 can be specifically used for the order of receiving interface test execution, by the target plug-in, receive user and be based on being shown
Interface message in interface parameter and the data that input, and the execution of the data based on user's input and the interface parsed
Path carries out interface testing to method selected in the source code to be tested using the request method of the interface parsed
Operation.
In a particular application, can by taking Fig. 2 as an example in the present embodiment by the interface message of the source code to be tested in institute
The user for stating target plug-in is shown using interface to be further illustrated.Fig. 2 is connecing the source code to be tested
A kind of example schematic that message breath is shown in the user of the target plug-in using interface.Interface in Fig. 2 is target
The main interface of plug-in unit and the execution interface of interface testing, in figure: the subsequent typing frame of the first behavior URL is defaulted as local connect
Mouth host (host) can be changed, and typing frame is followed by the interface execution route obtained automatically;The execution of second behavior interface host
Record, will be updated the first row data when choosing;3rd the-the 10 row of row is all the interface that target plug-in automatically parses out
Parameter, tester only need behind face correspond to typing frame filling parameter value, then click ok (confirmation) button can test
Interface clicks cancel (cancellation) button and then cancels test interface;The text box field of 11st row is the record that executes of parameter, point
It hits and chooses parameter value that can be filled into automatically behind corresponding parameter, this record includes the test note of other developers of project
Record, the effect of shared test data is realized with this.The last one text box field is the result executed for showing interface;Most
Latter row is operation button and comprising some requests are time-consuming and status status information.
In this way, the present embodiment can use the interface message of the source code to be tested in the user of the target plug-in
Interface is shown.
Further, on the basis of the above embodiments, the default exploitation environment is to support customized exploitation plug-in unit
Environment is developed, may include: intellij idea exploitation environment etc., the present embodiment is not limited.
It is understood that functional development target of the present embodiment using the default customized exploitation plug-in unit of exploitation Environmental Support
Plug-in unit, can be on the basis of not influencing developer's normal operation process, and using target plug-in plug and play, the tool of saving is cut
The trouble changed just solves the problems, such as interface testing inside developing instrument, promotes interface testing efficiency.
Further, when the default exploitation environment is that intellij idea develops environment, the parsing module 32 can
To be specifically used for
It is provided using intellij idea exploitation environment, parses the interface message of source code to be tested.
It is understood that existing intellij idea exploitation environment is provided with open platform openapi.jar packet,
The present embodiment utilizes openapi.jar packet, can parse the interface message of source code to be tested.
Further, on the basis of the above embodiments, the present embodiment described device can also include not shown in the figure:
The test result data of memory module, data and the operation of this interface testing for inputting this user carries out
Storage, and the interface for the method that the operation of this interface testing had been tested in the source code to be tested is surveyed receiving again
When trying select command, by the target plug-in, the data that this user of storage is inputted and the operation of this interface testing
Test result data is shown.
In a particular application, for example, the memory module can use Redis database, this user is inputted
Data and this interface testing operation test result data stored, the present embodiment is not limited.
It is understood that the data that this user is inputted and the test result data of this interface testing operation carry out
After storage, the interface parameters value that this interface testing can be made to operate is shared automatically, this interface can be used directly in other staff
The test case of test operation effectively improves developer's interface testing rate and testing efficiency.
Interface test device provided in an embodiment of the present invention, can be using default exploitation environment exploitation target plug-in, not
On the basis of influencing developer's normal operation process, using target plug-in plug and play, the trouble of tool switching is saved, is being opened
Just solves the problems, such as interface testing inside hair tool, promotes interface testing efficiency, can automatically parse the execution route of outgoing interface with
Parameter effectively saves the step of parameter copies back and forth between developing instrument and third party's interface testing tool in the prior art.
Interface test device provided in an embodiment of the present invention can be used for executing the technical solution of preceding method embodiment,
That the realization principle and technical effect are similar is similar for it, and details are not described herein again.
Fig. 4 shows the entity structure schematic diagram of a kind of electronic equipment of one embodiment of the invention offer, as shown in figure 4,
The electronic equipment may include memory 402, processor 401 and be stored on memory 402 and can run on processor 401
Computer program, the step of processor 401 realizes the above method when executing described program, for example, using default
The custom menu registering functional that environment provides is developed, the entrance of target plug-in is registered;Using default exploitation environment, parse to
The interface message of source code is tested, the interface message includes: the execution route of interface and the parameter of interface;Receive to it is described to
The interface testing select command of any means selected in test source code, responds the interface testing selection instruction, passes through institute
Target plug-in is stated, the interface message of the source code to be tested is shown;Receiving interface test execution order, by described
Target plug-in receives parameter of the user based on the interface in the interface message shown and the data that input, and defeated based on user
The execution route of the data entered and the interface parsed carries out interface testing to method selected in the source code to be tested
Operation.
The embodiment of the present invention provides a kind of non-transient computer readable storage medium, is stored thereon with computer program, should
The step of above method is realized when computer program is executed by processor, for example, using default exploitation environment provide from
Menu registration function is defined, the entrance of target plug-in is registered;Using default exploitation environment, the interface of source code to be tested is parsed
Information, the interface message include: the execution route of interface and the parameter of interface;It receives to being selected in the source code to be tested
Any means interface testing select command, respond the interface testing selection instruction, will be described by the target plug-in
The interface message of source code to be tested is shown;Receiving interface test execution order receives user by the target plug-in
Parameter based on the interface in the interface message shown and the data inputted, and data based on user's input and parse
The execution route of interface carries out interface testing operation to method selected in the source code to be tested.
The apparatus embodiments described above are merely exemplary, wherein described, unit can as illustrated by the separation member
It is physically separated with being or may not be, component shown as a unit may or may not be physics list
Member, it can it is in one place, or may be distributed over multiple network units.It can be selected according to the actual needs
In some or all of the modules achieve the purpose of the solution of this embodiment.Those of ordinary skill in the art are not paying creativeness
Labour in the case where, it can understand and implement.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can
It realizes by means of software and necessary general hardware platform, naturally it is also possible to pass through hardware.Based on this understanding, on
Stating technical solution, substantially the part that contributes to existing technology can be embodied in the form of software products in other words, should
Computer software product may be stored in a computer readable storage medium, such as ROM/RAM, magnetic disk, CD, including several fingers
It enables and using so that a computer equipment (can be personal computer, server or the network equipment etc.) executes each implementation
Method described in certain parts of example or embodiment.
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although
Present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: it still may be used
To modify the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features;
And these are modified or replaceed, technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution spirit and
Range.
Claims (10)
1. a kind of interface test method characterized by comprising
The custom menu registering functional provided using default exploitation environment, registers the entrance of target plug-in;
Using default exploitation environment, the interface message of source code to be tested is parsed, the interface message includes: the execution of interface
The parameter in path and interface;
The interface testing select command to any means selected in the source code to be tested is received, the interface testing is responded
The interface message of the source code to be tested is shown by selection instruction by the target plug-in;
Receiving interface test execution order receives user based on connecing in the interface message shown by the target plug-in
Mouthful parameter and the data that input, and the execution route of the data based on user's input and the interface parsed, to described to be measured
It tries method selected in source code and carries out interface testing operation.
2. the method according to claim 1, wherein the interface message further include: the request method of interface;
Correspondingly, the execution route of the data and the interface parsed based on user's input, to the source code to be tested
Selected in method carry out interface testing operation, comprising:
The execution route of data and the interface parsed based on user's input, it is right using the request method of the interface parsed
Method selected in the source code to be tested carries out interface testing operation.
3. the method according to claim 1, wherein the default exploitation environment is to support customized exploitation plug-in unit
Exploitation environment, comprising: intellij idea develop environment.
4. according to the method described in claim 3, it is characterized in that, the default exploitation environment of the use, parses source to be tested
The interface message of code, comprising:
The openapi.jar packet provided using intellij idea exploitation environment parses the interface letter of source code to be tested
Breath.
5. according to the method described in claim 3, it is characterized in that, described receive is appointed to what is selected in the source code to be tested
The interface testing select command of meaning method responds the interface testing selection instruction, will be described to be measured by the target plug-in
The interface message of examination source code is shown, comprising:
The interface testing select command to any means selected in the source code to be tested is received, the interface testing is responded
The interface message of the source code to be tested is shown in the user of the target plug-in using interface by selection instruction.
6. the method according to claim 1, wherein in the data that are inputted based on user and the interface parsed
Execution route, after carrying out interface testing operation to method selected in the source code to be tested, the method also includes:
The test result data of data and the operation of this interface testing that this user inputs is stored, and is being received again
When the interface testing select command for the method that the operation of this interface testing had been tested in the source code to be tested, pass through
The target plug-in opens up the test result data of data and the operation of this interface testing that this user of storage inputs
Show.
7. according to the method described in claim 6, it is characterized in that, the data that this user is inputted and this interface are surveyed
The test result data of examination operation is stored, comprising:
Using Redis database, the test result data of the data that this user is inputted and the operation of this interface testing is carried out
Storage.
8. a kind of interface test device characterized by comprising
Registration module, the custom menu registering functional for using default exploitation environment to provide, registers the entrance of target plug-in;
Parsing module, for parsing the interface message of source code to be tested, the interface message packet using default exploitation environment
It includes: the execution route of interface and the parameter of interface;
Display module is rung for receiving the interface testing select command to any means selected in the source code to be tested
The interface testing selection instruction is answered, by the target plug-in, the interface message of the source code to be tested is shown;
Test module is used for the order of receiving interface test execution, by the target plug-in, receives user and is connect based on what is shown
The parameter of interface in message breath and the data that input, and the execution road of the data based on user's input and the interface parsed
Diameter carries out interface testing operation to method selected in the source code to be tested.
9. a kind of electronic equipment including memory, processor and stores the calculating that can be run on a memory and on a processor
Machine program, which is characterized in that the processor is realized when executing described program such as any one of claim 1 to 7 the method
Step.
10. a kind of non-transient computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer
It is realized when program is executed by processor such as the step of any one of claim 1 to 7 the method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910461244.2A CN110196809B (en) | 2019-05-30 | 2019-05-30 | Interface testing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910461244.2A CN110196809B (en) | 2019-05-30 | 2019-05-30 | Interface testing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110196809A true CN110196809A (en) | 2019-09-03 |
CN110196809B CN110196809B (en) | 2023-10-24 |
Family
ID=67753383
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910461244.2A Active CN110196809B (en) | 2019-05-30 | 2019-05-30 | Interface testing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110196809B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110825646A (en) * | 2019-11-11 | 2020-02-21 | 拉扎斯网络科技(上海)有限公司 | Test case generation method, interface test method, device and electronic equipment |
CN112000579A (en) * | 2020-08-26 | 2020-11-27 | 上海移远通信技术股份有限公司 | Software interface testing method, system, equipment and medium |
CN112765004A (en) * | 2021-01-19 | 2021-05-07 | 北京睿企信息科技有限公司 | Automatic and self-adaptive interface performance test method |
CN113342633A (en) * | 2020-02-18 | 2021-09-03 | 北京京东振世信息技术有限公司 | Performance test method and device |
CN117435508A (en) * | 2023-12-20 | 2024-01-23 | 深圳市智慧城市科技发展集团有限公司 | Interface testing method, device, equipment and storage medium |
CN112765004B (en) * | 2021-01-19 | 2024-04-26 | 北京睿企信息科技有限公司 | Automatic and self-adaptive interface performance test method |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130080503A1 (en) * | 2011-09-23 | 2013-03-28 | Roche Diagnostics Operations, Inc. | Command interface for communication test framework |
CN104809056A (en) * | 2014-01-27 | 2015-07-29 | 阿里巴巴集团控股有限公司 | Interface testing code generating method and device |
CN106294119A (en) * | 2015-06-24 | 2017-01-04 | 北京京东尚科信息技术有限公司 | Test dispatching system, method and terminal unit |
CN107729228A (en) * | 2017-08-24 | 2018-02-23 | 北京网众共创科技有限公司 | Interface test method, device, storage medium and processor |
CN108897691A (en) * | 2018-06-29 | 2018-11-27 | 百度在线网络技术(北京)有限公司 | Data processing method, device, server and medium based on interface analog service |
-
2019
- 2019-05-30 CN CN201910461244.2A patent/CN110196809B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130080503A1 (en) * | 2011-09-23 | 2013-03-28 | Roche Diagnostics Operations, Inc. | Command interface for communication test framework |
CN104809056A (en) * | 2014-01-27 | 2015-07-29 | 阿里巴巴集团控股有限公司 | Interface testing code generating method and device |
CN106294119A (en) * | 2015-06-24 | 2017-01-04 | 北京京东尚科信息技术有限公司 | Test dispatching system, method and terminal unit |
CN107729228A (en) * | 2017-08-24 | 2018-02-23 | 北京网众共创科技有限公司 | Interface test method, device, storage medium and processor |
CN108897691A (en) * | 2018-06-29 | 2018-11-27 | 百度在线网络技术(北京)有限公司 | Data processing method, device, server and medium based on interface analog service |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110825646A (en) * | 2019-11-11 | 2020-02-21 | 拉扎斯网络科技(上海)有限公司 | Test case generation method, interface test method, device and electronic equipment |
CN113342633A (en) * | 2020-02-18 | 2021-09-03 | 北京京东振世信息技术有限公司 | Performance test method and device |
CN113342633B (en) * | 2020-02-18 | 2023-09-22 | 北京京东振世信息技术有限公司 | Performance test method and device |
CN112000579A (en) * | 2020-08-26 | 2020-11-27 | 上海移远通信技术股份有限公司 | Software interface testing method, system, equipment and medium |
CN112000579B (en) * | 2020-08-26 | 2024-03-19 | 上海移远通信技术股份有限公司 | Software interface testing method, system, equipment and medium |
CN112765004A (en) * | 2021-01-19 | 2021-05-07 | 北京睿企信息科技有限公司 | Automatic and self-adaptive interface performance test method |
CN112765004B (en) * | 2021-01-19 | 2024-04-26 | 北京睿企信息科技有限公司 | Automatic and self-adaptive interface performance test method |
CN117435508A (en) * | 2023-12-20 | 2024-01-23 | 深圳市智慧城市科技发展集团有限公司 | Interface testing method, device, equipment and storage medium |
CN117435508B (en) * | 2023-12-20 | 2024-04-02 | 深圳市智慧城市科技发展集团有限公司 | Interface testing method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110196809B (en) | 2023-10-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110196809A (en) | Interface test method and device | |
CN105868039B (en) | A kind of method, system and equipment for management software problem report | |
CN107861871B (en) | Gray scale publishing method, device, server and storage medium | |
EP3511836A1 (en) | Generation of automated testing scripts by converting manual test cases | |
CN103632219B (en) | Method and system for reallocating jobs for checking data quality | |
JP5803499B2 (en) | Method, storage medium, apparatus and system for retrieving navigation model for web application analysis | |
US8898643B2 (en) | Application trace replay and simulation systems and methods | |
CN108647141A (en) | Automatic test approach, device, computer-readable medium and electronic equipment | |
US9239709B2 (en) | Method and system for an interface certification and design tool | |
US20090019427A1 (en) | Method and Apparatus for Providing Requirement Driven Static Analysis of Test Coverage for Web-Based, Distributed Processes | |
US20210385251A1 (en) | System and methods for integrating datasets and automating transformation workflows using a distributed computational graph | |
CN109783751A (en) | Form validation method and terminal device | |
CN107924360A (en) | Diagnosis frame in computing system | |
CN106648556A (en) | Front end and back end integrated development testing method and device | |
CN109101430A (en) | Test method, device and equipment | |
US20190138433A1 (en) | Evaluation of library test suites using mutation testing | |
CN107273250B (en) | Testing method and device of electronic insurance policy automatic underwriting system | |
CN106899549A (en) | A kind of network security detection method and device | |
CN110879776A (en) | Test case generation method and device | |
CN107729249A (en) | Browser compatibility method of testing, device, system and electronic equipment | |
CN112363938A (en) | Data processing method and device, electronic equipment and storage medium | |
US20220172712A1 (en) | Machine learning to propose actions in response to natural language questions | |
US9953093B1 (en) | Mapping system for a browser history stack and a browser page state | |
US11182273B1 (en) | Application testing using automatically generated test cases | |
CN112988588A (en) | Client software debugging method and device, storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20200302 Address after: 100085 Floor 102-1, Building No. 35, West Second Banner Road, Haidian District, Beijing Applicant after: Seashell Housing (Beijing) Technology Co.,Ltd. Address before: 300 457 days Unit 5, Room 1, 112, Room 1, Office Building C, Nangang Industrial Zone, Binhai New Area Economic and Technological Development Zone, Tianjin Applicant before: BEIKE TECHNOLOGY Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |